diff --git a/ChangeLog b/ChangeLog index 76477ebd7..79d9cf62a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +2000-06-30 Richard Frith-Macdonald + + 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 Extension to force process args to be forwarded by the user. diff --git a/Headers/gnustep/base/DistributedObjects.h b/Headers/gnustep/base/DistributedObjects.h index 12223eaf6..e8cdf2757 100644 --- a/Headers/gnustep/base/DistributedObjects.h +++ b/Headers/gnustep/base/DistributedObjects.h @@ -76,6 +76,8 @@ enum { - (NSDistantObject*) localForObject: (id)object; - (NSDistantObject*) localForTarget: (unsigned)target; - (NSDistantObject*) proxyForTarget: (unsigned)target; ++ (void) removeLocalObject: (id)object; +- (void) removeLocalObject: (id)object; - (void) retainTarget: (unsigned)target; @end diff --git a/Headers/gnustep/base/GSConnection.h b/Headers/gnustep/base/GSConnection.h index 3adac5ab7..fe027d4e0 100644 --- a/Headers/gnustep/base/GSConnection.h +++ b/Headers/gnustep/base/GSConnection.h @@ -34,6 +34,7 @@ @class NSDistantObject; @class NSPort; +@class NSPortNameServer; @class NSData; /* @@ -49,6 +50,7 @@ GS_EXPORT NSString *NSConnectionLocalCount; /* Objects sent out */ GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */ + /* * NSConnection class interface. * @@ -57,24 +59,29 @@ GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */ @interface NSConnection : NSObject { @private - BOOL is_valid; - BOOL independent_queueing; - unsigned request_depth; - NSPort *receive_port; - NSPort *send_port; - unsigned message_count; - unsigned req_out_count; - unsigned req_in_count; - unsigned rep_out_count; - unsigned rep_in_count; - NSMapTable *local_objects; - NSMapTable *local_targets; - NSMapTable *remote_proxies; - NSTimeInterval reply_timeout; - NSTimeInterval request_timeout; - id delegate; - NSMutableArray *request_modes; - NSMutableArray *run_loops; + BOOL _isValid; + BOOL _independentQueueing; + BOOL _authenticateIn; + BOOL _authenticateOut; + NSPort *_receivePort; + NSPort *_sendPort; + unsigned _requestDepth; + unsigned _messageCount; + unsigned _reqOutCount; + unsigned _reqInCount; + unsigned _repOutCount; + unsigned _repInCount; + NSMapTable *_localObjects; + NSMapTable *_localTargets; + NSMapTable *_remoteProxies; + NSMapTable *_replyMap; + NSTimeInterval _replyTimeout; + NSTimeInterval _requestTimeout; + NSMutableArray *_requestModes; + NSMutableArray *_runLoops; + NSMutableArray *_requestQueue; + id _delegate; + NSRecursiveLock *_refGate; } + (NSArray*) allConnections; @@ -106,6 +113,7 @@ GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */ - (BOOL) multipleThreadsEnabled; - (NSPort*) receivePort; - (BOOL) registerName: (NSString*)name; +- (BOOL) registerName: (NSString*)name withNameServer: (NSPortNameServer*)svr; - (NSArray*) remoteObjects; - (void) removeRequestMode: (NSString*)mode; - (void) removeRunLoop: (NSRunLoop *)runloop; @@ -134,67 +142,6 @@ GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */ - (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 selector: (SEL)sel argFrame: (arglist_t)frame; @@ -205,23 +152,23 @@ GS_EXPORT NSString *NSConnectionProxyCount; /* Objects received */ GS_EXPORT NSString *ConnectionBecameInvalidNotification; @interface Object (NSConnectionDelegate) -- (BOOL) connection: (NSConnection*)parent - shouldMakeNewConnection: (NSConnection*)newConnection; /* * This method may be used to ask a delegates permission to create * a new connection from the old one. * This method should be implemented in preference to the * [makeNewConnection:sender:] which is obsolete. */ -- (BOOL) makeNewConnection: (NSConnection*)newConnection - sender: (NSConnection*)parent; +- (BOOL) connection: (NSConnection*)parent + shouldMakeNewConnection: (NSConnection*)newConnection; + /* * This is the old way of doing the same thing as * [connection:shouldMakeNewConnection:] * It is obsolete - don't use it. */ -- (NSConnection*) connection: (NSConnection*)ancestorConn - didConnect: (NSConnection*)newConn; +- (BOOL) makeNewConnection: (NSConnection*)newConnection + sender: (NSConnection*)parent; + /* * 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. @@ -230,6 +177,14 @@ GS_EXPORT NSString *ConnectionBecameInvalidNotification; * This is a GNUstep extension * Normally return newConn. */ +- (NSConnection*) connection: (NSConnection*)ancestorConn + didConnect: (NSConnection*)newConn; + + +- (BOOL) authenticateComponents: (NSArray*)components + withData: (NSData*)authenticationData; +- (NSData*) authenticationDataForComponents: (NSArray*)components; + @end @interface Object (NSPortCoder) @@ -254,11 +209,6 @@ GS_EXPORT NSString *ConnectionBecameInvalidNotification; * To force bycopy, an object should return itsself. */ - -- (BOOL) authenticateComponents: (NSArray*)components - withData: (NSData*)authenticationData; -- (NSData*) authenticationDataForComponents: (NSArray*)components; - @end #define CONNECTION_DEFAULT_TIMEOUT 15.0 /* in seconds */ @@ -268,6 +218,7 @@ GS_EXPORT NSString *ConnectionBecameInvalidNotification; */ GS_EXPORT NSString *NSConnectionReplyMode; 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 */ diff --git a/Headers/gnustep/base/GSPortCoder.h b/Headers/gnustep/base/GSPortCoder.h index c00fc6aaf..f530113cf 100644 --- a/Headers/gnustep/base/GSPortCoder.h +++ b/Headers/gnustep/base/GSPortCoder.h @@ -95,7 +95,7 @@ @end @interface NSPortCoder (Private) -- (NSArray*) _components; +- (NSMutableArray*) _components; @end diff --git a/Headers/gnustep/base/NSArchiver.h b/Headers/gnustep/base/NSArchiver.h index 041d0974c..ea97958a7 100644 --- a/Headers/gnustep/base/NSArchiver.h +++ b/Headers/gnustep/base/NSArchiver.h @@ -130,21 +130,6 @@ classes: (unsigned)classCount objects: (unsigned)objectCount 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 #endif @@ -250,26 +235,11 @@ classes: (unsigned*)classCount objects: (unsigned*)objectCount 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 #endif /* Exceptions */ -GS_EXPORT NSString *NSInconsistentArchiveException; +GS_EXPORT NSString* const NSInconsistentArchiveException; #endif /* __NSArchiver_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/NSCoder.h b/Headers/gnustep/base/NSCoder.h index ebbd5f80a..ee5795ac8 100644 --- a/Headers/gnustep/base/NSCoder.h +++ b/Headers/gnustep/base/NSCoder.h @@ -88,9 +88,34 @@ #ifndef NO_GNUSTEP -#include -#include -@interface NSCoder (GNU) +@interface NSCoder (GNUstep) +/* Compatibility with libObjects */ +- (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 #endif /* NO_GNUSTEP */ diff --git a/Headers/gnustep/base/NSException.h b/Headers/gnustep/base/NSException.h index 3cbb8e230..a5695f19d 100644 --- a/Headers/gnustep/base/NSException.h +++ b/Headers/gnustep/base/NSException.h @@ -59,13 +59,12 @@ @end /* Common exceptions */ -GS_EXPORT NSString *NSInconsistentArchiveException; -GS_EXPORT NSString *NSGenericException; -GS_EXPORT NSString *NSInternalInconsistencyException; -GS_EXPORT NSString *NSInvalidArgumentException; -GS_EXPORT NSString *NSMallocException; -GS_EXPORT NSString *NSRangeException; -GS_EXPORT NSString *NSCharacterConversionException; +GS_EXPORT NSString* const NSGenericException; +GS_EXPORT NSString* const NSInternalInconsistencyException; +GS_EXPORT NSString* const NSInvalidArgumentException; +GS_EXPORT NSString* const NSMallocException; +GS_EXPORT NSString* const NSRangeException; +GS_EXPORT NSString* const NSCharacterConversionException; /* Exception handler definitions */ typedef struct _NSHandler diff --git a/Headers/gnustep/base/NSPortMessage.h b/Headers/gnustep/base/NSPortMessage.h index 832f91b94..66860a6ad 100644 --- a/Headers/gnustep/base/NSPortMessage.h +++ b/Headers/gnustep/base/NSPortMessage.h @@ -44,11 +44,12 @@ - (NSPort*) receivePort; - (void) setMsgid: (unsigned)anId; - (unsigned) msgid; - -#ifndef NO_GNUSTEP -- (void) addComponent: (id)aComponent; -#endif @end +#ifndef NO_GNUSTEP +@interface NSPortMessage (private) +- (NSMutableArray*) _components; +@end +#endif #endif diff --git a/Headers/gnustep/base/NSRunLoop.h b/Headers/gnustep/base/NSRunLoop.h index bd02ce911..4a56f24a8 100644 --- a/Headers/gnustep/base/NSRunLoop.h +++ b/Headers/gnustep/base/NSRunLoop.h @@ -29,7 +29,7 @@ @class NSTimer, NSDate, NSPort; /* Mode strings. */ -GS_EXPORT id NSDefaultRunLoopMode; +GS_EXPORT NSString* const NSDefaultRunLoopMode; @interface NSRunLoop : NSObject { diff --git a/Headers/gnustep/unicode/decomp.h b/Headers/gnustep/unicode/decomp.h index 2565ebd09..fc0448fe7 100644 --- a/Headers/gnustep/unicode/decomp.h +++ b/Headers/gnustep/unicode/decomp.h @@ -5,1056 +5,1056 @@ const unsigned int uni_dec_table_size = 1052; struct _dec_ uni_dec_table[]= { -{0x00C0, 0x0041, 0x0300, 0}, -{0x00C1, 0x0041, 0x0301, 0}, -{0x00C2, 0x0041, 0x0302, 0}, -{0x00C3, 0x0041, 0x0303, 0}, -{0x00C4, 0x0041, 0x0308, 0}, -{0x00C5, 0x0041, 0x030A, 0}, -{0x00C7, 0x0043, 0x0327, 0}, -{0x00C8, 0x0045, 0x0300, 0}, -{0x00C9, 0x0045, 0x0301, 0}, -{0x00CA, 0x0045, 0x0302, 0}, -{0x00CB, 0x0045, 0x0308, 0}, -{0x00CC, 0x0049, 0x0300, 0}, -{0x00CD, 0x0049, 0x0301, 0}, -{0x00CE, 0x0049, 0x0302, 0}, -{0x00CF, 0x0049, 0x0308, 0}, -{0x00D1, 0x004E, 0x0303, 0}, -{0x00D2, 0x004F, 0x0300, 0}, -{0x00D3, 0x004F, 0x0301, 0}, -{0x00D4, 0x004F, 0x0302, 0}, -{0x00D5, 0x004F, 0x0303, 0}, -{0x00D6, 0x004F, 0x0308, 0}, -{0x00D9, 0x0055, 0x0300, 0}, -{0x00DA, 0x0055, 0x0301, 0}, -{0x00DB, 0x0055, 0x0302, 0}, -{0x00DC, 0x0055, 0x0308, 0}, -{0x00DD, 0x0059, 0x0301, 0}, -{0x00E0, 0x0061, 0x0300, 0}, -{0x00E1, 0x0061, 0x0301, 0}, -{0x00E2, 0x0061, 0x0302, 0}, -{0x00E3, 0x0061, 0x0303, 0}, -{0x00E4, 0x0061, 0x0308, 0}, -{0x00E5, 0x0061, 0x030A, 0}, -{0x00E7, 0x0063, 0x0327, 0}, -{0x00E8, 0x0065, 0x0300, 0}, -{0x00E9, 0x0065, 0x0301, 0}, -{0x00EA, 0x0065, 0x0302, 0}, -{0x00EB, 0x0065, 0x0308, 0}, -{0x00EC, 0x0069, 0x0300, 0}, -{0x00ED, 0x0069, 0x0301, 0}, -{0x00EE, 0x0069, 0x0302, 0}, -{0x00EF, 0x0069, 0x0308, 0}, -{0x00F1, 0x006E, 0x0303, 0}, -{0x00F2, 0x006F, 0x0300, 0}, -{0x00F3, 0x006F, 0x0301, 0}, -{0x00F4, 0x006F, 0x0302, 0}, -{0x00F5, 0x006F, 0x0303, 0}, -{0x00F6, 0x006F, 0x0308, 0}, -{0x00F9, 0x0075, 0x0300, 0}, -{0x00FA, 0x0075, 0x0301, 0}, -{0x00FB, 0x0075, 0x0302, 0}, -{0x00FC, 0x0075, 0x0308, 0}, -{0x00FD, 0x0079, 0x0301, 0}, -{0x00FF, 0x0079, 0x0308, 0}, -{0x0100, 0x0041, 0x0304, 0}, -{0x0101, 0x0061, 0x0304, 0}, -{0x0102, 0x0041, 0x0306, 0}, -{0x0103, 0x0061, 0x0306, 0}, -{0x0104, 0x0041, 0x0328, 0}, -{0x0105, 0x0061, 0x0328, 0}, -{0x0106, 0x0043, 0x0301, 0}, -{0x0107, 0x0063, 0x0301, 0}, -{0x0108, 0x0043, 0x0302, 0}, -{0x0109, 0x0063, 0x0302, 0}, -{0x010A, 0x0043, 0x0307, 0}, -{0x010B, 0x0063, 0x0307, 0}, -{0x010C, 0x0043, 0x030C, 0}, -{0x010D, 0x0063, 0x030C, 0}, -{0x010E, 0x0044, 0x030C, 0}, -{0x010F, 0x0064, 0x030C, 0}, -{0x0112, 0x0045, 0x0304, 0}, -{0x0113, 0x0065, 0x0304, 0}, -{0x0114, 0x0045, 0x0306, 0}, -{0x0115, 0x0065, 0x0306, 0}, -{0x0116, 0x0045, 0x0307, 0}, -{0x0117, 0x0065, 0x0307, 0}, -{0x0118, 0x0045, 0x0328, 0}, -{0x0119, 0x0065, 0x0328, 0}, -{0x011A, 0x0045, 0x030C, 0}, -{0x011B, 0x0065, 0x030C, 0}, -{0x011C, 0x0047, 0x0302, 0}, -{0x011D, 0x0067, 0x0302, 0}, -{0x011E, 0x0047, 0x0306, 0}, -{0x011F, 0x0067, 0x0306, 0}, -{0x0120, 0x0047, 0x0307, 0}, -{0x0121, 0x0067, 0x0307, 0}, -{0x0122, 0x0047, 0x0327, 0}, -{0x0123, 0x0067, 0x0327, 0}, -{0x0124, 0x0048, 0x0302, 0}, -{0x0125, 0x0068, 0x0302, 0}, -{0x0128, 0x0049, 0x0303, 0}, -{0x0129, 0x0069, 0x0303, 0}, -{0x012A, 0x0049, 0x0304, 0}, -{0x012B, 0x0069, 0x0304, 0}, -{0x012C, 0x0049, 0x0306, 0}, -{0x012D, 0x0069, 0x0306, 0}, -{0x012E, 0x0049, 0x0328, 0}, -{0x012F, 0x0069, 0x0328, 0}, -{0x0130, 0x0049, 0x0307, 0}, -{0x0134, 0x004A, 0x0302, 0}, -{0x0135, 0x006A, 0x0302, 0}, -{0x0136, 0x004B, 0x0327, 0}, -{0x0137, 0x006B, 0x0327, 0}, -{0x0139, 0x004C, 0x0301, 0}, -{0x013A, 0x006C, 0x0301, 0}, -{0x013B, 0x004C, 0x0327, 0}, -{0x013C, 0x006C, 0x0327, 0}, -{0x013D, 0x004C, 0x030C, 0}, -{0x013E, 0x006C, 0x030C, 0}, -{0x0143, 0x004E, 0x0301, 0}, -{0x0144, 0x006E, 0x0301, 0}, -{0x0145, 0x004E, 0x0327, 0}, -{0x0146, 0x006E, 0x0327, 0}, -{0x0147, 0x004E, 0x030C, 0}, -{0x0148, 0x006E, 0x030C, 0}, -{0x014C, 0x004F, 0x0304, 0}, -{0x014D, 0x006F, 0x0304, 0}, -{0x014E, 0x004F, 0x0306, 0}, -{0x014F, 0x006F, 0x0306, 0}, -{0x0150, 0x004F, 0x030B, 0}, -{0x0151, 0x006F, 0x030B, 0}, -{0x0154, 0x0052, 0x0301, 0}, -{0x0155, 0x0072, 0x0301, 0}, -{0x0156, 0x0052, 0x0327, 0}, -{0x0157, 0x0072, 0x0327, 0}, -{0x0158, 0x0052, 0x030C, 0}, -{0x0159, 0x0072, 0x030C, 0}, -{0x015A, 0x0053, 0x0301, 0}, -{0x015B, 0x0073, 0x0301, 0}, -{0x015C, 0x0053, 0x0302, 0}, -{0x015D, 0x0073, 0x0302, 0}, -{0x015E, 0x0053, 0x0327, 0}, -{0x015F, 0x0073, 0x0327, 0}, -{0x0160, 0x0053, 0x030C, 0}, -{0x0161, 0x0073, 0x030C, 0}, -{0x0162, 0x0054, 0x0327, 0}, -{0x0163, 0x0074, 0x0327, 0}, -{0x0164, 0x0054, 0x030C, 0}, -{0x0165, 0x0074, 0x030C, 0}, -{0x0168, 0x0055, 0x0303, 0}, -{0x0169, 0x0075, 0x0303, 0}, -{0x016A, 0x0055, 0x0304, 0}, -{0x016B, 0x0075, 0x0304, 0}, -{0x016C, 0x0055, 0x0306, 0}, -{0x016D, 0x0075, 0x0306, 0}, -{0x016E, 0x0055, 0x030A, 0}, -{0x016F, 0x0075, 0x030A, 0}, -{0x0170, 0x0055, 0x030B, 0}, -{0x0171, 0x0075, 0x030B, 0}, -{0x0172, 0x0055, 0x0328, 0}, -{0x0173, 0x0075, 0x0328, 0}, -{0x0174, 0x0057, 0x0302, 0}, -{0x0175, 0x0077, 0x0302, 0}, -{0x0176, 0x0059, 0x0302, 0}, -{0x0177, 0x0079, 0x0302, 0}, -{0x0178, 0x0059, 0x0308, 0}, -{0x0179, 0x005A, 0x0301, 0}, -{0x017A, 0x007A, 0x0301, 0}, -{0x017B, 0x005A, 0x0307, 0}, -{0x017C, 0x007A, 0x0307, 0}, -{0x017D, 0x005A, 0x030C, 0}, -{0x017E, 0x007A, 0x030C, 0}, -{0x01A0, 0x004F, 0x031B, 0}, -{0x01A1, 0x006F, 0x031B, 0}, -{0x01AF, 0x0055, 0x031B, 0}, -{0x01B0, 0x0075, 0x031B, 0}, -{0x01CD, 0x0041, 0x030C, 0}, -{0x01CE, 0x0061, 0x030C, 0}, -{0x01CF, 0x0049, 0x030C, 0}, -{0x01D0, 0x0069, 0x030C, 0}, -{0x01D1, 0x004F, 0x030C, 0}, -{0x01D2, 0x006F, 0x030C, 0}, -{0x01D3, 0x0055, 0x030C, 0}, -{0x01D4, 0x0075, 0x030C, 0}, -{0x01D5, 0x00DC, 0x0304, 0}, -{0x01D6, 0x00FC, 0x0304, 0}, -{0x01D7, 0x00DC, 0x0301, 0}, -{0x01D8, 0x00FC, 0x0301, 0}, -{0x01D9, 0x00DC, 0x030C, 0}, -{0x01DA, 0x00FC, 0x030C, 0}, -{0x01DB, 0x00DC, 0x0300, 0}, -{0x01DC, 0x00FC, 0x0300, 0}, -{0x01DE, 0x00C4, 0x0304, 0}, -{0x01DF, 0x00E4, 0x0304, 0}, -{0x01E0, 0x0041, 0x0307, 0x0304, 0}, -{0x01E1, 0x0061, 0x0307, 0x0304, 0}, -{0x01E2, 0x00C6, 0x0304, 0}, -{0x01E3, 0x00E6, 0x0304, 0}, -{0x01E6, 0x0047, 0x030C, 0}, -{0x01E7, 0x0067, 0x030C, 0}, -{0x01E8, 0x004B, 0x030C, 0}, -{0x01E9, 0x006B, 0x030C, 0}, -{0x01EA, 0x004F, 0x0328, 0}, -{0x01EB, 0x006F, 0x0328, 0}, -{0x01EC, 0x01EA, 0x0304, 0}, -{0x01ED, 0x01EB, 0x0304, 0}, -{0x01EE, 0x01B7, 0x030C, 0}, -{0x01EF, 0x0292, 0x030C, 0}, -{0x01F0, 0x006A, 0x030C, 0}, -{0x01F4, 0x0047, 0x0301, 0}, -{0x01F5, 0x0067, 0x0301, 0}, -{0x01FA, 0x00C5, 0x0301, 0}, -{0x01FB, 0x00E5, 0x0301, 0}, -{0x01FC, 0x00C6, 0x0301, 0}, -{0x01FD, 0x00E6, 0x0301, 0}, -{0x01FE, 0x00D8, 0x0301, 0}, -{0x01FF, 0x00F8, 0x0301, 0}, -{0x0200, 0x0041, 0x030F, 0}, -{0x0201, 0x0061, 0x030F, 0}, -{0x0202, 0x0041, 0x0311, 0}, -{0x0203, 0x0061, 0x0311, 0}, -{0x0204, 0x0045, 0x030F, 0}, -{0x0205, 0x0065, 0x030F, 0}, -{0x0206, 0x0045, 0x0311, 0}, -{0x0207, 0x0065, 0x0311, 0}, -{0x0208, 0x0049, 0x030F, 0}, -{0x0209, 0x0069, 0x030F, 0}, -{0x020A, 0x0049, 0x0311, 0}, -{0x020B, 0x0069, 0x0311, 0}, -{0x020C, 0x004F, 0x030F, 0}, -{0x020D, 0x006F, 0x030F, 0}, -{0x020E, 0x004F, 0x0311, 0}, -{0x020F, 0x006F, 0x0311, 0}, -{0x0210, 0x0052, 0x030F, 0}, -{0x0211, 0x0072, 0x030F, 0}, -{0x0212, 0x0052, 0x0311, 0}, -{0x0213, 0x0072, 0x0311, 0}, -{0x0214, 0x0055, 0x030F, 0}, -{0x0215, 0x0075, 0x030F, 0}, -{0x0216, 0x0055, 0x0311, 0}, -{0x0217, 0x0075, 0x0311, 0}, -{0x0310, 0x0306, 0x0307, 0}, -{0x0340, 0x0300, 0}, -{0x0341, 0x0301, 0}, -{0x0343, 0x0313, 0}, -{0x0344, 0x0308, 0x030D, 0}, -{0x0374, 0x02B9, 0}, -{0x037E, 0x003B, 0}, -{0x0385, 0x00A8, 0x030D, 0}, -{0x0386, 0x0391, 0x030D, 0}, -{0x0387, 0x00B7, 0}, -{0x0388, 0x0395, 0x030D, 0}, -{0x0389, 0x0397, 0x030D, 0}, -{0x038A, 0x0399, 0x030D, 0}, -{0x038C, 0x039F, 0x030D, 0}, -{0x038E, 0x03A5, 0x030D, 0}, -{0x038F, 0x03A9, 0x030D, 0}, -{0x0390, 0x03B9, 0x0344, 0}, -{0x03AA, 0x0399, 0x0308, 0}, -{0x03AB, 0x03A5, 0x0308, 0}, -{0x03AC, 0x03B1, 0x030D, 0}, -{0x03AD, 0x03B5, 0x030D, 0}, -{0x03AE, 0x03B7, 0x030D, 0}, -{0x03AF, 0x03B9, 0x030D, 0}, -{0x03B0, 0x03C5, 0x0344, 0}, -{0x03CA, 0x03B9, 0x0308, 0}, -{0x03CB, 0x03C5, 0x0308, 0}, -{0x03CC, 0x03BF, 0x030D, 0}, -{0x03CD, 0x03C5, 0x030D, 0}, -{0x03CE, 0x03C9, 0x030D, 0}, -{0x03D3, 0x03D2, 0x030D, 0}, -{0x03D4, 0x03D2, 0x0308, 0}, -{0x0401, 0x0415, 0x0308, 0}, -{0x0403, 0x0413, 0x0301, 0}, -{0x0407, 0x0406, 0x0308, 0}, -{0x040C, 0x041A, 0x0301, 0}, -{0x040E, 0x0423, 0x0306, 0}, -{0x0419, 0x0418, 0x0306, 0}, -{0x0439, 0x0438, 0x0306, 0}, -{0x0451, 0x0435, 0x0308, 0}, -{0x0453, 0x0433, 0x0301, 0}, -{0x0457, 0x0456, 0x0308, 0}, -{0x045C, 0x043A, 0x0301, 0}, -{0x045E, 0x0443, 0x0306, 0}, -{0x0476, 0x0474, 0x030F, 0}, -{0x0477, 0x0475, 0x030F, 0}, -{0x04C1, 0x0416, 0x0306, 0}, -{0x04C2, 0x0436, 0x0306, 0}, -{0x04D0, 0x0410, 0x0306, 0}, -{0x04D1, 0x0430, 0x0306, 0}, -{0x04D2, 0x0410, 0x0308, 0}, -{0x04D3, 0x0430, 0x0308, 0}, -{0x04D4, 0x00C6, 0}, -{0x04D5, 0x00E6, 0}, -{0x04D6, 0x0415, 0x0306, 0}, -{0x04D7, 0x0435, 0x0306, 0}, -{0x04D8, 0x018F, 0}, -{0x04D9, 0x0259, 0}, -{0x04DA, 0x018F, 0x0308, 0}, -{0x04DB, 0x0259, 0x0308, 0}, -{0x04DC, 0x0416, 0x0308, 0}, -{0x04DD, 0x0436, 0x0308, 0}, -{0x04DE, 0x0417, 0x0308, 0}, -{0x04DF, 0x0437, 0x0308, 0}, -{0x04E0, 0x01B7, 0}, -{0x04E1, 0x0292, 0}, -{0x04E2, 0x0418, 0x0304, 0}, -{0x04E3, 0x0438, 0x0304, 0}, -{0x04E4, 0x0418, 0x0308, 0}, -{0x04E5, 0x0438, 0x0308, 0}, -{0x04E6, 0x041E, 0x0308, 0}, -{0x04E7, 0x043E, 0x0308, 0}, -{0x04E8, 0x019F, 0}, -{0x04E9, 0x0275, 0}, -{0x04EA, 0x019F, 0x0308, 0}, -{0x04EB, 0x0275, 0x0308, 0}, -{0x04EE, 0x0423, 0x0304, 0}, -{0x04EF, 0x0443, 0x0304, 0}, -{0x04F0, 0x0423, 0x0308, 0}, -{0x04F1, 0x0443, 0x0308, 0}, -{0x04F2, 0x0423, 0x030B, 0}, -{0x04F3, 0x0443, 0x030B, 0}, -{0x04F4, 0x0427, 0x0308, 0}, -{0x04F5, 0x0447, 0x0308, 0}, -{0x04F8, 0x042B, 0x0308, 0}, -{0x04F9, 0x044B, 0x0308, 0}, -{0x0929, 0x0928, 0x093C, 0}, -{0x0931, 0x0930, 0x093C, 0}, -{0x0934, 0x0933, 0x093C, 0}, -{0x0958, 0x0915, 0x093C, 0}, -{0x0959, 0x0916, 0x093C, 0}, -{0x095A, 0x0917, 0x093C, 0}, -{0x095B, 0x091C, 0x093C, 0}, -{0x095C, 0x0921, 0x093C, 0}, -{0x095D, 0x0922, 0x093C, 0}, -{0x095E, 0x092B, 0x093C, 0}, -{0x095F, 0x092F, 0x093C, 0}, -{0x09B0, 0x09AC, 0x09BC, 0}, -{0x09CB, 0x09C7, 0x09BE, 0}, -{0x09CC, 0x09C7, 0x09D7, 0}, -{0x09DC, 0x09A1, 0x09BC, 0}, -{0x09DD, 0x09A2, 0x09BC, 0}, -{0x09DF, 0x09AF, 0x09BC, 0}, -{0x0A59, 0x0A16, 0x0A3C, 0}, -{0x0A5A, 0x0A17, 0x0A3C, 0}, -{0x0A5B, 0x0A1C, 0x0A3C, 0}, -{0x0A5C, 0x0A21, 0x0A3C, 0}, -{0x0A5E, 0x0A2B, 0x0A3C, 0}, -{0x0B48, 0x0B47, 0x0B56, 0}, -{0x0B4B, 0x0B47, 0x0B3E, 0}, -{0x0B4C, 0x0B47, 0x0B57, 0}, -{0x0B5C, 0x0B21, 0x0B3C, 0}, -{0x0B5D, 0x0B22, 0x0B3C, 0}, -{0x0B5F, 0x0B2F, 0x0B3C, 0}, -{0x0B94, 0x0B92, 0x0BD7, 0}, -{0x0BCA, 0x0BC6, 0x0BBE, 0}, -{0x0BCB, 0x0BC7, 0x0BBE, 0}, -{0x0BCC, 0x0BC6, 0x0BD7, 0}, -{0x0C48, 0x0C46, 0x0C56, 0}, -{0x0CC0, 0x0CBF, 0x0CD5, 0}, -{0x0CC7, 0x0CC6, 0x0CD5, 0}, -{0x0CC8, 0x0CC6, 0x0CD6, 0}, -{0x0CCA, 0x0CC6, 0x0CC2, 0}, -{0x0CCB, 0x0CC6, 0x0CC2, 0x0CD5, 0}, -{0x0D4A, 0x0D46, 0x0D3E, 0}, -{0x0D4B, 0x0D47, 0x0D3E, 0}, -{0x0D4C, 0x0D46, 0x0D57, 0}, -{0x0E33, 0x0E4D, 0x0E32, 0}, -{0x0EB3, 0x0ECD, 0x0EB2, 0}, -{0x0F43, 0x0F42, 0x0FB7, 0}, -{0x0F4D, 0x0F4C, 0x0FB7, 0}, -{0x0F52, 0x0F51, 0x0FB7, 0}, -{0x0F57, 0x0F56, 0x0FB7, 0}, -{0x0F5C, 0x0F5B, 0x0FB7, 0}, -{0x0F69, 0x0F40, 0x0FB5, 0}, -{0x0F73, 0x0F71, 0x0F72, 0}, -{0x0F75, 0x0F74, 0x0F71, 0}, -{0x0F76, 0x0FB2, 0x0F80, 0}, -{0x0F77, 0x0F76, 0x0F71, 0}, -{0x0F78, 0x0FB3, 0x0F80, 0}, -{0x0F79, 0x0F78, 0x0F71, 0}, -{0x0F81, 0x0F80, 0x0F71, 0}, -{0x0F93, 0x0F92, 0x0FB7, 0}, -{0x0F9D, 0x0F9C, 0x0FB7, 0}, -{0x0FA2, 0x0FA1, 0x0FB7, 0}, -{0x0FA7, 0x0FA6, 0x0FB7, 0}, -{0x0FAC, 0x0FAB, 0x0FB7, 0}, -{0x0FB9, 0x0F90, 0x0FB5, 0}, -{0x1E00, 0x0041, 0x0325, 0}, -{0x1E01, 0x0061, 0x0325, 0}, -{0x1E02, 0x0042, 0x0307, 0}, -{0x1E03, 0x0062, 0x0307, 0}, -{0x1E04, 0x0042, 0x0323, 0}, -{0x1E05, 0x0062, 0x0323, 0}, -{0x1E06, 0x0042, 0x0331, 0}, -{0x1E07, 0x0062, 0x0331, 0}, -{0x1E08, 0x00C7, 0x0301, 0}, -{0x1E09, 0x00E7, 0x0301, 0}, -{0x1E0A, 0x0044, 0x0307, 0}, -{0x1E0B, 0x0064, 0x0307, 0}, -{0x1E0C, 0x0044, 0x0323, 0}, -{0x1E0D, 0x0064, 0x0323, 0}, -{0x1E0E, 0x0044, 0x0331, 0}, -{0x1E0F, 0x0064, 0x0331, 0}, -{0x1E10, 0x0044, 0x0327, 0}, -{0x1E11, 0x0064, 0x0327, 0}, -{0x1E12, 0x0044, 0x032D, 0}, -{0x1E13, 0x0064, 0x032D, 0}, -{0x1E14, 0x0112, 0x0300, 0}, -{0x1E15, 0x0113, 0x0300, 0}, -{0x1E16, 0x0112, 0x0301, 0}, -{0x1E17, 0x0113, 0x0301, 0}, -{0x1E18, 0x0045, 0x032D, 0}, -{0x1E19, 0x0065, 0x032D, 0}, -{0x1E1A, 0x0045, 0x0330, 0}, -{0x1E1B, 0x0065, 0x0330, 0}, -{0x1E1C, 0x0114, 0x0327, 0}, -{0x1E1D, 0x0115, 0x0327, 0}, -{0x1E1E, 0x0046, 0x0307, 0}, -{0x1E1F, 0x0066, 0x0307, 0}, -{0x1E20, 0x0047, 0x0304, 0}, -{0x1E21, 0x0067, 0x0304, 0}, -{0x1E22, 0x0048, 0x0307, 0}, -{0x1E23, 0x0068, 0x0307, 0}, -{0x1E24, 0x0048, 0x0323, 0}, -{0x1E25, 0x0068, 0x0323, 0}, -{0x1E26, 0x0048, 0x0308, 0}, -{0x1E27, 0x0068, 0x0308, 0}, -{0x1E28, 0x0048, 0x0327, 0}, -{0x1E29, 0x0068, 0x0327, 0}, -{0x1E2A, 0x0048, 0x032E, 0}, -{0x1E2B, 0x0068, 0x032E, 0}, -{0x1E2C, 0x0049, 0x0330, 0}, -{0x1E2D, 0x0069, 0x0330, 0}, -{0x1E2E, 0x00CF, 0x0301, 0}, -{0x1E2F, 0x00EF, 0x0301, 0}, -{0x1E30, 0x004B, 0x0301, 0}, -{0x1E31, 0x006B, 0x0301, 0}, -{0x1E32, 0x004B, 0x0323, 0}, -{0x1E33, 0x006B, 0x0323, 0}, -{0x1E34, 0x004B, 0x0331, 0}, -{0x1E35, 0x006B, 0x0331, 0}, -{0x1E36, 0x004C, 0x0323, 0}, -{0x1E37, 0x006C, 0x0323, 0}, -{0x1E38, 0x1E36, 0x0304, 0}, -{0x1E39, 0x1E37, 0x0304, 0}, -{0x1E3A, 0x004C, 0x0331, 0}, -{0x1E3B, 0x006C, 0x0331, 0}, -{0x1E3C, 0x004C, 0x032D, 0}, -{0x1E3D, 0x006C, 0x032D, 0}, -{0x1E3E, 0x004D, 0x0301, 0}, -{0x1E3F, 0x006D, 0x0301, 0}, -{0x1E40, 0x004D, 0x0307, 0}, -{0x1E41, 0x006D, 0x0307, 0}, -{0x1E42, 0x004D, 0x0323, 0}, -{0x1E43, 0x006D, 0x0323, 0}, -{0x1E44, 0x004E, 0x0307, 0}, -{0x1E45, 0x006E, 0x0307, 0}, -{0x1E46, 0x004E, 0x0323, 0}, -{0x1E47, 0x006E, 0x0323, 0}, -{0x1E48, 0x004E, 0x0331, 0}, -{0x1E49, 0x006E, 0x0331, 0}, -{0x1E4A, 0x004E, 0x032D, 0}, -{0x1E4B, 0x006E, 0x032D, 0}, -{0x1E4C, 0x00D5, 0x0301, 0}, -{0x1E4D, 0x00F5, 0x0301, 0}, -{0x1E4E, 0x00D5, 0x0308, 0}, -{0x1E4F, 0x00F5, 0x0308, 0}, -{0x1E50, 0x014C, 0x0300, 0}, -{0x1E51, 0x014D, 0x0300, 0}, -{0x1E52, 0x014C, 0x0301, 0}, -{0x1E53, 0x014D, 0x0301, 0}, -{0x1E54, 0x0050, 0x0301, 0}, -{0x1E55, 0x0070, 0x0301, 0}, -{0x1E56, 0x0050, 0x0307, 0}, -{0x1E57, 0x0070, 0x0307, 0}, -{0x1E58, 0x0052, 0x0307, 0}, -{0x1E59, 0x0072, 0x0307, 0}, -{0x1E5A, 0x0052, 0x0323, 0}, -{0x1E5B, 0x0072, 0x0323, 0}, -{0x1E5C, 0x1E5A, 0x0304, 0}, -{0x1E5D, 0x1E5B, 0x0304, 0}, -{0x1E5E, 0x0052, 0x0331, 0}, -{0x1E5F, 0x0072, 0x0331, 0}, -{0x1E60, 0x0053, 0x0307, 0}, -{0x1E61, 0x0073, 0x0307, 0}, -{0x1E62, 0x0053, 0x0323, 0}, -{0x1E63, 0x0073, 0x0323, 0}, -{0x1E64, 0x015A, 0x0307, 0}, -{0x1E65, 0x015B, 0x0307, 0}, -{0x1E66, 0x0160, 0x0307, 0}, -{0x1E67, 0x0161, 0x0307, 0}, -{0x1E68, 0x1E62, 0x0307, 0}, -{0x1E69, 0x1E63, 0x0307, 0}, -{0x1E6A, 0x0054, 0x0307, 0}, -{0x1E6B, 0x0074, 0x0307, 0}, -{0x1E6C, 0x0054, 0x0323, 0}, -{0x1E6D, 0x0074, 0x0323, 0}, -{0x1E6E, 0x0054, 0x0331, 0}, -{0x1E6F, 0x0074, 0x0331, 0}, -{0x1E70, 0x0054, 0x032D, 0}, -{0x1E71, 0x0074, 0x032D, 0}, -{0x1E72, 0x0055, 0x0324, 0}, -{0x1E73, 0x0075, 0x0324, 0}, -{0x1E74, 0x0055, 0x0330, 0}, -{0x1E75, 0x0075, 0x0330, 0}, -{0x1E76, 0x0055, 0x032D, 0}, -{0x1E77, 0x0075, 0x032D, 0}, -{0x1E78, 0x0168, 0x0301, 0}, -{0x1E79, 0x0169, 0x0301, 0}, -{0x1E7A, 0x016A, 0x0308, 0}, -{0x1E7B, 0x016B, 0x0308, 0}, -{0x1E7C, 0x0056, 0x0303, 0}, -{0x1E7D, 0x0076, 0x0303, 0}, -{0x1E7E, 0x0056, 0x0323, 0}, -{0x1E7F, 0x0076, 0x0323, 0}, -{0x1E80, 0x0057, 0x0300, 0}, -{0x1E81, 0x0077, 0x0300, 0}, -{0x1E82, 0x0057, 0x0301, 0}, -{0x1E83, 0x0077, 0x0301, 0}, -{0x1E84, 0x0057, 0x0308, 0}, -{0x1E85, 0x0077, 0x0308, 0}, -{0x1E86, 0x0057, 0x0307, 0}, -{0x1E87, 0x0077, 0x0307, 0}, -{0x1E88, 0x0057, 0x0323, 0}, -{0x1E89, 0x0077, 0x0323, 0}, -{0x1E8A, 0x0058, 0x0307, 0}, -{0x1E8B, 0x0078, 0x0307, 0}, -{0x1E8C, 0x0058, 0x0308, 0}, -{0x1E8D, 0x0078, 0x0308, 0}, -{0x1E8E, 0x0059, 0x0307, 0}, -{0x1E8F, 0x0079, 0x0307, 0}, -{0x1E90, 0x005A, 0x0302, 0}, -{0x1E91, 0x007A, 0x0302, 0}, -{0x1E92, 0x005A, 0x0323, 0}, -{0x1E93, 0x007A, 0x0323, 0}, -{0x1E94, 0x005A, 0x0331, 0}, -{0x1E95, 0x007A, 0x0331, 0}, -{0x1E96, 0x0068, 0x0331, 0}, -{0x1E97, 0x0074, 0x0308, 0}, -{0x1E98, 0x0077, 0x030A, 0}, -{0x1E99, 0x0079, 0x030A, 0}, -{0x1E9B, 0x017F, 0x0307, 0}, -{0x1EA0, 0x0041, 0x0323, 0}, -{0x1EA1, 0x0061, 0x0323, 0}, -{0x1EA2, 0x0041, 0x0309, 0}, -{0x1EA3, 0x0061, 0x0309, 0}, -{0x1EA4, 0x00C2, 0x0301, 0}, -{0x1EA5, 0x00E2, 0x0301, 0}, -{0x1EA6, 0x00C2, 0x0300, 0}, -{0x1EA7, 0x00E2, 0x0300, 0}, -{0x1EA8, 0x00C2, 0x0309, 0}, -{0x1EA9, 0x00E2, 0x0309, 0}, -{0x1EAA, 0x00C2, 0x0303, 0}, -{0x1EAB, 0x00E2, 0x0303, 0}, -{0x1EAC, 0x00C2, 0x0323, 0}, -{0x1EAD, 0x00E2, 0x0323, 0}, -{0x1EAE, 0x0102, 0x0301, 0}, -{0x1EAF, 0x0103, 0x0301, 0}, -{0x1EB0, 0x0102, 0x0300, 0}, -{0x1EB1, 0x0103, 0x0300, 0}, -{0x1EB2, 0x0102, 0x0309, 0}, -{0x1EB3, 0x0103, 0x0309, 0}, -{0x1EB4, 0x0102, 0x0303, 0}, -{0x1EB5, 0x0103, 0x0303, 0}, -{0x1EB6, 0x0102, 0x0323, 0}, -{0x1EB7, 0x0103, 0x0323, 0}, -{0x1EB8, 0x0045, 0x0323, 0}, -{0x1EB9, 0x0065, 0x0323, 0}, -{0x1EBA, 0x0045, 0x0309, 0}, -{0x1EBB, 0x0065, 0x0309, 0}, -{0x1EBC, 0x0045, 0x0303, 0}, -{0x1EBD, 0x0065, 0x0303, 0}, -{0x1EBE, 0x00CA, 0x0301, 0}, -{0x1EBF, 0x00EA, 0x0301, 0}, -{0x1EC0, 0x00CA, 0x0300, 0}, -{0x1EC1, 0x00EA, 0x0300, 0}, -{0x1EC2, 0x00CA, 0x0309, 0}, -{0x1EC3, 0x00EA, 0x0309, 0}, -{0x1EC4, 0x00CA, 0x0303, 0}, -{0x1EC5, 0x00EA, 0x0303, 0}, -{0x1EC6, 0x00CA, 0x0323, 0}, -{0x1EC7, 0x00EA, 0x0323, 0}, -{0x1EC8, 0x0049, 0x0309, 0}, -{0x1EC9, 0x0069, 0x0309, 0}, -{0x1ECA, 0x0049, 0x0323, 0}, -{0x1ECB, 0x0069, 0x0323, 0}, -{0x1ECC, 0x004F, 0x0323, 0}, -{0x1ECD, 0x006F, 0x0323, 0}, -{0x1ECE, 0x004F, 0x0309, 0}, -{0x1ECF, 0x006F, 0x0309, 0}, -{0x1ED0, 0x00D4, 0x0301, 0}, -{0x1ED1, 0x00F4, 0x0301, 0}, -{0x1ED2, 0x00D4, 0x0300, 0}, -{0x1ED3, 0x00F4, 0x0300, 0}, -{0x1ED4, 0x00D4, 0x0309, 0}, -{0x1ED5, 0x00F4, 0x0309, 0}, -{0x1ED6, 0x00D4, 0x0303, 0}, -{0x1ED7, 0x00F4, 0x0303, 0}, -{0x1ED8, 0x00D4, 0x0323, 0}, -{0x1ED9, 0x00F4, 0x0323, 0}, -{0x1EDA, 0x01A0, 0x0301, 0}, -{0x1EDB, 0x01A1, 0x0301, 0}, -{0x1EDC, 0x01A0, 0x0300, 0}, -{0x1EDD, 0x01A1, 0x0300, 0}, -{0x1EDE, 0x01A0, 0x0309, 0}, -{0x1EDF, 0x01A1, 0x0309, 0}, -{0x1EE0, 0x01A0, 0x0303, 0}, -{0x1EE1, 0x01A1, 0x0303, 0}, -{0x1EE2, 0x01A0, 0x0323, 0}, -{0x1EE3, 0x01A1, 0x0323, 0}, -{0x1EE4, 0x0055, 0x0323, 0}, -{0x1EE5, 0x0075, 0x0323, 0}, -{0x1EE6, 0x0055, 0x0309, 0}, -{0x1EE7, 0x0075, 0x0309, 0}, -{0x1EE8, 0x01AF, 0x0301, 0}, -{0x1EE9, 0x01B0, 0x0301, 0}, -{0x1EEA, 0x01AF, 0x0300, 0}, -{0x1EEB, 0x01B0, 0x0300, 0}, -{0x1EEC, 0x01AF, 0x0309, 0}, -{0x1EED, 0x01B0, 0x0309, 0}, -{0x1EEE, 0x01AF, 0x0303, 0}, -{0x1EEF, 0x01B0, 0x0303, 0}, -{0x1EF0, 0x01AF, 0x0323, 0}, -{0x1EF1, 0x01B0, 0x0323, 0}, -{0x1EF2, 0x0059, 0x0300, 0}, -{0x1EF3, 0x0079, 0x0300, 0}, -{0x1EF4, 0x0059, 0x0323, 0}, -{0x1EF5, 0x0079, 0x0323, 0}, -{0x1EF6, 0x0059, 0x0309, 0}, -{0x1EF7, 0x0079, 0x0309, 0}, -{0x1EF8, 0x0059, 0x0303, 0}, -{0x1EF9, 0x0079, 0x0303, 0}, -{0x1F00, 0x03B1, 0x0313, 0}, -{0x1F01, 0x03B1, 0x0314, 0}, -{0x1F02, 0x1F00, 0x0300, 0}, -{0x1F03, 0x1F01, 0x0300, 0}, -{0x1F04, 0x1F00, 0x0301, 0}, -{0x1F05, 0x1F01, 0x0301, 0}, -{0x1F06, 0x1F00, 0x0342, 0}, -{0x1F07, 0x1F01, 0x0342, 0}, -{0x1F08, 0x0391, 0x0313, 0}, -{0x1F09, 0x0391, 0x0314, 0}, -{0x1F0A, 0x1F08, 0x0300, 0}, -{0x1F0B, 0x1F09, 0x0300, 0}, -{0x1F0C, 0x1F08, 0x0301, 0}, -{0x1F0D, 0x1F09, 0x0301, 0}, -{0x1F0E, 0x1F08, 0x0342, 0}, -{0x1F0F, 0x1F09, 0x0342, 0}, -{0x1F10, 0x03B5, 0x0313, 0}, -{0x1F11, 0x03B5, 0x0314, 0}, -{0x1F12, 0x1F10, 0x0300, 0}, -{0x1F13, 0x1F11, 0x0300, 0}, -{0x1F14, 0x1F10, 0x0301, 0}, -{0x1F15, 0x1F11, 0x0301, 0}, -{0x1F18, 0x0395, 0x0313, 0}, -{0x1F19, 0x0395, 0x0314, 0}, -{0x1F1A, 0x1F18, 0x0300, 0}, -{0x1F1B, 0x1F19, 0x0300, 0}, -{0x1F1C, 0x1F18, 0x0301, 0}, -{0x1F1D, 0x1F19, 0x0301, 0}, -{0x1F20, 0x03B7, 0x0313, 0}, -{0x1F21, 0x03B7, 0x0314, 0}, -{0x1F22, 0x1F20, 0x0300, 0}, -{0x1F23, 0x1F21, 0x0300, 0}, -{0x1F24, 0x1F20, 0x0301, 0}, -{0x1F25, 0x1F21, 0x0301, 0}, -{0x1F26, 0x1F20, 0x0342, 0}, -{0x1F27, 0x1F21, 0x0342, 0}, -{0x1F28, 0x0397, 0x0313, 0}, -{0x1F29, 0x0397, 0x0314, 0}, -{0x1F2A, 0x1F28, 0x0300, 0}, -{0x1F2B, 0x1F29, 0x0300, 0}, -{0x1F2C, 0x1F28, 0x0301, 0}, -{0x1F2D, 0x1F29, 0x0301, 0}, -{0x1F2E, 0x1F28, 0x0342, 0}, -{0x1F2F, 0x1F29, 0x0342, 0}, -{0x1F30, 0x03B9, 0x0313, 0}, -{0x1F31, 0x03B9, 0x0314, 0}, -{0x1F32, 0x1F30, 0x0300, 0}, -{0x1F33, 0x1F31, 0x0300, 0}, -{0x1F34, 0x1F30, 0x0301, 0}, -{0x1F35, 0x1F31, 0x0301, 0}, -{0x1F36, 0x1F30, 0x0342, 0}, -{0x1F37, 0x1F31, 0x0342, 0}, -{0x1F38, 0x0399, 0x0313, 0}, -{0x1F39, 0x0399, 0x0314, 0}, -{0x1F3A, 0x1F38, 0x0300, 0}, -{0x1F3B, 0x1F39, 0x0300, 0}, -{0x1F3C, 0x1F38, 0x0301, 0}, -{0x1F3D, 0x1F39, 0x0301, 0}, -{0x1F3E, 0x1F38, 0x0342, 0}, -{0x1F3F, 0x1F39, 0x0342, 0}, -{0x1F40, 0x03BF, 0x0313, 0}, -{0x1F41, 0x03BF, 0x0314, 0}, -{0x1F42, 0x1F40, 0x0300, 0}, -{0x1F43, 0x1F41, 0x0300, 0}, -{0x1F44, 0x1F40, 0x0301, 0}, -{0x1F45, 0x1F41, 0x0301, 0}, -{0x1F48, 0x039F, 0x0313, 0}, -{0x1F49, 0x039F, 0x0314, 0}, -{0x1F4A, 0x1F48, 0x0300, 0}, -{0x1F4B, 0x1F49, 0x0300, 0}, -{0x1F4C, 0x1F48, 0x0301, 0}, -{0x1F4D, 0x1F49, 0x0301, 0}, -{0x1F50, 0x03C5, 0x0313, 0}, -{0x1F51, 0x03C5, 0x0314, 0}, -{0x1F52, 0x1F50, 0x0300, 0}, -{0x1F53, 0x1F51, 0x0300, 0}, -{0x1F54, 0x1F50, 0x0301, 0}, -{0x1F55, 0x1F51, 0x0301, 0}, -{0x1F56, 0x1F50, 0x0342, 0}, -{0x1F57, 0x1F51, 0x0342, 0}, -{0x1F59, 0x03A5, 0x0314, 0}, -{0x1F5B, 0x1F59, 0x0300, 0}, -{0x1F5D, 0x1F59, 0x0301, 0}, -{0x1F5F, 0x1F59, 0x0342, 0}, -{0x1F60, 0x03C9, 0x0313, 0}, -{0x1F61, 0x03C9, 0x0314, 0}, -{0x1F62, 0x1F60, 0x0300, 0}, -{0x1F63, 0x1F61, 0x0300, 0}, -{0x1F64, 0x1F60, 0x0301, 0}, -{0x1F65, 0x1F61, 0x0301, 0}, -{0x1F66, 0x1F60, 0x0342, 0}, -{0x1F67, 0x1F61, 0x0342, 0}, -{0x1F68, 0x03A9, 0x0313, 0}, -{0x1F69, 0x03A9, 0x0314, 0}, -{0x1F6A, 0x1F68, 0x0300, 0}, -{0x1F6B, 0x1F69, 0x0300, 0}, -{0x1F6C, 0x1F68, 0x0301, 0}, -{0x1F6D, 0x1F69, 0x0301, 0}, -{0x1F6E, 0x1F68, 0x0342, 0}, -{0x1F6F, 0x1F69, 0x0342, 0}, -{0x1F70, 0x03B1, 0x0300, 0}, -{0x1F71, 0x03B1, 0x0301, 0}, -{0x1F72, 0x03B5, 0x0300, 0}, -{0x1F73, 0x03B5, 0x0301, 0}, -{0x1F74, 0x03B7, 0x0300, 0}, -{0x1F75, 0x03B7, 0x0301, 0}, -{0x1F76, 0x03B9, 0x0300, 0}, -{0x1F77, 0x03B9, 0x0301, 0}, -{0x1F78, 0x03BF, 0x0300, 0}, -{0x1F79, 0x03BF, 0x0301, 0}, -{0x1F7A, 0x03C5, 0x0300, 0}, -{0x1F7B, 0x03C5, 0x0301, 0}, -{0x1F7C, 0x03C9, 0x0300, 0}, -{0x1F7D, 0x03C9, 0x0301, 0}, -{0x1F80, 0x1F00, 0x0345, 0}, -{0x1F81, 0x1F01, 0x0345, 0}, -{0x1F82, 0x1F02, 0x0345, 0}, -{0x1F83, 0x1F03, 0x0345, 0}, -{0x1F84, 0x1F04, 0x0345, 0}, -{0x1F85, 0x1F05, 0x0345, 0}, -{0x1F86, 0x1F06, 0x0345, 0}, -{0x1F87, 0x1F07, 0x0345, 0}, -{0x1F88, 0x1F08, 0x0345, 0}, -{0x1F89, 0x1F09, 0x0345, 0}, -{0x1F8A, 0x1F0A, 0x0345, 0}, -{0x1F8B, 0x1F0B, 0x0345, 0}, -{0x1F8C, 0x1F0C, 0x0345, 0}, -{0x1F8D, 0x1F0D, 0x0345, 0}, -{0x1F8E, 0x1F0E, 0x0345, 0}, -{0x1F8F, 0x1F0F, 0x0345, 0}, -{0x1F90, 0x1F20, 0x0345, 0}, -{0x1F91, 0x1F21, 0x0345, 0}, -{0x1F92, 0x1F22, 0x0345, 0}, -{0x1F93, 0x1F23, 0x0345, 0}, -{0x1F94, 0x1F24, 0x0345, 0}, -{0x1F95, 0x1F25, 0x0345, 0}, -{0x1F96, 0x1F26, 0x0345, 0}, -{0x1F97, 0x1F27, 0x0345, 0}, -{0x1F98, 0x1F28, 0x0345, 0}, -{0x1F99, 0x1F29, 0x0345, 0}, -{0x1F9A, 0x1F2A, 0x0345, 0}, -{0x1F9B, 0x1F2B, 0x0345, 0}, -{0x1F9C, 0x1F2C, 0x0345, 0}, -{0x1F9D, 0x1F2D, 0x0345, 0}, -{0x1F9E, 0x1F2E, 0x0345, 0}, -{0x1F9F, 0x1F2F, 0x0345, 0}, -{0x1FA0, 0x1F60, 0x0345, 0}, -{0x1FA1, 0x1F61, 0x0345, 0}, -{0x1FA2, 0x1F62, 0x0345, 0}, -{0x1FA3, 0x1F63, 0x0345, 0}, -{0x1FA4, 0x1F64, 0x0345, 0}, -{0x1FA5, 0x1F65, 0x0345, 0}, -{0x1FA6, 0x1F66, 0x0345, 0}, -{0x1FA7, 0x1F67, 0x0345, 0}, -{0x1FA8, 0x1F68, 0x0345, 0}, -{0x1FA9, 0x1F69, 0x0345, 0}, -{0x1FAA, 0x1F6A, 0x0345, 0}, -{0x1FAB, 0x1F6B, 0x0345, 0}, -{0x1FAC, 0x1F6C, 0x0345, 0}, -{0x1FAD, 0x1F6D, 0x0345, 0}, -{0x1FAE, 0x1F6E, 0x0345, 0}, -{0x1FAF, 0x1F6F, 0x0345, 0}, -{0x1FB0, 0x03B1, 0x0306, 0}, -{0x1FB1, 0x03B1, 0x0304, 0}, -{0x1FB2, 0x1F70, 0x0345, 0}, -{0x1FB3, 0x03B1, 0x0345, 0}, -{0x1FB4, 0x1F71, 0x0345, 0}, -{0x1FB6, 0x03B1, 0x0342, 0}, -{0x1FB7, 0x1FB6, 0x0345, 0}, -{0x1FB8, 0x0391, 0x0306, 0}, -{0x1FB9, 0x0391, 0x0304, 0}, -{0x1FBA, 0x0391, 0x0300, 0}, -{0x1FBB, 0x0391, 0x0301, 0}, -{0x1FBC, 0x0391, 0x0345, 0}, -{0x1FBE, 0x0399, 0}, -{0x1FC1, 0x00A8, 0x0342, 0}, -{0x1FC2, 0x1F74, 0x0345, 0}, -{0x1FC3, 0x03B7, 0x0345, 0}, -{0x1FC4, 0x1F75, 0x0345, 0}, -{0x1FC6, 0x03B7, 0x0342, 0}, -{0x1FC7, 0x1FC6, 0x0345, 0}, -{0x1FC8, 0x0395, 0x0300, 0}, -{0x1FC9, 0x0395, 0x0301, 0}, -{0x1FCA, 0x0397, 0x0300, 0}, -{0x1FCB, 0x0397, 0x0301, 0}, -{0x1FCC, 0x0397, 0x0345, 0}, -{0x1FCD, 0x1FBF, 0x0300, 0}, -{0x1FCE, 0x1FBF, 0x0301, 0}, -{0x1FCF, 0x1FBF, 0x0342, 0}, -{0x1FD0, 0x03B9, 0x0306, 0}, -{0x1FD1, 0x03B9, 0x0304, 0}, -{0x1FD2, 0x03CA, 0x0300, 0}, -{0x1FD3, 0x03CA, 0x0301, 0}, -{0x1FD6, 0x03B9, 0x0342, 0}, -{0x1FD7, 0x03CA, 0x0342, 0}, -{0x1FD8, 0x0399, 0x0306, 0}, -{0x1FD9, 0x0399, 0x0304, 0}, -{0x1FDA, 0x0399, 0x0300, 0}, -{0x1FDB, 0x0399, 0x0301, 0}, -{0x1FDD, 0x1FFE, 0x0300, 0}, -{0x1FDE, 0x1FFE, 0x0301, 0}, -{0x1FDF, 0x1FFE, 0x0342, 0}, -{0x1FE0, 0x03C5, 0x0306, 0}, -{0x1FE1, 0x03C5, 0x0304, 0}, -{0x1FE2, 0x03CB, 0x0300, 0}, -{0x1FE3, 0x03CB, 0x0301, 0}, -{0x1FE4, 0x03C1, 0x0313, 0}, -{0x1FE5, 0x03C1, 0x0314, 0}, -{0x1FE6, 0x03C5, 0x0342, 0}, -{0x1FE7, 0x03CB, 0x0342, 0}, -{0x1FE8, 0x03A5, 0x0306, 0}, -{0x1FE9, 0x03A5, 0x0304, 0}, -{0x1FEA, 0x03A5, 0x0300, 0}, -{0x1FEB, 0x03A5, 0x0301, 0}, -{0x1FEC, 0x03A1, 0x0314, 0}, -{0x1FED, 0x00A8, 0x0300, 0}, -{0x1FEE, 0x00A8, 0x0301, 0}, -{0x1FEF, 0x0060, 0}, -{0x1FF2, 0x1F7C, 0x0345, 0}, -{0x1FF3, 0x03C9, 0x0345, 0}, -{0x1FF4, 0x1F79, 0x0345, 0}, -{0x1FF6, 0x03C9, 0x0342, 0}, -{0x1FF7, 0x1FF6, 0x0345, 0}, -{0x1FF8, 0x039F, 0x0300, 0}, -{0x1FF9, 0x039F, 0x0301, 0}, -{0x1FFA, 0x03A9, 0x0300, 0}, -{0x1FFB, 0x03A9, 0x0301, 0}, -{0x1FFC, 0x03A9, 0x0345, 0}, -{0x1FFD, 0x00B4, 0}, -{0x2000, 0x2002, 0}, -{0x2001, 0x2003, 0}, -{0x2126, 0x03A9, 0}, -{0x212A, 0x004B, 0}, -{0x212B, 0x00C5, 0}, -{0x2204, 0x2203, 0x0338, 0}, -{0x2209, 0x2208, 0x0338, 0}, -{0x220C, 0x220B, 0x0338, 0}, -{0x2224, 0x2223, 0x0338, 0}, -{0x2226, 0x2225, 0x0338, 0}, -{0x2241, 0x007E, 0x0338, 0}, -{0x2244, 0x2243, 0x0338, 0}, -{0x2247, 0x2245, 0x0338, 0}, -{0x2249, 0x2248, 0x0338, 0}, -{0x2260, 0x003D, 0x0338, 0}, -{0x2262, 0x2261, 0x0338, 0}, -{0x226D, 0x224D, 0x0338, 0}, -{0x226E, 0x003C, 0x0338, 0}, -{0x226F, 0x003E, 0x0338, 0}, -{0x2270, 0x2264, 0x0338, 0}, -{0x2271, 0x2265, 0x0338, 0}, -{0x2274, 0x2272, 0x0338, 0}, -{0x2275, 0x2273, 0x0338, 0}, -{0x2278, 0x2276, 0x0338, 0}, -{0x2279, 0x2277, 0x0338, 0}, -{0x2280, 0x227A, 0x0338, 0}, -{0x2281, 0x227B, 0x0338, 0}, -{0x2284, 0x2282, 0x0338, 0}, -{0x2285, 0x2283, 0x0338, 0}, -{0x2288, 0x2286, 0x0338, 0}, -{0x2289, 0x2287, 0x0338, 0}, -{0x22AC, 0x22A2, 0x0338, 0}, -{0x22AD, 0x22A8, 0x0338, 0}, -{0x22AE, 0x22A9, 0x0338, 0}, -{0x22AF, 0x22AB, 0x0338, 0}, -{0x22E0, 0x227C, 0x0338, 0}, -{0x22E1, 0x227D, 0x0338, 0}, -{0x22E2, 0x2291, 0x0338, 0}, -{0x22E3, 0x2292, 0x0338, 0}, -{0x22EA, 0x22B2, 0x0338, 0}, -{0x22EB, 0x22B3, 0x0338, 0}, -{0x22EC, 0x22B4, 0x0338, 0}, -{0x22ED, 0x22B5, 0x0338, 0}, -{0x2329, 0x3008, 0}, -{0x232A, 0x3009, 0}, -{0x2474, 0x0028, 0x0031, 0x0029, 0}, -{0x2475, 0x0028, 0x0032, 0x0029, 0}, -{0x2476, 0x0028, 0x0033, 0x0029, 0}, -{0x2477, 0x0028, 0x0034, 0x0029, 0}, -{0x2478, 0x0028, 0x0035, 0x0029, 0}, -{0x2479, 0x0028, 0x0036, 0x0029, 0}, -{0x247A, 0x0028, 0x0037, 0x0029, 0}, -{0x247B, 0x0028, 0x0038, 0x0029, 0}, -{0x247C, 0x0028, 0x0039, 0x0029, 0}, -{0x247D, 0x0028, 0x0031, 0x0030, 0x0029, 0}, -{0x247E, 0x0028, 0x0031, 0x0031, 0x0029, 0}, -{0x247F, 0x0028, 0x0031, 0x0032, 0x0029, 0}, -{0x2480, 0x0028, 0x0031, 0x0033, 0x0029, 0}, -{0x2481, 0x0028, 0x0031, 0x0034, 0x0029, 0}, -{0x2482, 0x0028, 0x0031, 0x0035, 0x0029, 0}, -{0x2483, 0x0028, 0x0031, 0x0036, 0x0029, 0}, -{0x2484, 0x0028, 0x0031, 0x0037, 0x0029, 0}, -{0x2485, 0x0028, 0x0031, 0x0038, 0x0029, 0}, -{0x2486, 0x0028, 0x0031, 0x0039, 0x0029, 0}, -{0x2487, 0x0028, 0x0032, 0x0030, 0x0029, 0}, -{0x2488, 0x0031, 0x002E, 0}, -{0x2489, 0x0032, 0x002E, 0}, -{0x248A, 0x0033, 0x002E, 0}, -{0x248B, 0x0034, 0x002E, 0}, -{0x248C, 0x0035, 0x002E, 0}, -{0x248D, 0x0036, 0x002E, 0}, -{0x248E, 0x0037, 0x002E, 0}, -{0x248F, 0x0038, 0x002E, 0}, -{0x2490, 0x0039, 0x002E, 0}, -{0x2491, 0x0031, 0x0030, 0x002E, 0}, -{0x2492, 0x0031, 0x0031, 0x002E, 0}, -{0x2493, 0x0031, 0x0032, 0x002E, 0}, -{0x2494, 0x0031, 0x0033, 0x002E, 0}, -{0x2495, 0x0031, 0x0034, 0x002E, 0}, -{0x2496, 0x0031, 0x0035, 0x002E, 0}, -{0x2497, 0x0031, 0x0036, 0x002E, 0}, -{0x2498, 0x0031, 0x0037, 0x002E, 0}, -{0x2499, 0x0031, 0x0038, 0x002E, 0}, -{0x249A, 0x0031, 0x0039, 0x002E, 0}, -{0x249B, 0x0032, 0x0030, 0x002E, 0}, -{0x249C, 0x0028, 0x0061, 0x0029, 0}, -{0x249D, 0x0028, 0x0062, 0x0029, 0}, -{0x249E, 0x0028, 0x0063, 0x0029, 0}, -{0x249F, 0x0028, 0x0064, 0x0029, 0}, -{0x24A0, 0x0028, 0x0065, 0x0029, 0}, -{0x24A1, 0x0028, 0x0066, 0x0029, 0}, -{0x24A2, 0x0028, 0x0067, 0x0029, 0}, -{0x24A3, 0x0028, 0x0068, 0x0029, 0}, -{0x24A4, 0x0028, 0x0069, 0x0029, 0}, -{0x24A5, 0x0028, 0x006A, 0x0029, 0}, -{0x24A6, 0x0028, 0x006B, 0x0029, 0}, -{0x24A7, 0x0028, 0x006C, 0x0029, 0}, -{0x24A8, 0x0028, 0x006D, 0x0029, 0}, -{0x24A9, 0x0028, 0x006E, 0x0029, 0}, -{0x24AA, 0x0028, 0x006F, 0x0029, 0}, -{0x24AB, 0x0028, 0x0070, 0x0029, 0}, -{0x24AC, 0x0028, 0x0071, 0x0029, 0}, -{0x24AD, 0x0028, 0x0072, 0x0029, 0}, -{0x24AE, 0x0028, 0x0073, 0x0029, 0}, -{0x24AF, 0x0028, 0x0074, 0x0029, 0}, -{0x24B0, 0x0028, 0x0075, 0x0029, 0}, -{0x24B1, 0x0028, 0x0076, 0x0029, 0}, -{0x24B2, 0x0028, 0x0077, 0x0029, 0}, -{0x24B3, 0x0028, 0x0078, 0x0029, 0}, -{0x24B4, 0x0028, 0x0079, 0x0029, 0}, -{0x24B5, 0x0028, 0x007A, 0x0029, 0}, -{0x304C, 0x304B, 0x3099, 0}, -{0x304E, 0x304D, 0x3099, 0}, -{0x3050, 0x304F, 0x3099, 0}, -{0x3052, 0x3051, 0x3099, 0}, -{0x3054, 0x3053, 0x3099, 0}, -{0x3056, 0x3055, 0x3099, 0}, -{0x3058, 0x3057, 0x3099, 0}, -{0x305A, 0x3059, 0x3099, 0}, -{0x305C, 0x305B, 0x3099, 0}, -{0x305E, 0x305D, 0x3099, 0}, -{0x3060, 0x305F, 0x3099, 0}, -{0x3062, 0x3061, 0x3099, 0}, -{0x3065, 0x3064, 0x3099, 0}, -{0x3067, 0x3066, 0x3099, 0}, -{0x3069, 0x3068, 0x3099, 0}, -{0x3070, 0x306F, 0x3099, 0}, -{0x3071, 0x306F, 0x309A, 0}, -{0x3073, 0x3072, 0x3099, 0}, -{0x3074, 0x3072, 0x309A, 0}, -{0x3076, 0x3075, 0x3099, 0}, -{0x3077, 0x3075, 0x309A, 0}, -{0x3079, 0x3078, 0x3099, 0}, -{0x307A, 0x3078, 0x309A, 0}, -{0x307C, 0x307B, 0x3099, 0}, -{0x307D, 0x307B, 0x309A, 0}, -{0x3094, 0x3046, 0x3099, 0}, -{0x309E, 0x309D, 0x3099, 0}, -{0x30AC, 0x30AB, 0x3099, 0}, -{0x30AE, 0x30AD, 0x3099, 0}, -{0x30B0, 0x30AF, 0x3099, 0}, -{0x30B2, 0x30B1, 0x3099, 0}, -{0x30B4, 0x30B3, 0x3099, 0}, -{0x30B6, 0x30B5, 0x3099, 0}, -{0x30B8, 0x30B7, 0x3099, 0}, -{0x30BA, 0x30B9, 0x3099, 0}, -{0x30BC, 0x30BB, 0x3099, 0}, -{0x30BE, 0x30BD, 0x3099, 0}, -{0x30C0, 0x30BF, 0x3099, 0}, -{0x30C2, 0x30C1, 0x3099, 0}, -{0x30C5, 0x30C4, 0x3099, 0}, -{0x30C7, 0x30C6, 0x3099, 0}, -{0x30C9, 0x30C8, 0x3099, 0}, -{0x30D0, 0x30CF, 0x3099, 0}, -{0x30D1, 0x30CF, 0x309A, 0}, -{0x30D3, 0x30D2, 0x3099, 0}, -{0x30D4, 0x30D2, 0x309A, 0}, -{0x30D6, 0x30D5, 0x3099, 0}, -{0x30D7, 0x30D5, 0x309A, 0}, -{0x30D9, 0x30D8, 0x3099, 0}, -{0x30DA, 0x30D8, 0x309A, 0}, -{0x30DC, 0x30DB, 0x3099, 0}, -{0x30DD, 0x30DB, 0x309A, 0}, -{0x30F4, 0x30A6, 0x3099, 0}, -{0x30F7, 0x30EF, 0x3099, 0}, -{0x30F8, 0x30F0, 0x3099, 0}, -{0x30F9, 0x30F1, 0x3099, 0}, -{0x30FA, 0x30F2, 0x3099, 0}, -{0x30FE, 0x30FD, 0x3099, 0}, -{0xFB2A, 0x05E9, 0x05C1, 0}, -{0xFB2B, 0x05E9, 0x05C2, 0}, -{0xFB2C, 0x05E9, 0x05BC, 0x05C1, 0}, -{0xFB2D, 0x05E9, 0x05BC, 0x05C2, 0}, -{0xFB2E, 0x05D0, 0x05B7, 0}, -{0xFB2F, 0x05D0, 0x05B8, 0}, -{0xFB30, 0x05D0, 0x05BC, 0}, -{0xFB31, 0x05D1, 0x05BC, 0}, -{0xFB32, 0x05D2, 0x05BC, 0}, -{0xFB33, 0x05D3, 0x05BC, 0}, -{0xFB34, 0x05D4, 0x05BC, 0}, -{0xFB35, 0x05D5, 0x05BC, 0}, -{0xFB36, 0x05D6, 0x05BC, 0}, -{0xFB38, 0x05D8, 0x05BC, 0}, -{0xFB39, 0x05D9, 0x05BC, 0}, -{0xFB3A, 0x05DA, 0x05BC, 0}, -{0xFB3B, 0x05DB, 0x05BC, 0}, -{0xFB3C, 0x05DC, 0x05BC, 0}, -{0xFB3E, 0x05DE, 0x05BC, 0}, -{0xFB40, 0x05E0, 0x05BC, 0}, -{0xFB41, 0x05E1, 0x05BC, 0}, -{0xFB43, 0x05E3, 0x05BC, 0}, -{0xFB44, 0x05E4, 0x05BC, 0}, -{0xFB46, 0x05E6, 0x05BC, 0}, -{0xFB47, 0x05E7, 0x05BC, 0}, -{0xFB48, 0x05E8, 0x05BC, 0}, -{0xFB49, 0x05E9, 0x05BC, 0}, -{0xFB4A, 0x05EA, 0x05BC, 0}, -{0xFB4B, 0x05D5, 0x05B9, 0}, -{0xFB4C, 0x05D1, 0x05BF, 0}, -{0xFB4D, 0x05DB, 0x05BF, 0}, -{0xFB4E, 0x05E4, 0x05BF, 0} +{0x00C0, {0x0041, 0x0300, 0}}, +{0x00C1, {0x0041, 0x0301, 0}}, +{0x00C2, {0x0041, 0x0302, 0}}, +{0x00C3, {0x0041, 0x0303, 0}}, +{0x00C4, {0x0041, 0x0308, 0}}, +{0x00C5, {0x0041, 0x030A, 0}}, +{0x00C7, {0x0043, 0x0327, 0}}, +{0x00C8, {0x0045, 0x0300, 0}}, +{0x00C9, {0x0045, 0x0301, 0}}, +{0x00CA, {0x0045, 0x0302, 0}}, +{0x00CB, {0x0045, 0x0308, 0}}, +{0x00CC, {0x0049, 0x0300, 0}}, +{0x00CD, {0x0049, 0x0301, 0}}, +{0x00CE, {0x0049, 0x0302, 0}}, +{0x00CF, {0x0049, 0x0308, 0}}, +{0x00D1, {0x004E, 0x0303, 0}}, +{0x00D2, {0x004F, 0x0300, 0}}, +{0x00D3, {0x004F, 0x0301, 0}}, +{0x00D4, {0x004F, 0x0302, 0}}, +{0x00D5, {0x004F, 0x0303, 0}}, +{0x00D6, {0x004F, 0x0308, 0}}, +{0x00D9, {0x0055, 0x0300, 0}}, +{0x00DA, {0x0055, 0x0301, 0}}, +{0x00DB, {0x0055, 0x0302, 0}}, +{0x00DC, {0x0055, 0x0308, 0}}, +{0x00DD, {0x0059, 0x0301, 0}}, +{0x00E0, {0x0061, 0x0300, 0}}, +{0x00E1, {0x0061, 0x0301, 0}}, +{0x00E2, {0x0061, 0x0302, 0}}, +{0x00E3, {0x0061, 0x0303, 0}}, +{0x00E4, {0x0061, 0x0308, 0}}, +{0x00E5, {0x0061, 0x030A, 0}}, +{0x00E7, {0x0063, 0x0327, 0}}, +{0x00E8, {0x0065, 0x0300, 0}}, +{0x00E9, {0x0065, 0x0301, 0}}, +{0x00EA, {0x0065, 0x0302, 0}}, +{0x00EB, {0x0065, 0x0308, 0}}, +{0x00EC, {0x0069, 0x0300, 0}}, +{0x00ED, {0x0069, 0x0301, 0}}, +{0x00EE, {0x0069, 0x0302, 0}}, +{0x00EF, {0x0069, 0x0308, 0}}, +{0x00F1, {0x006E, 0x0303, 0}}, +{0x00F2, {0x006F, 0x0300, 0}}, +{0x00F3, {0x006F, 0x0301, 0}}, +{0x00F4, {0x006F, 0x0302, 0}}, +{0x00F5, {0x006F, 0x0303, 0}}, +{0x00F6, {0x006F, 0x0308, 0}}, +{0x00F9, {0x0075, 0x0300, 0}}, +{0x00FA, {0x0075, 0x0301, 0}}, +{0x00FB, {0x0075, 0x0302, 0}}, +{0x00FC, {0x0075, 0x0308, 0}}, +{0x00FD, {0x0079, 0x0301, 0}}, +{0x00FF, {0x0079, 0x0308, 0}}, +{0x0100, {0x0041, 0x0304, 0}}, +{0x0101, {0x0061, 0x0304, 0}}, +{0x0102, {0x0041, 0x0306, 0}}, +{0x0103, {0x0061, 0x0306, 0}}, +{0x0104, {0x0041, 0x0328, 0}}, +{0x0105, {0x0061, 0x0328, 0}}, +{0x0106, {0x0043, 0x0301, 0}}, +{0x0107, {0x0063, 0x0301, 0}}, +{0x0108, {0x0043, 0x0302, 0}}, +{0x0109, {0x0063, 0x0302, 0}}, +{0x010A, {0x0043, 0x0307, 0}}, +{0x010B, {0x0063, 0x0307, 0}}, +{0x010C, {0x0043, 0x030C, 0}}, +{0x010D, {0x0063, 0x030C, 0}}, +{0x010E, {0x0044, 0x030C, 0}}, +{0x010F, {0x0064, 0x030C, 0}}, +{0x0112, {0x0045, 0x0304, 0}}, +{0x0113, {0x0065, 0x0304, 0}}, +{0x0114, {0x0045, 0x0306, 0}}, +{0x0115, {0x0065, 0x0306, 0}}, +{0x0116, {0x0045, 0x0307, 0}}, +{0x0117, {0x0065, 0x0307, 0}}, +{0x0118, {0x0045, 0x0328, 0}}, +{0x0119, {0x0065, 0x0328, 0}}, +{0x011A, {0x0045, 0x030C, 0}}, +{0x011B, {0x0065, 0x030C, 0}}, +{0x011C, {0x0047, 0x0302, 0}}, +{0x011D, {0x0067, 0x0302, 0}}, +{0x011E, {0x0047, 0x0306, 0}}, +{0x011F, {0x0067, 0x0306, 0}}, +{0x0120, {0x0047, 0x0307, 0}}, +{0x0121, {0x0067, 0x0307, 0}}, +{0x0122, {0x0047, 0x0327, 0}}, +{0x0123, {0x0067, 0x0327, 0}}, +{0x0124, {0x0048, 0x0302, 0}}, +{0x0125, {0x0068, 0x0302, 0}}, +{0x0128, {0x0049, 0x0303, 0}}, +{0x0129, {0x0069, 0x0303, 0}}, +{0x012A, {0x0049, 0x0304, 0}}, +{0x012B, {0x0069, 0x0304, 0}}, +{0x012C, {0x0049, 0x0306, 0}}, +{0x012D, {0x0069, 0x0306, 0}}, +{0x012E, {0x0049, 0x0328, 0}}, +{0x012F, {0x0069, 0x0328, 0}}, +{0x0130, {0x0049, 0x0307, 0}}, +{0x0134, {0x004A, 0x0302, 0}}, +{0x0135, {0x006A, 0x0302, 0}}, +{0x0136, {0x004B, 0x0327, 0}}, +{0x0137, {0x006B, 0x0327, 0}}, +{0x0139, {0x004C, 0x0301, 0}}, +{0x013A, {0x006C, 0x0301, 0}}, +{0x013B, {0x004C, 0x0327, 0}}, +{0x013C, {0x006C, 0x0327, 0}}, +{0x013D, {0x004C, 0x030C, 0}}, +{0x013E, {0x006C, 0x030C, 0}}, +{0x0143, {0x004E, 0x0301, 0}}, +{0x0144, {0x006E, 0x0301, 0}}, +{0x0145, {0x004E, 0x0327, 0}}, +{0x0146, {0x006E, 0x0327, 0}}, +{0x0147, {0x004E, 0x030C, 0}}, +{0x0148, {0x006E, 0x030C, 0}}, +{0x014C, {0x004F, 0x0304, 0}}, +{0x014D, {0x006F, 0x0304, 0}}, +{0x014E, {0x004F, 0x0306, 0}}, +{0x014F, {0x006F, 0x0306, 0}}, +{0x0150, {0x004F, 0x030B, 0}}, +{0x0151, {0x006F, 0x030B, 0}}, +{0x0154, {0x0052, 0x0301, 0}}, +{0x0155, {0x0072, 0x0301, 0}}, +{0x0156, {0x0052, 0x0327, 0}}, +{0x0157, {0x0072, 0x0327, 0}}, +{0x0158, {0x0052, 0x030C, 0}}, +{0x0159, {0x0072, 0x030C, 0}}, +{0x015A, {0x0053, 0x0301, 0}}, +{0x015B, {0x0073, 0x0301, 0}}, +{0x015C, {0x0053, 0x0302, 0}}, +{0x015D, {0x0073, 0x0302, 0}}, +{0x015E, {0x0053, 0x0327, 0}}, +{0x015F, {0x0073, 0x0327, 0}}, +{0x0160, {0x0053, 0x030C, 0}}, +{0x0161, {0x0073, 0x030C, 0}}, +{0x0162, {0x0054, 0x0327, 0}}, +{0x0163, {0x0074, 0x0327, 0}}, +{0x0164, {0x0054, 0x030C, 0}}, +{0x0165, {0x0074, 0x030C, 0}}, +{0x0168, {0x0055, 0x0303, 0}}, +{0x0169, {0x0075, 0x0303, 0}}, +{0x016A, {0x0055, 0x0304, 0}}, +{0x016B, {0x0075, 0x0304, 0}}, +{0x016C, {0x0055, 0x0306, 0}}, +{0x016D, {0x0075, 0x0306, 0}}, +{0x016E, {0x0055, 0x030A, 0}}, +{0x016F, {0x0075, 0x030A, 0}}, +{0x0170, {0x0055, 0x030B, 0}}, +{0x0171, {0x0075, 0x030B, 0}}, +{0x0172, {0x0055, 0x0328, 0}}, +{0x0173, {0x0075, 0x0328, 0}}, +{0x0174, {0x0057, 0x0302, 0}}, +{0x0175, {0x0077, 0x0302, 0}}, +{0x0176, {0x0059, 0x0302, 0}}, +{0x0177, {0x0079, 0x0302, 0}}, +{0x0178, {0x0059, 0x0308, 0}}, +{0x0179, {0x005A, 0x0301, 0}}, +{0x017A, {0x007A, 0x0301, 0}}, +{0x017B, {0x005A, 0x0307, 0}}, +{0x017C, {0x007A, 0x0307, 0}}, +{0x017D, {0x005A, 0x030C, 0}}, +{0x017E, {0x007A, 0x030C, 0}}, +{0x01A0, {0x004F, 0x031B, 0}}, +{0x01A1, {0x006F, 0x031B, 0}}, +{0x01AF, {0x0055, 0x031B, 0}}, +{0x01B0, {0x0075, 0x031B, 0}}, +{0x01CD, {0x0041, 0x030C, 0}}, +{0x01CE, {0x0061, 0x030C, 0}}, +{0x01CF, {0x0049, 0x030C, 0}}, +{0x01D0, {0x0069, 0x030C, 0}}, +{0x01D1, {0x004F, 0x030C, 0}}, +{0x01D2, {0x006F, 0x030C, 0}}, +{0x01D3, {0x0055, 0x030C, 0}}, +{0x01D4, {0x0075, 0x030C, 0}}, +{0x01D5, {0x00DC, 0x0304, 0}}, +{0x01D6, {0x00FC, 0x0304, 0}}, +{0x01D7, {0x00DC, 0x0301, 0}}, +{0x01D8, {0x00FC, 0x0301, 0}}, +{0x01D9, {0x00DC, 0x030C, 0}}, +{0x01DA, {0x00FC, 0x030C, 0}}, +{0x01DB, {0x00DC, 0x0300, 0}}, +{0x01DC, {0x00FC, 0x0300, 0}}, +{0x01DE, {0x00C4, 0x0304, 0}}, +{0x01DF, {0x00E4, 0x0304, 0}}, +{0x01E0, {0x0041, 0x0307, 0x0304, 0}}, +{0x01E1, {0x0061, 0x0307, 0x0304, 0}}, +{0x01E2, {0x00C6, 0x0304, 0}}, +{0x01E3, {0x00E6, 0x0304, 0}}, +{0x01E6, {0x0047, 0x030C, 0}}, +{0x01E7, {0x0067, 0x030C, 0}}, +{0x01E8, {0x004B, 0x030C, 0}}, +{0x01E9, {0x006B, 0x030C, 0}}, +{0x01EA, {0x004F, 0x0328, 0}}, +{0x01EB, {0x006F, 0x0328, 0}}, +{0x01EC, {0x01EA, 0x0304, 0}}, +{0x01ED, {0x01EB, 0x0304, 0}}, +{0x01EE, {0x01B7, 0x030C, 0}}, +{0x01EF, {0x0292, 0x030C, 0}}, +{0x01F0, {0x006A, 0x030C, 0}}, +{0x01F4, {0x0047, 0x0301, 0}}, +{0x01F5, {0x0067, 0x0301, 0}}, +{0x01FA, {0x00C5, 0x0301, 0}}, +{0x01FB, {0x00E5, 0x0301, 0}}, +{0x01FC, {0x00C6, 0x0301, 0}}, +{0x01FD, {0x00E6, 0x0301, 0}}, +{0x01FE, {0x00D8, 0x0301, 0}}, +{0x01FF, {0x00F8, 0x0301, 0}}, +{0x0200, {0x0041, 0x030F, 0}}, +{0x0201, {0x0061, 0x030F, 0}}, +{0x0202, {0x0041, 0x0311, 0}}, +{0x0203, {0x0061, 0x0311, 0}}, +{0x0204, {0x0045, 0x030F, 0}}, +{0x0205, {0x0065, 0x030F, 0}}, +{0x0206, {0x0045, 0x0311, 0}}, +{0x0207, {0x0065, 0x0311, 0}}, +{0x0208, {0x0049, 0x030F, 0}}, +{0x0209, {0x0069, 0x030F, 0}}, +{0x020A, {0x0049, 0x0311, 0}}, +{0x020B, {0x0069, 0x0311, 0}}, +{0x020C, {0x004F, 0x030F, 0}}, +{0x020D, {0x006F, 0x030F, 0}}, +{0x020E, {0x004F, 0x0311, 0}}, +{0x020F, {0x006F, 0x0311, 0}}, +{0x0210, {0x0052, 0x030F, 0}}, +{0x0211, {0x0072, 0x030F, 0}}, +{0x0212, {0x0052, 0x0311, 0}}, +{0x0213, {0x0072, 0x0311, 0}}, +{0x0214, {0x0055, 0x030F, 0}}, +{0x0215, {0x0075, 0x030F, 0}}, +{0x0216, {0x0055, 0x0311, 0}}, +{0x0217, {0x0075, 0x0311, 0}}, +{0x0310, {0x0306, 0x0307, 0}}, +{0x0340, {0x0300, 0}}, +{0x0341, {0x0301, 0}}, +{0x0343, {0x0313, 0}}, +{0x0344, {0x0308, 0x030D, 0}}, +{0x0374, {0x02B9, 0}}, +{0x037E, {0x003B, 0}}, +{0x0385, {0x00A8, 0x030D, 0}}, +{0x0386, {0x0391, 0x030D, 0}}, +{0x0387, {0x00B7, 0}}, +{0x0388, {0x0395, 0x030D, 0}}, +{0x0389, {0x0397, 0x030D, 0}}, +{0x038A, {0x0399, 0x030D, 0}}, +{0x038C, {0x039F, 0x030D, 0}}, +{0x038E, {0x03A5, 0x030D, 0}}, +{0x038F, {0x03A9, 0x030D, 0}}, +{0x0390, {0x03B9, 0x0344, 0}}, +{0x03AA, {0x0399, 0x0308, 0}}, +{0x03AB, {0x03A5, 0x0308, 0}}, +{0x03AC, {0x03B1, 0x030D, 0}}, +{0x03AD, {0x03B5, 0x030D, 0}}, +{0x03AE, {0x03B7, 0x030D, 0}}, +{0x03AF, {0x03B9, 0x030D, 0}}, +{0x03B0, {0x03C5, 0x0344, 0}}, +{0x03CA, {0x03B9, 0x0308, 0}}, +{0x03CB, {0x03C5, 0x0308, 0}}, +{0x03CC, {0x03BF, 0x030D, 0}}, +{0x03CD, {0x03C5, 0x030D, 0}}, +{0x03CE, {0x03C9, 0x030D, 0}}, +{0x03D3, {0x03D2, 0x030D, 0}}, +{0x03D4, {0x03D2, 0x0308, 0}}, +{0x0401, {0x0415, 0x0308, 0}}, +{0x0403, {0x0413, 0x0301, 0}}, +{0x0407, {0x0406, 0x0308, 0}}, +{0x040C, {0x041A, 0x0301, 0}}, +{0x040E, {0x0423, 0x0306, 0}}, +{0x0419, {0x0418, 0x0306, 0}}, +{0x0439, {0x0438, 0x0306, 0}}, +{0x0451, {0x0435, 0x0308, 0}}, +{0x0453, {0x0433, 0x0301, 0}}, +{0x0457, {0x0456, 0x0308, 0}}, +{0x045C, {0x043A, 0x0301, 0}}, +{0x045E, {0x0443, 0x0306, 0}}, +{0x0476, {0x0474, 0x030F, 0}}, +{0x0477, {0x0475, 0x030F, 0}}, +{0x04C1, {0x0416, 0x0306, 0}}, +{0x04C2, {0x0436, 0x0306, 0}}, +{0x04D0, {0x0410, 0x0306, 0}}, +{0x04D1, {0x0430, 0x0306, 0}}, +{0x04D2, {0x0410, 0x0308, 0}}, +{0x04D3, {0x0430, 0x0308, 0}}, +{0x04D4, {0x00C6, 0}}, +{0x04D5, {0x00E6, 0}}, +{0x04D6, {0x0415, 0x0306, 0}}, +{0x04D7, {0x0435, 0x0306, 0}}, +{0x04D8, {0x018F, 0}}, +{0x04D9, {0x0259, 0}}, +{0x04DA, {0x018F, 0x0308, 0}}, +{0x04DB, {0x0259, 0x0308, 0}}, +{0x04DC, {0x0416, 0x0308, 0}}, +{0x04DD, {0x0436, 0x0308, 0}}, +{0x04DE, {0x0417, 0x0308, 0}}, +{0x04DF, {0x0437, 0x0308, 0}}, +{0x04E0, {0x01B7, 0}}, +{0x04E1, {0x0292, 0}}, +{0x04E2, {0x0418, 0x0304, 0}}, +{0x04E3, {0x0438, 0x0304, 0}}, +{0x04E4, {0x0418, 0x0308, 0}}, +{0x04E5, {0x0438, 0x0308, 0}}, +{0x04E6, {0x041E, 0x0308, 0}}, +{0x04E7, {0x043E, 0x0308, 0}}, +{0x04E8, {0x019F, 0}}, +{0x04E9, {0x0275, 0}}, +{0x04EA, {0x019F, 0x0308, 0}}, +{0x04EB, {0x0275, 0x0308, 0}}, +{0x04EE, {0x0423, 0x0304, 0}}, +{0x04EF, {0x0443, 0x0304, 0}}, +{0x04F0, {0x0423, 0x0308, 0}}, +{0x04F1, {0x0443, 0x0308, 0}}, +{0x04F2, {0x0423, 0x030B, 0}}, +{0x04F3, {0x0443, 0x030B, 0}}, +{0x04F4, {0x0427, 0x0308, 0}}, +{0x04F5, {0x0447, 0x0308, 0}}, +{0x04F8, {0x042B, 0x0308, 0}}, +{0x04F9, {0x044B, 0x0308, 0}}, +{0x0929, {0x0928, 0x093C, 0}}, +{0x0931, {0x0930, 0x093C, 0}}, +{0x0934, {0x0933, 0x093C, 0}}, +{0x0958, {0x0915, 0x093C, 0}}, +{0x0959, {0x0916, 0x093C, 0}}, +{0x095A, {0x0917, 0x093C, 0}}, +{0x095B, {0x091C, 0x093C, 0}}, +{0x095C, {0x0921, 0x093C, 0}}, +{0x095D, {0x0922, 0x093C, 0}}, +{0x095E, {0x092B, 0x093C, 0}}, +{0x095F, {0x092F, 0x093C, 0}}, +{0x09B0, {0x09AC, 0x09BC, 0}}, +{0x09CB, {0x09C7, 0x09BE, 0}}, +{0x09CC, {0x09C7, 0x09D7, 0}}, +{0x09DC, {0x09A1, 0x09BC, 0}}, +{0x09DD, {0x09A2, 0x09BC, 0}}, +{0x09DF, {0x09AF, 0x09BC, 0}}, +{0x0A59, {0x0A16, 0x0A3C, 0}}, +{0x0A5A, {0x0A17, 0x0A3C, 0}}, +{0x0A5B, {0x0A1C, 0x0A3C, 0}}, +{0x0A5C, {0x0A21, 0x0A3C, 0}}, +{0x0A5E, {0x0A2B, 0x0A3C, 0}}, +{0x0B48, {0x0B47, 0x0B56, 0}}, +{0x0B4B, {0x0B47, 0x0B3E, 0}}, +{0x0B4C, {0x0B47, 0x0B57, 0}}, +{0x0B5C, {0x0B21, 0x0B3C, 0}}, +{0x0B5D, {0x0B22, 0x0B3C, 0}}, +{0x0B5F, {0x0B2F, 0x0B3C, 0}}, +{0x0B94, {0x0B92, 0x0BD7, 0}}, +{0x0BCA, {0x0BC6, 0x0BBE, 0}}, +{0x0BCB, {0x0BC7, 0x0BBE, 0}}, +{0x0BCC, {0x0BC6, 0x0BD7, 0}}, +{0x0C48, {0x0C46, 0x0C56, 0}}, +{0x0CC0, {0x0CBF, 0x0CD5, 0}}, +{0x0CC7, {0x0CC6, 0x0CD5, 0}}, +{0x0CC8, {0x0CC6, 0x0CD6, 0}}, +{0x0CCA, {0x0CC6, 0x0CC2, 0}}, +{0x0CCB, {0x0CC6, 0x0CC2, 0x0CD5, 0}}, +{0x0D4A, {0x0D46, 0x0D3E, 0}}, +{0x0D4B, {0x0D47, 0x0D3E, 0}}, +{0x0D4C, {0x0D46, 0x0D57, 0}}, +{0x0E33, {0x0E4D, 0x0E32, 0}}, +{0x0EB3, {0x0ECD, 0x0EB2, 0}}, +{0x0F43, {0x0F42, 0x0FB7, 0}}, +{0x0F4D, {0x0F4C, 0x0FB7, 0}}, +{0x0F52, {0x0F51, 0x0FB7, 0}}, +{0x0F57, {0x0F56, 0x0FB7, 0}}, +{0x0F5C, {0x0F5B, 0x0FB7, 0}}, +{0x0F69, {0x0F40, 0x0FB5, 0}}, +{0x0F73, {0x0F71, 0x0F72, 0}}, +{0x0F75, {0x0F74, 0x0F71, 0}}, +{0x0F76, {0x0FB2, 0x0F80, 0}}, +{0x0F77, {0x0F76, 0x0F71, 0}}, +{0x0F78, {0x0FB3, 0x0F80, 0}}, +{0x0F79, {0x0F78, 0x0F71, 0}}, +{0x0F81, {0x0F80, 0x0F71, 0}}, +{0x0F93, {0x0F92, 0x0FB7, 0}}, +{0x0F9D, {0x0F9C, 0x0FB7, 0}}, +{0x0FA2, {0x0FA1, 0x0FB7, 0}}, +{0x0FA7, {0x0FA6, 0x0FB7, 0}}, +{0x0FAC, {0x0FAB, 0x0FB7, 0}}, +{0x0FB9, {0x0F90, 0x0FB5, 0}}, +{0x1E00, {0x0041, 0x0325, 0}}, +{0x1E01, {0x0061, 0x0325, 0}}, +{0x1E02, {0x0042, 0x0307, 0}}, +{0x1E03, {0x0062, 0x0307, 0}}, +{0x1E04, {0x0042, 0x0323, 0}}, +{0x1E05, {0x0062, 0x0323, 0}}, +{0x1E06, {0x0042, 0x0331, 0}}, +{0x1E07, {0x0062, 0x0331, 0}}, +{0x1E08, {0x00C7, 0x0301, 0}}, +{0x1E09, {0x00E7, 0x0301, 0}}, +{0x1E0A, {0x0044, 0x0307, 0}}, +{0x1E0B, {0x0064, 0x0307, 0}}, +{0x1E0C, {0x0044, 0x0323, 0}}, +{0x1E0D, {0x0064, 0x0323, 0}}, +{0x1E0E, {0x0044, 0x0331, 0}}, +{0x1E0F, {0x0064, 0x0331, 0}}, +{0x1E10, {0x0044, 0x0327, 0}}, +{0x1E11, {0x0064, 0x0327, 0}}, +{0x1E12, {0x0044, 0x032D, 0}}, +{0x1E13, {0x0064, 0x032D, 0}}, +{0x1E14, {0x0112, 0x0300, 0}}, +{0x1E15, {0x0113, 0x0300, 0}}, +{0x1E16, {0x0112, 0x0301, 0}}, +{0x1E17, {0x0113, 0x0301, 0}}, +{0x1E18, {0x0045, 0x032D, 0}}, +{0x1E19, {0x0065, 0x032D, 0}}, +{0x1E1A, {0x0045, 0x0330, 0}}, +{0x1E1B, {0x0065, 0x0330, 0}}, +{0x1E1C, {0x0114, 0x0327, 0}}, +{0x1E1D, {0x0115, 0x0327, 0}}, +{0x1E1E, {0x0046, 0x0307, 0}}, +{0x1E1F, {0x0066, 0x0307, 0}}, +{0x1E20, {0x0047, 0x0304, 0}}, +{0x1E21, {0x0067, 0x0304, 0}}, +{0x1E22, {0x0048, 0x0307, 0}}, +{0x1E23, {0x0068, 0x0307, 0}}, +{0x1E24, {0x0048, 0x0323, 0}}, +{0x1E25, {0x0068, 0x0323, 0}}, +{0x1E26, {0x0048, 0x0308, 0}}, +{0x1E27, {0x0068, 0x0308, 0}}, +{0x1E28, {0x0048, 0x0327, 0}}, +{0x1E29, {0x0068, 0x0327, 0}}, +{0x1E2A, {0x0048, 0x032E, 0}}, +{0x1E2B, {0x0068, 0x032E, 0}}, +{0x1E2C, {0x0049, 0x0330, 0}}, +{0x1E2D, {0x0069, 0x0330, 0}}, +{0x1E2E, {0x00CF, 0x0301, 0}}, +{0x1E2F, {0x00EF, 0x0301, 0}}, +{0x1E30, {0x004B, 0x0301, 0}}, +{0x1E31, {0x006B, 0x0301, 0}}, +{0x1E32, {0x004B, 0x0323, 0}}, +{0x1E33, {0x006B, 0x0323, 0}}, +{0x1E34, {0x004B, 0x0331, 0}}, +{0x1E35, {0x006B, 0x0331, 0}}, +{0x1E36, {0x004C, 0x0323, 0}}, +{0x1E37, {0x006C, 0x0323, 0}}, +{0x1E38, {0x1E36, 0x0304, 0}}, +{0x1E39, {0x1E37, 0x0304, 0}}, +{0x1E3A, {0x004C, 0x0331, 0}}, +{0x1E3B, {0x006C, 0x0331, 0}}, +{0x1E3C, {0x004C, 0x032D, 0}}, +{0x1E3D, {0x006C, 0x032D, 0}}, +{0x1E3E, {0x004D, 0x0301, 0}}, +{0x1E3F, {0x006D, 0x0301, 0}}, +{0x1E40, {0x004D, 0x0307, 0}}, +{0x1E41, {0x006D, 0x0307, 0}}, +{0x1E42, {0x004D, 0x0323, 0}}, +{0x1E43, {0x006D, 0x0323, 0}}, +{0x1E44, {0x004E, 0x0307, 0}}, +{0x1E45, {0x006E, 0x0307, 0}}, +{0x1E46, {0x004E, 0x0323, 0}}, +{0x1E47, {0x006E, 0x0323, 0}}, +{0x1E48, {0x004E, 0x0331, 0}}, +{0x1E49, {0x006E, 0x0331, 0}}, +{0x1E4A, {0x004E, 0x032D, 0}}, +{0x1E4B, {0x006E, 0x032D, 0}}, +{0x1E4C, {0x00D5, 0x0301, 0}}, +{0x1E4D, {0x00F5, 0x0301, 0}}, +{0x1E4E, {0x00D5, 0x0308, 0}}, +{0x1E4F, {0x00F5, 0x0308, 0}}, +{0x1E50, {0x014C, 0x0300, 0}}, +{0x1E51, {0x014D, 0x0300, 0}}, +{0x1E52, {0x014C, 0x0301, 0}}, +{0x1E53, {0x014D, 0x0301, 0}}, +{0x1E54, {0x0050, 0x0301, 0}}, +{0x1E55, {0x0070, 0x0301, 0}}, +{0x1E56, {0x0050, 0x0307, 0}}, +{0x1E57, {0x0070, 0x0307, 0}}, +{0x1E58, {0x0052, 0x0307, 0}}, +{0x1E59, {0x0072, 0x0307, 0}}, +{0x1E5A, {0x0052, 0x0323, 0}}, +{0x1E5B, {0x0072, 0x0323, 0}}, +{0x1E5C, {0x1E5A, 0x0304, 0}}, +{0x1E5D, {0x1E5B, 0x0304, 0}}, +{0x1E5E, {0x0052, 0x0331, 0}}, +{0x1E5F, {0x0072, 0x0331, 0}}, +{0x1E60, {0x0053, 0x0307, 0}}, +{0x1E61, {0x0073, 0x0307, 0}}, +{0x1E62, {0x0053, 0x0323, 0}}, +{0x1E63, {0x0073, 0x0323, 0}}, +{0x1E64, {0x015A, 0x0307, 0}}, +{0x1E65, {0x015B, 0x0307, 0}}, +{0x1E66, {0x0160, 0x0307, 0}}, +{0x1E67, {0x0161, 0x0307, 0}}, +{0x1E68, {0x1E62, 0x0307, 0}}, +{0x1E69, {0x1E63, 0x0307, 0}}, +{0x1E6A, {0x0054, 0x0307, 0}}, +{0x1E6B, {0x0074, 0x0307, 0}}, +{0x1E6C, {0x0054, 0x0323, 0}}, +{0x1E6D, {0x0074, 0x0323, 0}}, +{0x1E6E, {0x0054, 0x0331, 0}}, +{0x1E6F, {0x0074, 0x0331, 0}}, +{0x1E70, {0x0054, 0x032D, 0}}, +{0x1E71, {0x0074, 0x032D, 0}}, +{0x1E72, {0x0055, 0x0324, 0}}, +{0x1E73, {0x0075, 0x0324, 0}}, +{0x1E74, {0x0055, 0x0330, 0}}, +{0x1E75, {0x0075, 0x0330, 0}}, +{0x1E76, {0x0055, 0x032D, 0}}, +{0x1E77, {0x0075, 0x032D, 0}}, +{0x1E78, {0x0168, 0x0301, 0}}, +{0x1E79, {0x0169, 0x0301, 0}}, +{0x1E7A, {0x016A, 0x0308, 0}}, +{0x1E7B, {0x016B, 0x0308, 0}}, +{0x1E7C, {0x0056, 0x0303, 0}}, +{0x1E7D, {0x0076, 0x0303, 0}}, +{0x1E7E, {0x0056, 0x0323, 0}}, +{0x1E7F, {0x0076, 0x0323, 0}}, +{0x1E80, {0x0057, 0x0300, 0}}, +{0x1E81, {0x0077, 0x0300, 0}}, +{0x1E82, {0x0057, 0x0301, 0}}, +{0x1E83, {0x0077, 0x0301, 0}}, +{0x1E84, {0x0057, 0x0308, 0}}, +{0x1E85, {0x0077, 0x0308, 0}}, +{0x1E86, {0x0057, 0x0307, 0}}, +{0x1E87, {0x0077, 0x0307, 0}}, +{0x1E88, {0x0057, 0x0323, 0}}, +{0x1E89, {0x0077, 0x0323, 0}}, +{0x1E8A, {0x0058, 0x0307, 0}}, +{0x1E8B, {0x0078, 0x0307, 0}}, +{0x1E8C, {0x0058, 0x0308, 0}}, +{0x1E8D, {0x0078, 0x0308, 0}}, +{0x1E8E, {0x0059, 0x0307, 0}}, +{0x1E8F, {0x0079, 0x0307, 0}}, +{0x1E90, {0x005A, 0x0302, 0}}, +{0x1E91, {0x007A, 0x0302, 0}}, +{0x1E92, {0x005A, 0x0323, 0}}, +{0x1E93, {0x007A, 0x0323, 0}}, +{0x1E94, {0x005A, 0x0331, 0}}, +{0x1E95, {0x007A, 0x0331, 0}}, +{0x1E96, {0x0068, 0x0331, 0}}, +{0x1E97, {0x0074, 0x0308, 0}}, +{0x1E98, {0x0077, 0x030A, 0}}, +{0x1E99, {0x0079, 0x030A, 0}}, +{0x1E9B, {0x017F, 0x0307, 0}}, +{0x1EA0, {0x0041, 0x0323, 0}}, +{0x1EA1, {0x0061, 0x0323, 0}}, +{0x1EA2, {0x0041, 0x0309, 0}}, +{0x1EA3, {0x0061, 0x0309, 0}}, +{0x1EA4, {0x00C2, 0x0301, 0}}, +{0x1EA5, {0x00E2, 0x0301, 0}}, +{0x1EA6, {0x00C2, 0x0300, 0}}, +{0x1EA7, {0x00E2, 0x0300, 0}}, +{0x1EA8, {0x00C2, 0x0309, 0}}, +{0x1EA9, {0x00E2, 0x0309, 0}}, +{0x1EAA, {0x00C2, 0x0303, 0}}, +{0x1EAB, {0x00E2, 0x0303, 0}}, +{0x1EAC, {0x00C2, 0x0323, 0}}, +{0x1EAD, {0x00E2, 0x0323, 0}}, +{0x1EAE, {0x0102, 0x0301, 0}}, +{0x1EAF, {0x0103, 0x0301, 0}}, +{0x1EB0, {0x0102, 0x0300, 0}}, +{0x1EB1, {0x0103, 0x0300, 0}}, +{0x1EB2, {0x0102, 0x0309, 0}}, +{0x1EB3, {0x0103, 0x0309, 0}}, +{0x1EB4, {0x0102, 0x0303, 0}}, +{0x1EB5, {0x0103, 0x0303, 0}}, +{0x1EB6, {0x0102, 0x0323, 0}}, +{0x1EB7, {0x0103, 0x0323, 0}}, +{0x1EB8, {0x0045, 0x0323, 0}}, +{0x1EB9, {0x0065, 0x0323, 0}}, +{0x1EBA, {0x0045, 0x0309, 0}}, +{0x1EBB, {0x0065, 0x0309, 0}}, +{0x1EBC, {0x0045, 0x0303, 0}}, +{0x1EBD, {0x0065, 0x0303, 0}}, +{0x1EBE, {0x00CA, 0x0301, 0}}, +{0x1EBF, {0x00EA, 0x0301, 0}}, +{0x1EC0, {0x00CA, 0x0300, 0}}, +{0x1EC1, {0x00EA, 0x0300, 0}}, +{0x1EC2, {0x00CA, 0x0309, 0}}, +{0x1EC3, {0x00EA, 0x0309, 0}}, +{0x1EC4, {0x00CA, 0x0303, 0}}, +{0x1EC5, {0x00EA, 0x0303, 0}}, +{0x1EC6, {0x00CA, 0x0323, 0}}, +{0x1EC7, {0x00EA, 0x0323, 0}}, +{0x1EC8, {0x0049, 0x0309, 0}}, +{0x1EC9, {0x0069, 0x0309, 0}}, +{0x1ECA, {0x0049, 0x0323, 0}}, +{0x1ECB, {0x0069, 0x0323, 0}}, +{0x1ECC, {0x004F, 0x0323, 0}}, +{0x1ECD, {0x006F, 0x0323, 0}}, +{0x1ECE, {0x004F, 0x0309, 0}}, +{0x1ECF, {0x006F, 0x0309, 0}}, +{0x1ED0, {0x00D4, 0x0301, 0}}, +{0x1ED1, {0x00F4, 0x0301, 0}}, +{0x1ED2, {0x00D4, 0x0300, 0}}, +{0x1ED3, {0x00F4, 0x0300, 0}}, +{0x1ED4, {0x00D4, 0x0309, 0}}, +{0x1ED5, {0x00F4, 0x0309, 0}}, +{0x1ED6, {0x00D4, 0x0303, 0}}, +{0x1ED7, {0x00F4, 0x0303, 0}}, +{0x1ED8, {0x00D4, 0x0323, 0}}, +{0x1ED9, {0x00F4, 0x0323, 0}}, +{0x1EDA, {0x01A0, 0x0301, 0}}, +{0x1EDB, {0x01A1, 0x0301, 0}}, +{0x1EDC, {0x01A0, 0x0300, 0}}, +{0x1EDD, {0x01A1, 0x0300, 0}}, +{0x1EDE, {0x01A0, 0x0309, 0}}, +{0x1EDF, {0x01A1, 0x0309, 0}}, +{0x1EE0, {0x01A0, 0x0303, 0}}, +{0x1EE1, {0x01A1, 0x0303, 0}}, +{0x1EE2, {0x01A0, 0x0323, 0}}, +{0x1EE3, {0x01A1, 0x0323, 0}}, +{0x1EE4, {0x0055, 0x0323, 0}}, +{0x1EE5, {0x0075, 0x0323, 0}}, +{0x1EE6, {0x0055, 0x0309, 0}}, +{0x1EE7, {0x0075, 0x0309, 0}}, +{0x1EE8, {0x01AF, 0x0301, 0}}, +{0x1EE9, {0x01B0, 0x0301, 0}}, +{0x1EEA, {0x01AF, 0x0300, 0}}, +{0x1EEB, {0x01B0, 0x0300, 0}}, +{0x1EEC, {0x01AF, 0x0309, 0}}, +{0x1EED, {0x01B0, 0x0309, 0}}, +{0x1EEE, {0x01AF, 0x0303, 0}}, +{0x1EEF, {0x01B0, 0x0303, 0}}, +{0x1EF0, {0x01AF, 0x0323, 0}}, +{0x1EF1, {0x01B0, 0x0323, 0}}, +{0x1EF2, {0x0059, 0x0300, 0}}, +{0x1EF3, {0x0079, 0x0300, 0}}, +{0x1EF4, {0x0059, 0x0323, 0}}, +{0x1EF5, {0x0079, 0x0323, 0}}, +{0x1EF6, {0x0059, 0x0309, 0}}, +{0x1EF7, {0x0079, 0x0309, 0}}, +{0x1EF8, {0x0059, 0x0303, 0}}, +{0x1EF9, {0x0079, 0x0303, 0}}, +{0x1F00, {0x03B1, 0x0313, 0}}, +{0x1F01, {0x03B1, 0x0314, 0}}, +{0x1F02, {0x1F00, 0x0300, 0}}, +{0x1F03, {0x1F01, 0x0300, 0}}, +{0x1F04, {0x1F00, 0x0301, 0}}, +{0x1F05, {0x1F01, 0x0301, 0}}, +{0x1F06, {0x1F00, 0x0342, 0}}, +{0x1F07, {0x1F01, 0x0342, 0}}, +{0x1F08, {0x0391, 0x0313, 0}}, +{0x1F09, {0x0391, 0x0314, 0}}, +{0x1F0A, {0x1F08, 0x0300, 0}}, +{0x1F0B, {0x1F09, 0x0300, 0}}, +{0x1F0C, {0x1F08, 0x0301, 0}}, +{0x1F0D, {0x1F09, 0x0301, 0}}, +{0x1F0E, {0x1F08, 0x0342, 0}}, +{0x1F0F, {0x1F09, 0x0342, 0}}, +{0x1F10, {0x03B5, 0x0313, 0}}, +{0x1F11, {0x03B5, 0x0314, 0}}, +{0x1F12, {0x1F10, 0x0300, 0}}, +{0x1F13, {0x1F11, 0x0300, 0}}, +{0x1F14, {0x1F10, 0x0301, 0}}, +{0x1F15, {0x1F11, 0x0301, 0}}, +{0x1F18, {0x0395, 0x0313, 0}}, +{0x1F19, {0x0395, 0x0314, 0}}, +{0x1F1A, {0x1F18, 0x0300, 0}}, +{0x1F1B, {0x1F19, 0x0300, 0}}, +{0x1F1C, {0x1F18, 0x0301, 0}}, +{0x1F1D, {0x1F19, 0x0301, 0}}, +{0x1F20, {0x03B7, 0x0313, 0}}, +{0x1F21, {0x03B7, 0x0314, 0}}, +{0x1F22, {0x1F20, 0x0300, 0}}, +{0x1F23, {0x1F21, 0x0300, 0}}, +{0x1F24, {0x1F20, 0x0301, 0}}, +{0x1F25, {0x1F21, 0x0301, 0}}, +{0x1F26, {0x1F20, 0x0342, 0}}, +{0x1F27, {0x1F21, 0x0342, 0}}, +{0x1F28, {0x0397, 0x0313, 0}}, +{0x1F29, {0x0397, 0x0314, 0}}, +{0x1F2A, {0x1F28, 0x0300, 0}}, +{0x1F2B, {0x1F29, 0x0300, 0}}, +{0x1F2C, {0x1F28, 0x0301, 0}}, +{0x1F2D, {0x1F29, 0x0301, 0}}, +{0x1F2E, {0x1F28, 0x0342, 0}}, +{0x1F2F, {0x1F29, 0x0342, 0}}, +{0x1F30, {0x03B9, 0x0313, 0}}, +{0x1F31, {0x03B9, 0x0314, 0}}, +{0x1F32, {0x1F30, 0x0300, 0}}, +{0x1F33, {0x1F31, 0x0300, 0}}, +{0x1F34, {0x1F30, 0x0301, 0}}, +{0x1F35, {0x1F31, 0x0301, 0}}, +{0x1F36, {0x1F30, 0x0342, 0}}, +{0x1F37, {0x1F31, 0x0342, 0}}, +{0x1F38, {0x0399, 0x0313, 0}}, +{0x1F39, {0x0399, 0x0314, 0}}, +{0x1F3A, {0x1F38, 0x0300, 0}}, +{0x1F3B, {0x1F39, 0x0300, 0}}, +{0x1F3C, {0x1F38, 0x0301, 0}}, +{0x1F3D, {0x1F39, 0x0301, 0}}, +{0x1F3E, {0x1F38, 0x0342, 0}}, +{0x1F3F, {0x1F39, 0x0342, 0}}, +{0x1F40, {0x03BF, 0x0313, 0}}, +{0x1F41, {0x03BF, 0x0314, 0}}, +{0x1F42, {0x1F40, 0x0300, 0}}, +{0x1F43, {0x1F41, 0x0300, 0}}, +{0x1F44, {0x1F40, 0x0301, 0}}, +{0x1F45, {0x1F41, 0x0301, 0}}, +{0x1F48, {0x039F, 0x0313, 0}}, +{0x1F49, {0x039F, 0x0314, 0}}, +{0x1F4A, {0x1F48, 0x0300, 0}}, +{0x1F4B, {0x1F49, 0x0300, 0}}, +{0x1F4C, {0x1F48, 0x0301, 0}}, +{0x1F4D, {0x1F49, 0x0301, 0}}, +{0x1F50, {0x03C5, 0x0313, 0}}, +{0x1F51, {0x03C5, 0x0314, 0}}, +{0x1F52, {0x1F50, 0x0300, 0}}, +{0x1F53, {0x1F51, 0x0300, 0}}, +{0x1F54, {0x1F50, 0x0301, 0}}, +{0x1F55, {0x1F51, 0x0301, 0}}, +{0x1F56, {0x1F50, 0x0342, 0}}, +{0x1F57, {0x1F51, 0x0342, 0}}, +{0x1F59, {0x03A5, 0x0314, 0}}, +{0x1F5B, {0x1F59, 0x0300, 0}}, +{0x1F5D, {0x1F59, 0x0301, 0}}, +{0x1F5F, {0x1F59, 0x0342, 0}}, +{0x1F60, {0x03C9, 0x0313, 0}}, +{0x1F61, {0x03C9, 0x0314, 0}}, +{0x1F62, {0x1F60, 0x0300, 0}}, +{0x1F63, {0x1F61, 0x0300, 0}}, +{0x1F64, {0x1F60, 0x0301, 0}}, +{0x1F65, {0x1F61, 0x0301, 0}}, +{0x1F66, {0x1F60, 0x0342, 0}}, +{0x1F67, {0x1F61, 0x0342, 0}}, +{0x1F68, {0x03A9, 0x0313, 0}}, +{0x1F69, {0x03A9, 0x0314, 0}}, +{0x1F6A, {0x1F68, 0x0300, 0}}, +{0x1F6B, {0x1F69, 0x0300, 0}}, +{0x1F6C, {0x1F68, 0x0301, 0}}, +{0x1F6D, {0x1F69, 0x0301, 0}}, +{0x1F6E, {0x1F68, 0x0342, 0}}, +{0x1F6F, {0x1F69, 0x0342, 0}}, +{0x1F70, {0x03B1, 0x0300, 0}}, +{0x1F71, {0x03B1, 0x0301, 0}}, +{0x1F72, {0x03B5, 0x0300, 0}}, +{0x1F73, {0x03B5, 0x0301, 0}}, +{0x1F74, {0x03B7, 0x0300, 0}}, +{0x1F75, {0x03B7, 0x0301, 0}}, +{0x1F76, {0x03B9, 0x0300, 0}}, +{0x1F77, {0x03B9, 0x0301, 0}}, +{0x1F78, {0x03BF, 0x0300, 0}}, +{0x1F79, {0x03BF, 0x0301, 0}}, +{0x1F7A, {0x03C5, 0x0300, 0}}, +{0x1F7B, {0x03C5, 0x0301, 0}}, +{0x1F7C, {0x03C9, 0x0300, 0}}, +{0x1F7D, {0x03C9, 0x0301, 0}}, +{0x1F80, {0x1F00, 0x0345, 0}}, +{0x1F81, {0x1F01, 0x0345, 0}}, +{0x1F82, {0x1F02, 0x0345, 0}}, +{0x1F83, {0x1F03, 0x0345, 0}}, +{0x1F84, {0x1F04, 0x0345, 0}}, +{0x1F85, {0x1F05, 0x0345, 0}}, +{0x1F86, {0x1F06, 0x0345, 0}}, +{0x1F87, {0x1F07, 0x0345, 0}}, +{0x1F88, {0x1F08, 0x0345, 0}}, +{0x1F89, {0x1F09, 0x0345, 0}}, +{0x1F8A, {0x1F0A, 0x0345, 0}}, +{0x1F8B, {0x1F0B, 0x0345, 0}}, +{0x1F8C, {0x1F0C, 0x0345, 0}}, +{0x1F8D, {0x1F0D, 0x0345, 0}}, +{0x1F8E, {0x1F0E, 0x0345, 0}}, +{0x1F8F, {0x1F0F, 0x0345, 0}}, +{0x1F90, {0x1F20, 0x0345, 0}}, +{0x1F91, {0x1F21, 0x0345, 0}}, +{0x1F92, {0x1F22, 0x0345, 0}}, +{0x1F93, {0x1F23, 0x0345, 0}}, +{0x1F94, {0x1F24, 0x0345, 0}}, +{0x1F95, {0x1F25, 0x0345, 0}}, +{0x1F96, {0x1F26, 0x0345, 0}}, +{0x1F97, {0x1F27, 0x0345, 0}}, +{0x1F98, {0x1F28, 0x0345, 0}}, +{0x1F99, {0x1F29, 0x0345, 0}}, +{0x1F9A, {0x1F2A, 0x0345, 0}}, +{0x1F9B, {0x1F2B, 0x0345, 0}}, +{0x1F9C, {0x1F2C, 0x0345, 0}}, +{0x1F9D, {0x1F2D, 0x0345, 0}}, +{0x1F9E, {0x1F2E, 0x0345, 0}}, +{0x1F9F, {0x1F2F, 0x0345, 0}}, +{0x1FA0, {0x1F60, 0x0345, 0}}, +{0x1FA1, {0x1F61, 0x0345, 0}}, +{0x1FA2, {0x1F62, 0x0345, 0}}, +{0x1FA3, {0x1F63, 0x0345, 0}}, +{0x1FA4, {0x1F64, 0x0345, 0}}, +{0x1FA5, {0x1F65, 0x0345, 0}}, +{0x1FA6, {0x1F66, 0x0345, 0}}, +{0x1FA7, {0x1F67, 0x0345, 0}}, +{0x1FA8, {0x1F68, 0x0345, 0}}, +{0x1FA9, {0x1F69, 0x0345, 0}}, +{0x1FAA, {0x1F6A, 0x0345, 0}}, +{0x1FAB, {0x1F6B, 0x0345, 0}}, +{0x1FAC, {0x1F6C, 0x0345, 0}}, +{0x1FAD, {0x1F6D, 0x0345, 0}}, +{0x1FAE, {0x1F6E, 0x0345, 0}}, +{0x1FAF, {0x1F6F, 0x0345, 0}}, +{0x1FB0, {0x03B1, 0x0306, 0}}, +{0x1FB1, {0x03B1, 0x0304, 0}}, +{0x1FB2, {0x1F70, 0x0345, 0}}, +{0x1FB3, {0x03B1, 0x0345, 0}}, +{0x1FB4, {0x1F71, 0x0345, 0}}, +{0x1FB6, {0x03B1, 0x0342, 0}}, +{0x1FB7, {0x1FB6, 0x0345, 0}}, +{0x1FB8, {0x0391, 0x0306, 0}}, +{0x1FB9, {0x0391, 0x0304, 0}}, +{0x1FBA, {0x0391, 0x0300, 0}}, +{0x1FBB, {0x0391, 0x0301, 0}}, +{0x1FBC, {0x0391, 0x0345, 0}}, +{0x1FBE, {0x0399, 0}}, +{0x1FC1, {0x00A8, 0x0342, 0}}, +{0x1FC2, {0x1F74, 0x0345, 0}}, +{0x1FC3, {0x03B7, 0x0345, 0}}, +{0x1FC4, {0x1F75, 0x0345, 0}}, +{0x1FC6, {0x03B7, 0x0342, 0}}, +{0x1FC7, {0x1FC6, 0x0345, 0}}, +{0x1FC8, {0x0395, 0x0300, 0}}, +{0x1FC9, {0x0395, 0x0301, 0}}, +{0x1FCA, {0x0397, 0x0300, 0}}, +{0x1FCB, {0x0397, 0x0301, 0}}, +{0x1FCC, {0x0397, 0x0345, 0}}, +{0x1FCD, {0x1FBF, 0x0300, 0}}, +{0x1FCE, {0x1FBF, 0x0301, 0}}, +{0x1FCF, {0x1FBF, 0x0342, 0}}, +{0x1FD0, {0x03B9, 0x0306, 0}}, +{0x1FD1, {0x03B9, 0x0304, 0}}, +{0x1FD2, {0x03CA, 0x0300, 0}}, +{0x1FD3, {0x03CA, 0x0301, 0}}, +{0x1FD6, {0x03B9, 0x0342, 0}}, +{0x1FD7, {0x03CA, 0x0342, 0}}, +{0x1FD8, {0x0399, 0x0306, 0}}, +{0x1FD9, {0x0399, 0x0304, 0}}, +{0x1FDA, {0x0399, 0x0300, 0}}, +{0x1FDB, {0x0399, 0x0301, 0}}, +{0x1FDD, {0x1FFE, 0x0300, 0}}, +{0x1FDE, {0x1FFE, 0x0301, 0}}, +{0x1FDF, {0x1FFE, 0x0342, 0}}, +{0x1FE0, {0x03C5, 0x0306, 0}}, +{0x1FE1, {0x03C5, 0x0304, 0}}, +{0x1FE2, {0x03CB, 0x0300, 0}}, +{0x1FE3, {0x03CB, 0x0301, 0}}, +{0x1FE4, {0x03C1, 0x0313, 0}}, +{0x1FE5, {0x03C1, 0x0314, 0}}, +{0x1FE6, {0x03C5, 0x0342, 0}}, +{0x1FE7, {0x03CB, 0x0342, 0}}, +{0x1FE8, {0x03A5, 0x0306, 0}}, +{0x1FE9, {0x03A5, 0x0304, 0}}, +{0x1FEA, {0x03A5, 0x0300, 0}}, +{0x1FEB, {0x03A5, 0x0301, 0}}, +{0x1FEC, {0x03A1, 0x0314, 0}}, +{0x1FED, {0x00A8, 0x0300, 0}}, +{0x1FEE, {0x00A8, 0x0301, 0}}, +{0x1FEF, {0x0060, 0}}, +{0x1FF2, {0x1F7C, 0x0345, 0}}, +{0x1FF3, {0x03C9, 0x0345, 0}}, +{0x1FF4, {0x1F79, 0x0345, 0}}, +{0x1FF6, {0x03C9, 0x0342, 0}}, +{0x1FF7, {0x1FF6, 0x0345, 0}}, +{0x1FF8, {0x039F, 0x0300, 0}}, +{0x1FF9, {0x039F, 0x0301, 0}}, +{0x1FFA, {0x03A9, 0x0300, 0}}, +{0x1FFB, {0x03A9, 0x0301, 0}}, +{0x1FFC, {0x03A9, 0x0345, 0}}, +{0x1FFD, {0x00B4, 0}}, +{0x2000, {0x2002, 0}}, +{0x2001, {0x2003, 0}}, +{0x2126, {0x03A9, 0}}, +{0x212A, {0x004B, 0}}, +{0x212B, {0x00C5, 0}}, +{0x2204, {0x2203, 0x0338, 0}}, +{0x2209, {0x2208, 0x0338, 0}}, +{0x220C, {0x220B, 0x0338, 0}}, +{0x2224, {0x2223, 0x0338, 0}}, +{0x2226, {0x2225, 0x0338, 0}}, +{0x2241, {0x007E, 0x0338, 0}}, +{0x2244, {0x2243, 0x0338, 0}}, +{0x2247, {0x2245, 0x0338, 0}}, +{0x2249, {0x2248, 0x0338, 0}}, +{0x2260, {0x003D, 0x0338, 0}}, +{0x2262, {0x2261, 0x0338, 0}}, +{0x226D, {0x224D, 0x0338, 0}}, +{0x226E, {0x003C, 0x0338, 0}}, +{0x226F, {0x003E, 0x0338, 0}}, +{0x2270, {0x2264, 0x0338, 0}}, +{0x2271, {0x2265, 0x0338, 0}}, +{0x2274, {0x2272, 0x0338, 0}}, +{0x2275, {0x2273, 0x0338, 0}}, +{0x2278, {0x2276, 0x0338, 0}}, +{0x2279, {0x2277, 0x0338, 0}}, +{0x2280, {0x227A, 0x0338, 0}}, +{0x2281, {0x227B, 0x0338, 0}}, +{0x2284, {0x2282, 0x0338, 0}}, +{0x2285, {0x2283, 0x0338, 0}}, +{0x2288, {0x2286, 0x0338, 0}}, +{0x2289, {0x2287, 0x0338, 0}}, +{0x22AC, {0x22A2, 0x0338, 0}}, +{0x22AD, {0x22A8, 0x0338, 0}}, +{0x22AE, {0x22A9, 0x0338, 0}}, +{0x22AF, {0x22AB, 0x0338, 0}}, +{0x22E0, {0x227C, 0x0338, 0}}, +{0x22E1, {0x227D, 0x0338, 0}}, +{0x22E2, {0x2291, 0x0338, 0}}, +{0x22E3, {0x2292, 0x0338, 0}}, +{0x22EA, {0x22B2, 0x0338, 0}}, +{0x22EB, {0x22B3, 0x0338, 0}}, +{0x22EC, {0x22B4, 0x0338, 0}}, +{0x22ED, {0x22B5, 0x0338, 0}}, +{0x2329, {0x3008, 0}}, +{0x232A, {0x3009, 0}}, +{0x2474, {0x0028, 0x0031, 0x0029, 0}}, +{0x2475, {0x0028, 0x0032, 0x0029, 0}}, +{0x2476, {0x0028, 0x0033, 0x0029, 0}}, +{0x2477, {0x0028, 0x0034, 0x0029, 0}}, +{0x2478, {0x0028, 0x0035, 0x0029, 0}}, +{0x2479, {0x0028, 0x0036, 0x0029, 0}}, +{0x247A, {0x0028, 0x0037, 0x0029, 0}}, +{0x247B, {0x0028, 0x0038, 0x0029, 0}}, +{0x247C, {0x0028, 0x0039, 0x0029, 0}}, +{0x247D, {0x0028, 0x0031, 0x0030, 0x0029, 0}}, +{0x247E, {0x0028, 0x0031, 0x0031, 0x0029, 0}}, +{0x247F, {0x0028, 0x0031, 0x0032, 0x0029, 0}}, +{0x2480, {0x0028, 0x0031, 0x0033, 0x0029, 0}}, +{0x2481, {0x0028, 0x0031, 0x0034, 0x0029, 0}}, +{0x2482, {0x0028, 0x0031, 0x0035, 0x0029, 0}}, +{0x2483, {0x0028, 0x0031, 0x0036, 0x0029, 0}}, +{0x2484, {0x0028, 0x0031, 0x0037, 0x0029, 0}}, +{0x2485, {0x0028, 0x0031, 0x0038, 0x0029, 0}}, +{0x2486, {0x0028, 0x0031, 0x0039, 0x0029, 0}}, +{0x2487, {0x0028, 0x0032, 0x0030, 0x0029, 0}}, +{0x2488, {0x0031, 0x002E, 0}}, +{0x2489, {0x0032, 0x002E, 0}}, +{0x248A, {0x0033, 0x002E, 0}}, +{0x248B, {0x0034, 0x002E, 0}}, +{0x248C, {0x0035, 0x002E, 0}}, +{0x248D, {0x0036, 0x002E, 0}}, +{0x248E, {0x0037, 0x002E, 0}}, +{0x248F, {0x0038, 0x002E, 0}}, +{0x2490, {0x0039, 0x002E, 0}}, +{0x2491, {0x0031, 0x0030, 0x002E, 0}}, +{0x2492, {0x0031, 0x0031, 0x002E, 0}}, +{0x2493, {0x0031, 0x0032, 0x002E, 0}}, +{0x2494, {0x0031, 0x0033, 0x002E, 0}}, +{0x2495, {0x0031, 0x0034, 0x002E, 0}}, +{0x2496, {0x0031, 0x0035, 0x002E, 0}}, +{0x2497, {0x0031, 0x0036, 0x002E, 0}}, +{0x2498, {0x0031, 0x0037, 0x002E, 0}}, +{0x2499, {0x0031, 0x0038, 0x002E, 0}}, +{0x249A, {0x0031, 0x0039, 0x002E, 0}}, +{0x249B, {0x0032, 0x0030, 0x002E, 0}}, +{0x249C, {0x0028, 0x0061, 0x0029, 0}}, +{0x249D, {0x0028, 0x0062, 0x0029, 0}}, +{0x249E, {0x0028, 0x0063, 0x0029, 0}}, +{0x249F, {0x0028, 0x0064, 0x0029, 0}}, +{0x24A0, {0x0028, 0x0065, 0x0029, 0}}, +{0x24A1, {0x0028, 0x0066, 0x0029, 0}}, +{0x24A2, {0x0028, 0x0067, 0x0029, 0}}, +{0x24A3, {0x0028, 0x0068, 0x0029, 0}}, +{0x24A4, {0x0028, 0x0069, 0x0029, 0}}, +{0x24A5, {0x0028, 0x006A, 0x0029, 0}}, +{0x24A6, {0x0028, 0x006B, 0x0029, 0}}, +{0x24A7, {0x0028, 0x006C, 0x0029, 0}}, +{0x24A8, {0x0028, 0x006D, 0x0029, 0}}, +{0x24A9, {0x0028, 0x006E, 0x0029, 0}}, +{0x24AA, {0x0028, 0x006F, 0x0029, 0}}, +{0x24AB, {0x0028, 0x0070, 0x0029, 0}}, +{0x24AC, {0x0028, 0x0071, 0x0029, 0}}, +{0x24AD, {0x0028, 0x0072, 0x0029, 0}}, +{0x24AE, {0x0028, 0x0073, 0x0029, 0}}, +{0x24AF, {0x0028, 0x0074, 0x0029, 0}}, +{0x24B0, {0x0028, 0x0075, 0x0029, 0}}, +{0x24B1, {0x0028, 0x0076, 0x0029, 0}}, +{0x24B2, {0x0028, 0x0077, 0x0029, 0}}, +{0x24B3, {0x0028, 0x0078, 0x0029, 0}}, +{0x24B4, {0x0028, 0x0079, 0x0029, 0}}, +{0x24B5, {0x0028, 0x007A, 0x0029, 0}}, +{0x304C, {0x304B, 0x3099, 0}}, +{0x304E, {0x304D, 0x3099, 0}}, +{0x3050, {0x304F, 0x3099, 0}}, +{0x3052, {0x3051, 0x3099, 0}}, +{0x3054, {0x3053, 0x3099, 0}}, +{0x3056, {0x3055, 0x3099, 0}}, +{0x3058, {0x3057, 0x3099, 0}}, +{0x305A, {0x3059, 0x3099, 0}}, +{0x305C, {0x305B, 0x3099, 0}}, +{0x305E, {0x305D, 0x3099, 0}}, +{0x3060, {0x305F, 0x3099, 0}}, +{0x3062, {0x3061, 0x3099, 0}}, +{0x3065, {0x3064, 0x3099, 0}}, +{0x3067, {0x3066, 0x3099, 0}}, +{0x3069, {0x3068, 0x3099, 0}}, +{0x3070, {0x306F, 0x3099, 0}}, +{0x3071, {0x306F, 0x309A, 0}}, +{0x3073, {0x3072, 0x3099, 0}}, +{0x3074, {0x3072, 0x309A, 0}}, +{0x3076, {0x3075, 0x3099, 0}}, +{0x3077, {0x3075, 0x309A, 0}}, +{0x3079, {0x3078, 0x3099, 0}}, +{0x307A, {0x3078, 0x309A, 0}}, +{0x307C, {0x307B, 0x3099, 0}}, +{0x307D, {0x307B, 0x309A, 0}}, +{0x3094, {0x3046, 0x3099, 0}}, +{0x309E, {0x309D, 0x3099, 0}}, +{0x30AC, {0x30AB, 0x3099, 0}}, +{0x30AE, {0x30AD, 0x3099, 0}}, +{0x30B0, {0x30AF, 0x3099, 0}}, +{0x30B2, {0x30B1, 0x3099, 0}}, +{0x30B4, {0x30B3, 0x3099, 0}}, +{0x30B6, {0x30B5, 0x3099, 0}}, +{0x30B8, {0x30B7, 0x3099, 0}}, +{0x30BA, {0x30B9, 0x3099, 0}}, +{0x30BC, {0x30BB, 0x3099, 0}}, +{0x30BE, {0x30BD, 0x3099, 0}}, +{0x30C0, {0x30BF, 0x3099, 0}}, +{0x30C2, {0x30C1, 0x3099, 0}}, +{0x30C5, {0x30C4, 0x3099, 0}}, +{0x30C7, {0x30C6, 0x3099, 0}}, +{0x30C9, {0x30C8, 0x3099, 0}}, +{0x30D0, {0x30CF, 0x3099, 0}}, +{0x30D1, {0x30CF, 0x309A, 0}}, +{0x30D3, {0x30D2, 0x3099, 0}}, +{0x30D4, {0x30D2, 0x309A, 0}}, +{0x30D6, {0x30D5, 0x3099, 0}}, +{0x30D7, {0x30D5, 0x309A, 0}}, +{0x30D9, {0x30D8, 0x3099, 0}}, +{0x30DA, {0x30D8, 0x309A, 0}}, +{0x30DC, {0x30DB, 0x3099, 0}}, +{0x30DD, {0x30DB, 0x309A, 0}}, +{0x30F4, {0x30A6, 0x3099, 0}}, +{0x30F7, {0x30EF, 0x3099, 0}}, +{0x30F8, {0x30F0, 0x3099, 0}}, +{0x30F9, {0x30F1, 0x3099, 0}}, +{0x30FA, {0x30F2, 0x3099, 0}}, +{0x30FE, {0x30FD, 0x3099, 0}}, +{0xFB2A, {0x05E9, 0x05C1, 0}}, +{0xFB2B, {0x05E9, 0x05C2, 0}}, +{0xFB2C, {0x05E9, 0x05BC, 0x05C1, 0}}, +{0xFB2D, {0x05E9, 0x05BC, 0x05C2, 0}}, +{0xFB2E, {0x05D0, 0x05B7, 0}}, +{0xFB2F, {0x05D0, 0x05B8, 0}}, +{0xFB30, {0x05D0, 0x05BC, 0}}, +{0xFB31, {0x05D1, 0x05BC, 0}}, +{0xFB32, {0x05D2, 0x05BC, 0}}, +{0xFB33, {0x05D3, 0x05BC, 0}}, +{0xFB34, {0x05D4, 0x05BC, 0}}, +{0xFB35, {0x05D5, 0x05BC, 0}}, +{0xFB36, {0x05D6, 0x05BC, 0}}, +{0xFB38, {0x05D8, 0x05BC, 0}}, +{0xFB39, {0x05D9, 0x05BC, 0}}, +{0xFB3A, {0x05DA, 0x05BC, 0}}, +{0xFB3B, {0x05DB, 0x05BC, 0}}, +{0xFB3C, {0x05DC, 0x05BC, 0}}, +{0xFB3E, {0x05DE, 0x05BC, 0}}, +{0xFB40, {0x05E0, 0x05BC, 0}}, +{0xFB41, {0x05E1, 0x05BC, 0}}, +{0xFB43, {0x05E3, 0x05BC, 0}}, +{0xFB44, {0x05E4, 0x05BC, 0}}, +{0xFB46, {0x05E6, 0x05BC, 0}}, +{0xFB47, {0x05E7, 0x05BC, 0}}, +{0xFB48, {0x05E8, 0x05BC, 0}}, +{0xFB49, {0x05E9, 0x05BC, 0}}, +{0xFB4A, {0x05EA, 0x05BC, 0}}, +{0xFB4B, {0x05D5, 0x05B9, 0}}, +{0xFB4C, {0x05D1, 0x05BF, 0}}, +{0xFB4D, {0x05DB, 0x05BF, 0}}, +{0xFB4E, {0x05E4, 0x05BF, 0}} }; diff --git a/Source/GSConnection.m b/Source/GSConnection.m index b12e37076..4831f5e40 100644 --- a/Source/GSConnection.m +++ b/Source/GSConnection.m @@ -5,7 +5,7 @@ Date: July 1994 Minor rewrite for OPENSTEP by: Richard Frith-Macdonald Date: August 1997 - Major rewritre for MACOSX by: Richard Frith-Macdonald + Major rewrite for MACOSX by: Richard Frith-Macdonald Date: 2000 This file is part of the GNUstep Base Library. @@ -29,8 +29,9 @@ #include #include +#include #include -#include +#include #include #include #include @@ -49,19 +50,35 @@ #include #include -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"; +static NSString* +stringFromMsgType(int type) +{ + switch (type) + { + case METHOD_REQUEST: + return @"method request"; + case METHOD_REPLY: + return @"method reply"; + case ROOTPROXY_REQUEST: + return @"root proxy request"; + case ROOTPROXY_REPLY: + return @"root proxy reply"; + case CONNECTION_SHUTDOWN: + return @"connection shutdown"; + case METHODTYPE_REQUEST: + return @"methodtype request"; + case METHODTYPE_REPLY: + return @"methodtype reply"; + case PROXY_RELEASE: + return @"proxy release"; + case PROXY_RETAIN: + return @"proxy retain"; + case RETAIN_REPLY: + return @"retain replay"; + default: + return @"unknown operation type!"; + } +} @interface NSDistantObject (NSConnection) - (id) localForProxy; @@ -173,35 +190,28 @@ static unsigned local_object_counter = 0; @end -@interface NSConnection (GettingCoderInterface) -- (void) _handleRmc: rmc; -- (void) _handleQueuedRmcRequests; -- _getReceivedReplyRmcWithSequenceNumber: (int)n; -- newSendingReplyRmcWithSequenceNumber: (int)n; -- (int) _newMsgNumber; -@end @interface NSConnection (Private) -+ (void) handlePortMessage: (NSPortMessage*)msg; + (void) setDebug: (int)val; +- (void) handlePortMessage: (NSPortMessage*)msg; + +- _getReceivedReplyRmcWithSequenceNumber: (int)n; +- (NSPortCoder*) _makeRmc: (int)sequence; +- (int) _newMsgNumber; +- (void) _sendRmc: (NSPortCoder*)c type: (int)msgid; + +- (void) _service_forwardForProxy: (NSPortCoder*)rmc; +- (void) _service_release: (NSPortCoder*)rmc; +- (void) _service_retain: (NSPortCoder*)rmc; +- (void) _service_rootObject: (NSPortCoder*)rmc; +- (void) _service_shutdown: (NSPortCoder*)rmc; +- (void) _service_typeForSelector: (NSPortCoder*)rmc; @end -#define proxiesHashGate refGate -#define sequenceNumberGate refGate +#define _proxiesGate _refGate +#define _queueGate _refGate +#define sequenceNumberGate _refGate -/* xxx Fix this! */ -#define refGate nil - -static inline BOOL -class_is_kind_of (Class self, Class aClassObject) -{ - Class class; - - for (class = self; class != Nil; class = class_get_super_class(class)) - if (class == aClassObject) - return YES; - return NO; -} /* class defaults */ static NSTimer *timer; @@ -225,8 +235,8 @@ existingConnection(NSPort *receivePort, NSPort *sendPort) enumerator = NSEnumerateHashTable(connection_table); while ((c = (NSConnection*)NSNextHashEnumeratorItem(&enumerator)) != nil) { - if ((sendPort == nil || [sendPort isEqual: [con sendPort]]) - && (receivePort == nil || [receivePort isEqual: [con receivePort]]) + if ((sendPort == nil || [sendPort isEqual: [c sendPort]]) + && (receivePort == nil || [receivePort isEqual: [c receivePort]])) { /* * We don't want this connection to be destroyed by another thread @@ -240,14 +250,47 @@ existingConnection(NSPort *receivePort, NSPort *sendPort) return c; } -static NSMutableDictionary *root_object_dictionary; -static NSLock *root_object_dictionary_gate; +static NSMapTable *root_object_map; +static NSLock *root_object_map_gate; -static NSMapTable *receive_port_2_ancestor; +static id +rootObjectForInPort(NSPort *aPort) +{ + id rootObject; + + [root_object_map_gate lock]; + rootObject = (id)NSMapGet(root_object_map, (void*)(gsaddr)aPort); + [root_object_map_gate unlock]; + return rootObject; +} + +/* Pass nil to remove any reference keyed by aPort. */ +static void +setRootObjectForInPort(id anObj, NSPort *aPort) +{ + id oldRootObject; + + [root_object_map_gate lock]; + oldRootObject = (id)NSMapGet(root_object_map, (void*)(gsaddr)aPort); + if (oldRootObject != anObj) + { + if (anObj != nil) + { + NSMapInsert(root_object_map, (void*)(gsaddr)aPort, + (void*)(gsaddr)anObj); + } + else /* anObj == nil && oldRootObject != nil */ + { + NSMapRemove(root_object_map, (void*)(gsaddr)aPort); + } + } + [root_object_map_gate unlock]; +} static NSMapTable *all_connections_local_objects = NULL; static NSMapTable *all_connections_local_targets = NULL; static NSMapTable *all_connections_local_cached = NULL; +static NSLock *global_proxies_gate; /* rmc handling */ static NSMutableArray *received_request_rmc_queue; @@ -375,15 +418,15 @@ static int messages_received_count; all_connections_local_cached = NSCreateMapTable(NSIntMapKeyCallBacks, NSObjectMapValueCallBacks, 0); + global_proxies_gate = [NSLock new]; received_request_rmc_queue = [[NSMutableArray alloc] initWithCapacity: 32]; received_request_rmc_queue_gate = [NSLock new]; received_reply_rmc_queue = [[NSMutableArray alloc] initWithCapacity: 32]; received_reply_rmc_queue_gate = [NSLock new]; - root_object_dictionary = [[NSMutableDictionary alloc] initWithCapacity: 8]; - root_object_dictionary_gate = [NSLock new]; - receive_port_2_ancestor = - NSCreateMapTable (NSNonOwnedPointerMapKeyCallBacks, - NSNonOwnedPointerMapValueCallBacks, 0); + root_object_map = + NSCreateMapTable(NSNonOwnedPointerMapKeyCallBacks, + NSObjectMapValueCallBacks, 0); + root_object_map_gate = [NSLock new]; messages_received_count = 0; } @@ -453,52 +496,56 @@ static int messages_received_count; - (void) addRequestMode: (NSString*)mode { + [_refGate lock]; if ([self isValid] == YES) { - if ([request_modes containsObject: mode] == NO) + if ([_requestModes containsObject: mode] == NO) { - unsigned c = [run_loops count]; + unsigned c = [_runLoops count]; while (c-- > 0) { - NSRunLoop *loop = [run_loops objectAtIndex: c]; + NSRunLoop *loop = [_runLoops objectAtIndex: c]; - [loop addPort: receive_port forMode: mode]; + [loop addPort: _receivePort forMode: mode]; } - [request_modes addObject: mode]; + [_requestModes addObject: mode]; } } + [_refGate unlock]; } - (void) addRunLoop: (NSRunLoop*)loop { + [_refGate lock]; if ([self isValid] == YES) { - if ([run_loops indexOfObjectIdenticalTo: loop] == NSNotFound) + if ([_runLoops indexOfObjectIdenticalTo: loop] == NSNotFound) { - unsigned c = [request_modes count]; + unsigned c = [_requestModes count]; while (c-- > 0) { - NSString *mode = [request_modes objectAtIndex: c]; + NSString *mode = [_requestModes objectAtIndex: c]; - [loop addPort: receive_port forMode: mode]; + [loop addPort: _receivePort forMode: mode]; } - [run_loops addObject: loop]; + [_runLoops addObject: loop]; } } + [_refGate unlock]; } - (void) dealloc { if (debug_connection) - NSLog(@"deallocating 0x%x\n", (gsaddr)self); + NSLog(@"deallocating 0x%x", (gsaddr)self); [super dealloc]; } - (id) delegate { - return delegate; + return GS_GC_UNHIDE(_delegate); } - (void) enableMultipleThreads @@ -508,7 +555,7 @@ static int messages_received_count; - (BOOL) independentConversationQueueing { - return independent_queueing; + return _independentQueueing; } - (id) init @@ -575,38 +622,52 @@ static int messages_received_count; if (debug_connection) { - NSLog(@"Initialising new connection 0x%x\n\t%@\n\t%@\n", + NSLog(@"Initialising new connection 0x%x\n\t%@\n\t%@", (gsaddr)self, r, s); } - is_valid = YES; - receive_port = RETAIN(r); - send_port = RETAIN(s); - message_count = 0; - rep_out_count = 0; - req_out_count = 0; - rep_in_count = 0; - req_in_count = 0; + _isValid = YES; + _receivePort = RETAIN(r); + _sendPort = RETAIN(s); + _messageCount = 0; + _repOutCount = 0; + _reqOutCount = 0; + _repInCount = 0; + _reqInCount = 0; + + /* + * This is used to queue up incoming NSPortMessages representing requests + * that can't immediately be dealt with. + */ + _requestQueue = [NSMutableArray new]; + + /* + * This maps request sequence numbers to the NSPortCoder objects representing + * replies arriving from the remote connection. + */ + _replyMap = + NSCreateMapTable(NSIntMapKeyCallBacks, + NSObjectMapValueCallBacks, 0); /* * This maps (void*)obj to (id)obj. The obj's are retained. * We use this instead of an NSHashTable because we only care about * the object's address, and don't want to send the -hash message to it. */ - local_objects = + _localObjects = NSCreateMapTable(NSNonOwnedPointerMapKeyCallBacks, NSObjectMapValueCallBacks, 0); /* * This maps handles for local objects to their local proxies. */ - local_targets = + _localTargets = NSCreateMapTable(NSIntMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 0); /* * This maps [proxy targetForProxy] to proxy. The proxy's are retained. */ - remote_proxies = + _remoteProxies = NSCreateMapTable(NSIntMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 0); @@ -616,26 +677,28 @@ static int messages_received_count; parent = existingConnection(r, r); if (parent != nil) { - independent_queueing = parent->independent_queueing; - reply_timeout = parent->reply_timeout; - request_timeout = parent->request_timeout; + _independentQueueing = parent->_independentQueueing; + _replyTimeout = parent->_replyTimeout; + _requestTimeout = parent->_requestTimeout; } else { - independent_queueing = NO; - reply_timeout = CONNECTION_DEFAULT_TIMEOUT; - request_timeout = CONNECTION_DEFAULT_TIMEOUT; + _independentQueueing = NO; + _replyTimeout = CONNECTION_DEFAULT_TIMEOUT; + _requestTimeout = CONNECTION_DEFAULT_TIMEOUT; } - request_depth = 0; - delegate = nil; + _requestDepth = 0; + _delegate = nil; + _refGate = [NSRecursiveLock new]; + /* * Set up request modes array and make sure the receiving port is * added to the run loop to get data. */ loop = [NSRunLoop currentRunLoop]; - run_loops = [[NSMutableArray alloc] initWithObject: loop]; - request_modes = [[NSMutableArray alloc] initWithCapacity: 2]; + _runLoops = [[NSMutableArray alloc] initWithObjects: &loop count: 1]; + _requestModes = [[NSMutableArray alloc] initWithCapacity: 2]; [self addRequestMode: NSDefaultRunLoopMode]; [self addRequestMode: NSConnectionReplyMode]; @@ -694,13 +757,19 @@ static int messages_received_count; return self; } -/* xxx This needs locks */ - (void) invalidate { - if (is_valid == NO) - return; + BOOL wasValid; - is_valid = NO; + [_refGate lock]; + wasValid = _isValid; + _isValid = NO; + [_refGate unlock]; + + if (wasValid == NO) + { + return; + } /* * Don't need notifications any more - so remove self as observer. @@ -708,38 +777,17 @@ static int messages_received_count; [[NSNotificationCenter defaultCenter] removeObserver: self]; /* - * We can't be the ancestor of anything if we are invalid. + * Withdraw from run loops. */ - if (self == NSMapGet(receive_port_2_ancestor, receive_port)) - NSMapRemove(receive_port_2_ancestor, receive_port); + [self setRequestMode: nil]; - /* - * If we have been invalidated, we don't need to retain proxies - * for local objects any more. In fact, we want to get rid of - * these proxies in case they are keeping us retained when we - * might otherwise de deallocated. - */ - { - NSArray *targets; - unsigned i; - - [proxiesHashGate lock]; - targets = NSAllMapTableValues(local_targets); - IF_NO_GC(RETAIN(targets)); - for (i = 0; i < [targets count]; i++) - { - id t = [[targets objectAtIndex: i] localForProxy]; - - [self removeLocalObject: t]; - } - [targets release]; - [proxiesHashGate unlock]; - } + RETAIN(self); if (debug_connection) - NSLog(@"Invalidating connection 0x%x\n\t%@\n\t%@\n", (gsaddr)self, - [receive_port description], [send_port description]); - + { + NSLog(@"Invalidating connection 0x%x\n\t%@\n\t%@", + (gsaddr)self, _receivePort, _sendPort); + } /* * We need to notify any watchers of our death - but if we are already * in the deallocation process, we can't have a notification retaining @@ -755,21 +803,46 @@ static int messages_received_count; object: self]; RELEASE(arp); } + + /* + * If we have been invalidated, we don't need to retain proxies + * for local objects any more. In fact, we want to get rid of + * these proxies in case they are keeping us retained when we + * might otherwise de deallocated. + */ + { + NSArray *targets; + unsigned i; + + [_proxiesGate lock]; + targets = NSAllMapTableValues(_localTargets); + IF_NO_GC(RETAIN(targets)); + for (i = 0; i < [targets count]; i++) + { + id t = [[targets objectAtIndex: i] localForProxy]; + + [self removeLocalObject: t]; + } + [targets release]; + [_proxiesGate unlock]; + } + + RELEASE(self); } - (BOOL) isValid { - return is_valid; + return _isValid; } - (NSArray*) localObjects { NSArray *c; - /* Don't assert (is_valid); */ - [proxiesHashGate lock]; - c = NSAllMapTableValues(local_objects); - [proxiesHashGate unlock]; + /* Don't assert (_isValid); */ + [_proxiesGate lock]; + c = NSAllMapTableValues(_localObjects); + [_proxiesGate unlock]; return c; } @@ -781,30 +854,37 @@ static int messages_received_count; - (NSPort*) receivePort { - return receive_port; + return _receivePort; } - (BOOL) registerName: (NSString*)name { NSPortNameServer *svr = [NSPortNameServer defaultPortNameServer]; - NSArray *names = [svr namesForPort: receive_port]; + + return [self registerName: name withNameServer: svr]; +} + +- (BOOL) registerName: (NSString*)name withNameServer: (NSPortNameServer*)svr +{ + NSArray *names = [svr namesForPort: _receivePort]; BOOL result = YES; + unsigned c; if (name != nil) { - result = [svr registerPort: receive_port forName: name]; + result = [svr registerPort: _receivePort forName: name]; } - if (result == YES && [names count] > 0) + if (result == YES && (c = [names count]) > 0) { unsigned i; - for (i = 0; i < [names count]; i++) + for (i = 0; i < c; i++) { NSString *tmp = [names objectAtIndex: i]; if ([tmp isEqualToString: name] == NO) { - [svr removePort: receive_port forName: name]; + [svr removePort: _receivePort forName: name]; } } } @@ -832,86 +912,89 @@ static int messages_received_count; { NSArray *c; - /* Don't assert (is_valid); */ - [proxiesHashGate lock]; - c = NSAllMapTableValues(remote_proxies); - [proxiesHashGate unlock]; + /* Don't assert (_isValid); */ + [_proxiesGate lock]; + c = NSAllMapTableValues(_remoteProxies); + [_proxiesGate unlock]; return c; } - (void) removeRequestMode: (NSString*)mode { - if ([request_modes containsObject: mode]) + [_refGate lock]; + if ([_requestModes containsObject: mode]) { - unsigned c = [run_loops count]; + unsigned c = [_runLoops count]; while (c-- > 0) { - NSRunLoop *loop = [run_loops objectAtIndex: c]; + NSRunLoop *loop = [_runLoops objectAtIndex: c]; - [loop removePort: receive_port forMode: mode]; + [loop removePort: _receivePort forMode: mode]; } - [request_modes removeObject: mode]; + [_requestModes removeObject: mode]; } + [_refGate unlock]; } -- (void) removeRunLoop: (NSRunLoop*)runloop +- (void) removeRunLoop: (NSRunLoop*)loop { unsigned pos; - pos = [run_loops indexOfObjectIdenticalTo: loop]; + [_refGate lock]; + pos = [_runLoops indexOfObjectIdenticalTo: loop]; if (pos != NSNotFound) { - unsigned c = [request_modes count]; + unsigned c = [_requestModes count]; while (c-- > 0) { - NSString *mode = [request_modes objectAtIndex: c]; + NSString *mode = [_requestModes objectAtIndex: c]; - [loop removePort: receive_port forMode: mode]; + [loop removePort: _receivePort forMode: mode]; } - [run_loops removeObjectAtIndex: pos]; + [_runLoops removeObjectAtIndex: pos]; } + [_refGate unlock]; } - (NSTimeInterval) replyTimeout { - return reply_timeout; + return _replyTimeout; } - (NSArray*) requestModes { - return [[request_modes copy] autorelease]; + return [[_requestModes copy] autorelease]; } - (NSTimeInterval) requestTimeout { - return request_timeout; + return _requestTimeout; } - (id) rootObject { - return [[self class] rootObjectForInPort: receive_port]; + return rootObjectForInPort(_receivePort); } - (NSDistantObject*) rootProxy { - id op, ip; - NSDistantObject *newProxy = nil; - int seq_num = [self _newMsgNumber]; + NSPortCoder *op; + NSPortCoder *ip; + NSDistantObject *newProxy = nil; + int seq_num; + + NSParameterAssert(_receivePort); + NSParameterAssert(_isValid); + + seq_num = [self _newMsgNumber]; + op = [self _makeRmc: seq_num]; + [self _sendRmc: op type: ROOTPROXY_REQUEST]; - NSParameterAssert(receive_port); - NSParameterAssert (is_valid); - op = [[self encodingClass] - newForWritingWithConnection: self - sequenceNumber: seq_num - identifier: ROOTPROXY_REQUEST]; - [op dismiss]; ip = [self _getReceivedReplyRmcWithSequenceNumber: seq_num]; - [ip decodeObjectAt: &newProxy withName: NULL]; - NSParameterAssert (class_is_kind_of (newProxy->isa, objc_get_class ("NSDistantObject"))); - [ip dismiss]; - return [newProxy autorelease]; + [ip decodeValueOfObjCType: @encode(id) at: &newProxy]; + return AUTORELEASE(newProxy); } - (void) runInNewThread @@ -921,48 +1004,54 @@ static int messages_received_count; - (NSPort*) sendPort { - return send_port; + return _sendPort; } -- (void) setDelegate: anObj +- (void) setDelegate: (id)anObj { - delegate = anObj; + _delegate = GS_GC_HIDE(anObj); + _authenticateIn = + [anObj respondsToSelector: @selector(authenticateComponents:withData:)]; + _authenticateOut = + [anObj respondsToSelector: @selector(authenticationDataForComponents:)]; } - (void) setIndependentConversationQueueing: (BOOL)flag { - independent_queueing = flag; + _independentQueueing = flag; } - (void) setReplyTimeout: (NSTimeInterval)to { - reply_timeout = to; + _replyTimeout = to; } - (void) setRequestMode: (NSString*)mode { - while ([request_modes count] > 0 && [request_modes objectAtIndex: 0] != mode) + [_refGate lock]; + while ([_requestModes count] > 0 && [_requestModes objectAtIndex: 0] != mode) { - [self removeRequestMode: [request_modes objectAtIndex: 0]]; + [self removeRequestMode: [_requestModes objectAtIndex: 0]]; } - while ([request_modes count] > 1) + while ([_requestModes count] > 1) { - [self removeRequestMode: [request_modes objectAtIndex: 1]]; + [self removeRequestMode: [_requestModes objectAtIndex: 1]]; } - if (mode != nil && [request_modes count] == 0) + if (mode != nil && [_requestModes count] == 0) { [self addRequestMode: mode]; } + [_refGate unlock]; } - (void) setRequestTimeout: (NSTimeInterval)to { - request_timeout = to; + _requestTimeout = to; } -- (void) setRootObject: anObj +- (void) setRootObject: (id)anObj { - [[self class] setRootObject: anObj forInPort: receive_port]; + setRootObjectForInPort(anObj, _receivePort); } - (NSDictionary*) statistics @@ -972,30 +1061,34 @@ static int messages_received_count; d = [NSMutableDictionary dictionaryWithCapacity: 8]; + [_refGate lock]; + /* * These are in OPENSTEP 4.2 */ - o = [NSNumber numberWithUnsignedInt: rep_in_count]; + o = [NSNumber numberWithUnsignedInt: _repInCount]; [d setObject: o forKey: NSConnectionRepliesReceived]; - o = [NSNumber numberWithUnsignedInt: rep_out_count]; + o = [NSNumber numberWithUnsignedInt: _repOutCount]; [d setObject: o forKey: NSConnectionRepliesSent]; - o = [NSNumber numberWithUnsignedInt: req_in_count]; + o = [NSNumber numberWithUnsignedInt: _reqInCount]; [d setObject: o forKey: NSConnectionRequestsReceived]; - o = [NSNumber numberWithUnsignedInt: req_out_count]; + o = [NSNumber numberWithUnsignedInt: _reqOutCount]; [d setObject: o forKey: NSConnectionRequestsSent]; /* * These are GNUstep extras */ - o = [NSNumber numberWithUnsignedInt: NSCountMapTable(local_targets)]; + o = [NSNumber numberWithUnsignedInt: NSCountMapTable(_localTargets)]; [d setObject: o forKey: NSConnectionLocalCount]; - o = [NSNumber numberWithUnsignedInt: NSCountMapTable(remote_proxies)]; + o = [NSNumber numberWithUnsignedInt: NSCountMapTable(_remoteProxies)]; [d setObject: o forKey: NSConnectionProxyCount]; [received_request_rmc_queue_gate lock]; o = [NSNumber numberWithUnsignedInt: [received_request_rmc_queue count]]; [received_request_rmc_queue_gate unlock]; [d setObject: o forKey: @"Pending packets"]; + [_refGate unlock]; + return d; } @@ -1010,7 +1103,7 @@ static int messages_received_count; CREATE_AUTORELEASE_POOL(arp); if (debug_connection) - NSLog(@"finalising 0x%x\n", (gsaddr)self); + NSLog(@"finalising 0x%x", (gsaddr)self); [self invalidate]; [connection_table_gate lock]; @@ -1019,40 +1112,217 @@ static int messages_received_count; timer = nil; [connection_table_gate unlock]; - /* Remove rootObject from root_object_dictionary - if this is last connection */ - if (receive_port != nil - && [NSConnection connectionsCountWithInPort: receive_port] == 0) + /* Remove rootObject from root_object_map if this is last connection */ + if (_receivePort != nil && existingConnection(_receivePort, nil) == nil) { - [NSConnection setRootObject: nil forInPort: receive_port]; + setRootObjectForInPort(nil, _receivePort); } /* Remove receive port from run loop. */ [self setRequestMode: nil]; - if (receive_port != nil) - { - [[NSRunLoop currentRunLoop] removePort: receive_port - forMode: NSConnectionReplyMode]; - } - RELEASE(request_modes); - RELEASE(run_loops); + + DESTROY(_requestModes); + DESTROY(_runLoops); /* Finished with ports - releasing them may generate a notification */ - RELEASE(receive_port); - RELEASE(send_port); + DESTROY(_receivePort); + DESTROY(_sendPort); - [proxiesHashGate lock]; - if (remote_proxies != 0) - NSFreeMapTable(remote_proxies); - if (local_objects != 0) - NSFreeMapTable(local_objects); - if (local_targets != 0) - NSFreeMapTable(local_targets); - [proxiesHashGate unlock]; + [_proxiesGate lock]; + if (_remoteProxies != 0) + { + NSFreeMapTable(_remoteProxies); + _remoteProxies = 0; + } + if (_localObjects != 0) + { + NSFreeMapTable(_localObjects); + _localObjects = 0; + } + if (_localTargets != 0) + { + NSFreeMapTable(_localTargets); + _localTargets = 0; + } + [_proxiesGate unlock]; + DESTROY(_requestQueue); + if (_replyMap != 0) + { + NSFreeMapTable(_replyMap); + _replyMap = 0; + } + + DESTROY(_refGate); RELEASE(arp); } +/* + * NSDistantObject's -forward: : method calls this to send the message + * over the wire. + */ +- (retval_t) forwardForProxy: (NSDistantObject*)object + selector: (SEL)sel + argFrame: (arglist_t)argframe +{ + NSPortCoder *op; + + /* The callback for encoding the args of the method call. */ + void encoder (int argnum, void *datum, const char *type, int flags) + { +#define ENCODED_ARGNAME @"argument value" + switch (*type) + { + case _C_ID: + if (flags & _F_BYCOPY) + [op encodeBycopyObject: *(id*)datum]; +#ifdef _F_BYREF + else if (flags & _F_BYREF) + [op encodeByrefObject: *(id*)datum]; +#endif + else + [op encodeObject: *(id*)datum]; + break; + default: + [op encodeValueOfObjCType: type at: datum]; + } + } + + /* Encode the method on an RMC, and send it. */ + { + BOOL out_parameters; + const char *type; + int seq_num; + retval_t retframe; + + NSParameterAssert (_isValid); + + /* get the method types from the selector */ +#if NeXT_runtime + [NSException + raise: NSGenericException + format: @"Sorry, distributed objects does not work with NeXT runtime"]; + /* type = [object selectorTypeForProxy: sel]; */ +#else + type = sel_get_type(sel); +#endif + if (type == 0 || *type == '\0') { + type = [[object methodSignatureForSelector: sel] methodType]; + if (type) { + sel_register_typed_name(sel_get_name(sel), type); + } + } + NSParameterAssert(type); + NSParameterAssert(*type); + + seq_num = [self _newMsgNumber]; + op = [self _makeRmc: seq_num]; + + if (debug_connection > 4) + NSLog(@"building packet seq %d", seq_num); + + /* Send the types that we're using, so that the performer knows + exactly what qualifiers we're using. + If all selectors included qualifiers, and if I could make + sel_types_match() work the way I wanted, we wouldn't need to do + this. */ + [op encodeValueOfObjCType: @encode(char*) at: &type]; + + /* xxx This doesn't work with proxies and the NeXT runtime because + type may be a method_type from a remote machine with a + different architecture, and its argframe layout specifiers + won't be right for this machine! */ + out_parameters = mframe_dissect_call (argframe, type, encoder); + + [self _sendRmc: op type: METHOD_REQUEST]; + + if (debug_connection > 1) + NSLog(@"Sent message to 0x%x", (gsaddr)self); + + /* Get the reply rmc, and decode it. */ + { + NSPortCoder *ip = nil; + BOOL is_exception = NO; + + void decoder(int argnum, void *datum, const char *type, int flags) + { + if (type == 0) { + if (ip) { + /* this must be here to avoid trashing alloca'ed retframe */ + [ip dismiss]; + ip = (id)-1; + } + return; + } + /* If we didn't get the reply packet yet, get it now. */ + if (!ip) + { + if (!_isValid) + { + [NSException raise: NSGenericException + format: @"connection waiting for request was shut down"]; + } + /* xxx Why do we get the reply packet in here, and not + just before calling dissect_method_return() below? */ + ip = [self _getReceivedReplyRmcWithSequenceNumber: seq_num]; + /* Find out if the server is returning an exception instead + of the return values. */ + [ip decodeValueOfObjCType: @encode(BOOL) at: &is_exception]; + if (is_exception) + { + /* Decode the exception object, and raise it. */ + id exc; + [ip decodeValueOfObjCType: @encode(id) at: &exc]; + [ip dismiss]; + ip = (id)-1; + /* xxx Is there anything else to clean up in + dissect_method_return()? */ + [exc raise]; + } + } + [ip decodeValueOfObjCType: type at: datum]; + /* -decodeValueOfObjCType: at: malloc's new memory + for char*'s. We need to make sure it gets freed eventually + so we don't have a memory leak. Request here that it be + autorelease'ed. Also autorelease created objects. */ + if (*type == _C_CHARPTR) + [NSData dataWithBytesNoCopy: *(void**)datum length: 1]; + else if (*type == _C_ID) + [*(id*)datum autorelease]; + } + + retframe = mframe_build_return (argframe, type, out_parameters, + decoder); + /* Make sure we processed all arguments, and dismissed the IP. + IP is always set to -1 after being dismissed; the only places + this is done is in this function DECODER(). IP will be nil + if mframe_build_return() never called DECODER(), i.e. when + we are just returning (void).*/ + NSAssert(ip == (id)-1 || ip == nil, NSInternalInconsistencyException); + _repInCount++; /* received a reply */ + return retframe; + } + } +} + +- (const char *) typeForSelector: (SEL)sel remoteTarget: (unsigned)target +{ + id op, ip; + char *type = 0; + int seq_num; + + NSParameterAssert(_receivePort); + NSParameterAssert (_isValid); + seq_num = [self _newMsgNumber]; + op = [self _makeRmc: seq_num]; + [op encodeValueOfObjCType: ":" at: &sel]; + [op encodeValueOfObjCType: @encode(unsigned) at: &target]; + [self _sendRmc: op type: METHODTYPE_REQUEST]; + ip = [self _getReceivedReplyRmcWithSequenceNumber: seq_num]; + [ip decodeValueOfObjCType: @encode(char*) at: &type]; + return type; +} + /* Class-wide stats and collections. */ @@ -1086,32 +1356,6 @@ static int messages_received_count; return count; } - -+ (NSConnection*) newRegisteringAtName: (NSString*)n withRootObject: anObj -{ - return [self newRegisteringAtName: n - atPort: 0 - withRootObject: anObj]; -} - -+ (NSConnection*) newRegisteringAtName: (NSString*)n - atPort: (int)p - withRootObject: anObj -{ - id port; - id newConn; - - port = [NSPort port]; - newConn = [self alloc]; - newConn = [newConn initWithReceivePort: port sendPort: nil]; - [newConn setRootObject: anObj]; - if ([newConn registerName: n] == NO) - { - DESTROY(newConn); - } - return newConn; -} - @end @@ -1122,12 +1366,142 @@ static int messages_received_count; - (void) handlePortMessage: (NSPortMessage*)msg { - NSConnection *conn = existingConnection([msg receivePort], [msg sendPort]); + NSPortCoder *rmc; + int type = [msg msgid]; + NSMutableArray *components = [msg _components]; + NSPort *rp = [msg receivePort]; + NSPort *sp = [msg sendPort]; + NSConnection *conn = existingConnection(rp, sp); - conn = [self connectionWithReceivePort: [msg receivePort] - sendPort: [msg sendPort]]; + if (debug_connection > 4) + { + NSLog(@"handling packet of type %d (%@)", type, stringFromMsgType(type)); + } if (conn == nil) { + if (debug_connection) + { + NSLog(@"received port message for unknown connection - %@", msg); + } + return; + } + else if ([conn isValid] == NO) + { + if (debug_connection) + { + NSLog(@"received port message for invalid connection - %@", msg); + } + return; + } + + if (_authenticateIn == YES) + { + NSData *d; + unsigned count = [components count]; + + d = AUTORELEASE(RETAIN([components objectAtIndex: --count])); + [components removeObjectAtIndex: count]; + if ([[self delegate] authenticateComponents: components + withData: d] == NO) + { + [NSException raise: NSFailedAuthenticationException + format: @"message not authenticated by delegate"]; + } + } + + rmc = [NSPortCoder portCoderWithReceivePort: rp + sendPort: sp + components: components]; + switch (type) + { + case ROOTPROXY_REQUEST: + /* It won't take much time to handle this, so go ahead and service + it, even if we are waiting for a reply. */ + [conn _service_rootObject: rmc]; + break; + + case METHODTYPE_REQUEST: + /* It won't take much time to handle this, so go ahead and service + it, even if we are waiting for a reply. */ + [conn _service_typeForSelector: rmc]; + break; + + case METHOD_REQUEST: + /* + * We just got a new request; we need to decide whether to queue + * it or service it now. + * If the REPLY_DEPTH is 0, then we aren't in the middle of waiting + * for a reply, we are waiting for requests---so service it now. + * If REPLY_DEPTH is non-zero, we may still want to service it now + * if independent_queuing is NO. + */ + [conn->_queueGate lock]; + if (conn->_requestDepth == 0 || conn->_independentQueueing == NO) + { + conn->_requestDepth++; + [conn->_queueGate unlock]; + [conn _service_forwardForProxy: rmc]; + [conn->_queueGate lock]; + conn->_requestDepth--; + } + else + { + [conn->_requestQueue addObject: rmc]; + } + /* + * Service any requests that were queued while we + * were waiting for replies. + */ + while (conn->_requestDepth == 0 && [conn->_requestQueue count] > 0) + { + rmc = [conn->_requestQueue objectAtIndex: 0]; + RETAIN(rmc); + [conn->_requestQueue removeObjectAtIndex: 0]; + [conn->_queueGate unlock]; + [conn _service_forwardForProxy: rmc]; + [conn->_queueGate lock]; + RELEASE(rmc); + } + [conn->_queueGate unlock]; + break; + + /* + * For replies, we read the sequence number from the reply object and + * store it in a map using thee sequence number as the key. That way + * it's easy for the connection to find replies by their numbers. + */ + case ROOTPROXY_REPLY: + case METHOD_REPLY: + case METHODTYPE_REPLY: + case RETAIN_REPLY: + { + int sequence; + + [rmc decodeValueOfObjCType: @encode(int) at: &sequence]; + [conn->_queueGate lock]; + NSMapInsert(conn->_replyMap, (void*)sequence, rmc); + [conn->_queueGate unlock]; + } + break; + + case CONNECTION_SHUTDOWN: + { + [conn _service_shutdown: rmc]; + break; + } + case PROXY_RELEASE: + { + [conn _service_release: rmc]; + break; + } + case PROXY_RETAIN: + { + [conn _service_retain: rmc]; + break; + } + default: + [NSException raise: NSGenericException + format: @"unrecognized NSPortCoder identifier"]; } } @@ -1138,32 +1512,6 @@ static int messages_received_count; - -/* Creating new rmc's for encoding requests and replies */ - -/* Create a new, empty rmc, which will be filled with a request. */ -- newSendingRequestRmc -{ - id rmc; - - NSParameterAssert(receive_port); - NSParameterAssert (is_valid); - rmc = [[self encodingClass] newForWritingWithConnection: self - sequenceNumber: [self _newMsgNumber] - identifier: METHOD_REQUEST]; - return rmc; -} - -/* Create a new, empty rmc, which will be filled with a reply to msg #n. */ -- newSendingReplyRmcWithSequenceNumber: (int)n -{ - id rmc = [[self encodingClass] newForWritingWithConnection: self - sequenceNumber: n - identifier: METHOD_REPLY]; - NSParameterAssert (is_valid); - return rmc; -} - /* Methods for handling client and server, requests and replies */ @@ -1182,30 +1530,27 @@ static int messages_received_count; { case _C_ID: if (flags & _F_BYCOPY) - [op encodeBycopyObject: *(id*)datum withName: ENCODED_ARGNAME]; + [op encodeBycopyObject: *(id*)datum]; #ifdef _F_BYREF else if (flags & _F_BYREF) - [op encodeByrefObject: *(id*)datum withName: ENCODED_ARGNAME]; + [op encodeByrefObject: *(id*)datum]; #endif else - [op encodeObject: *(id*)datum withName: ENCODED_ARGNAME]; + [op encodeObject: *(id*)datum]; break; default: - [op encodeValueOfObjCType: type at: datum withName: ENCODED_ARGNAME]; + [op encodeValueOfObjCType: type at: datum]; } } /* Encode the method on an RMC, and send it. */ { - BOOL out_parameters; - BOOL sendOk; - const char *type; - int seq_num; - NSPortMessage *message; - NSData *limit; - retval_t retframe; + BOOL out_parameters; + const char *type; + int seq_num; + retval_t retframe; - NSParameterAssert (is_valid); + NSParameterAssert (_isValid); /* get the method types from the selector */ #if NeXT_runtime @@ -1225,47 +1570,29 @@ static int messages_received_count; NSParameterAssert(type); NSParameterAssert(*type); - op = [[NSPortCoder alloc] initWithReceivePort: [self receivePort] - sendPort: [self sendPort] - components: nil]; seq_num = [self _newMsgNumber]; - [op encodeValueOfObjCType: @encode(int) at: &seq_num]; + op = [self _makeRmc: seq_num]; if (debug_connection > 4) - NSLog(@"building packet seq %d\n", seq_num); + NSLog(@"building packet seq %d", seq_num); /* Send the types that we're using, so that the performer knows exactly what qualifiers we're using. If all selectors included qualifiers, and if I could make sel_types_match() work the way I wanted, we wouldn't need to do this. */ - [op encodeValueOfCType: @encode(char*) - at: &type - withName: @"selector type"]; + [op encodeValueOfObjCType: @encode(char*) at: &type]; /* xxx This doesn't work with proxies and the NeXT runtime because type may be a method_type from a remote machine with a different architecture, and its argframe layout specifiers won't be right for this machine! */ out_parameters = mframe_dissect_call (argframe, type, encoder); - /* Send the rmc */ - message = [[NSPortMessage alloc] initWithSendPort: [self sendPort] - receivePort: [self receivePort] - components: [op _components]]; - RELEASE(op); - [message setMsgId: METHOD_REQUEST]; - limit = [NSDate dateWithTimeIntervalSinceNow: [self requestTimeout]]; - sendOk = [message sendBeforeDate: limit]; - RELEASE(message); - if (sendOk == NO) - { - [NSException raise: NSPortTimeoutException - format: @"request send timed out"]; - } + + [self _sendRmc: op type: METHOD_REQUEST]; if (debug_connection > 1) - NSLog(@"Sent message to 0x%x\n", (gsaddr)self); - req_out_count++; /* Sent a request. */ + NSLog(@"Sent message to 0x%x", (gsaddr)self); /* Get the reply rmc, and decode it. */ { @@ -1285,7 +1612,7 @@ static int messages_received_count; /* If we didn't get the reply packet yet, get it now. */ if (!ip) { - if (!is_valid) + if (!_isValid) { [NSException raise: NSGenericException format: @"connection waiting for request was shut down"]; @@ -1295,15 +1622,12 @@ static int messages_received_count; ip = [self _getReceivedReplyRmcWithSequenceNumber: seq_num]; /* Find out if the server is returning an exception instead of the return values. */ - [ip decodeValueOfCType: @encode(BOOL) - at: &is_exception - withName: NULL]; + [ip decodeValueOfObjCType: @encode(BOOL) at: &is_exception]; if (is_exception) { /* Decode the exception object, and raise it. */ id exc; - [ip decodeObjectAt: &exc - withName: NULL]; + [ip decodeValueOfObjCType: @encode(id) at: &exc]; [ip dismiss]; ip = (id)-1; /* xxx Is there anything else to clean up in @@ -1311,8 +1635,8 @@ static int messages_received_count; [exc raise]; } } - [ip decodeValueOfObjCType: type at: datum withName: NULL]; - /* -decodeValueOfCType: at: withName: malloc's new memory + [ip decodeValueOfObjCType: type at: datum]; + /* -decodeValueOfObjCType: at: malloc's new memory for char*'s. We need to make sure it gets freed eventually so we don't have a memory leak. Request here that it be autorelease'ed. Also autorelease created objects. */ @@ -1330,14 +1654,14 @@ static int messages_received_count; if mframe_build_return() never called DECODER(), i.e. when we are just returning (void).*/ NSAssert(ip == (id)-1 || ip == nil, NSInternalInconsistencyException); - rep_in_count++; /* received a reply */ + _repInCount++; /* received a reply */ return retframe; } } } /* NSConnection calls this to service the incoming method request. */ -- (void) _service_forwardForProxy: aRmc +- (void) _service_forwardForProxy: (NSPortCoder*)aRmc { char *forward_type = 0; id op = nil; @@ -1353,10 +1677,8 @@ static int messages_received_count; return; } - [aRmc decodeValueOfObjCType: type - at: datum - withName: NULL]; - /* -decodeValueOfCType: at: withName: malloc's new memory + [aRmc decodeValueOfObjCType: type at: datum]; + /* -decodeValueOfObjCType: at: malloc's new memory for char*'s. We need to make sure it gets freed eventually so we don't have a memory leak. Request here that it be autorelease'ed. Also autorelease created objects. */ @@ -1375,28 +1697,25 @@ static int messages_received_count; /* It is possible that our connection died while the method was being called - in this case we mustn't try to send the result back to the remote application! */ - if (!is_valid) + if (!_isValid) return; - op = [self newSendingReplyRmcWithSequenceNumber: - reply_sequence_number]; - [op encodeValueOfCType: @encode(BOOL) - at: &is_exception - withName: @"Exceptional reply flag"]; + op = [self _makeRmc: reply_sequence_number]; + [op encodeValueOfObjCType: @encode(BOOL) at: &is_exception]; } switch (*type) { case _C_ID: if (flags & _F_BYCOPY) - [op encodeBycopyObject: *(id*)datum withName: ENCODED_RETNAME]; + [op encodeBycopyObject: *(id*)datum]; #ifdef _F_BYREF else if (flags & _F_BYREF) - [op encodeByrefObject: *(id*)datum withName: ENCODED_ARGNAME]; + [op encodeByrefObject: *(id*)datum]; #endif else - [op encodeObject: *(id*)datum withName: ENCODED_RETNAME]; + [op encodeObject: *(id*)datum]; break; default: - [op encodeValueOfObjCType: type at: datum withName: ENCODED_RETNAME]; + [op encodeValueOfObjCType: type at: datum]; } } @@ -1404,26 +1723,23 @@ static int messages_received_count; request cause us to crash. */ NS_DURING { - NSParameterAssert (is_valid); + NSParameterAssert (_isValid); /* Save this for later */ - reply_sequence_number = [aRmc sequenceNumber]; + [aRmc decodeValueOfObjCType: @encode(int) at: &reply_sequence_number]; /* Get the types that we're using, so that we know exactly what qualifiers the forwarder used. If all selectors included qualifiers and I could make sel_types_match() work the way I wanted, we wouldn't need to do this. */ - [aRmc decodeValueOfCType: @encode(char*) - at: &forward_type - withName: NULL]; + [aRmc decodeValueOfObjCType: @encode(char*) at: &forward_type]; if (debug_connection > 1) - NSLog(@"Handling message from 0x%x\n", (gsaddr)self); - req_in_count++; /* Handling an incoming request. */ + NSLog(@"Handling message from 0x%x", (gsaddr)self); + _reqInCount++; /* Handling an incoming request. */ mframe_do_call (forward_type, decoder, encoder); - [op dismiss]; - rep_out_count++; /* Sent back a reply. */ + [self _sendRmc: op type: METHOD_REPLY]; } /* Make sure we pass all exceptions back to the requestor. */ @@ -1431,26 +1747,19 @@ static int messages_received_count; { BOOL is_exception = YES; - /* Try to clean up a little. */ - DESTROY(op); - /* Send the exception back to the client. */ - if (is_valid) + if (_isValid) { NS_DURING { - op = [self newSendingReplyRmcWithSequenceNumber: - reply_sequence_number]; - [op encodeValueOfCType: @encode(BOOL) - at: &is_exception - withName: @"Exceptional reply flag"]; - [op encodeBycopyObject: localException - withName: @"Exception object"]; - [op dismiss]; + op = [self _makeRmc: reply_sequence_number]; + [op encodeValueOfObjCType: @encode(BOOL) + at: &is_exception]; + [op encodeBycopyObject: localException]; + [self _sendRmc: op type: METHOD_REPLY]; } NS_HANDLER { - DESTROY(op); NSLog(@"Exception when sending exception back to client - %@", localException); } @@ -1463,48 +1772,38 @@ static int messages_received_count; objc_free (forward_type); } -- (void) _service_rootObject: rmc +- (void) _service_rootObject: (NSPortCoder*)rmc { - id rootObject = [NSConnection rootObjectForInPort: receive_port]; - NSPortCoder* op = [[self encodingClass] - newForWritingWithConnection: [rmc connection] - sequenceNumber: [rmc sequenceNumber] - identifier: ROOTPROXY_REPLY]; - NSParameterAssert (receive_port); - NSParameterAssert (is_valid); - /* Perhaps we should turn this into a class method. */ + id rootObject = rootObjectForInPort(_receivePort); + int sequence; + NSPortCoder *op; + + NSParameterAssert(_receivePort); + NSParameterAssert(_isValid); NSParameterAssert([rmc connection] == self); - [op encodeObject: rootObject withName: @"root object"]; - [op dismiss]; - [rmc dismiss]; + + [rmc decodeValueOfObjCType: @encode(int) at: &sequence]; + [op encodeObject: rootObject]; + [self _sendRmc: op type: ROOTPROXY_REPLY]; } -- (void) _service_release: rmc forConnection: receiving_connection +- (void) _service_release: (NSPortCoder*)rmc { unsigned int count; unsigned int pos; + int sequence; - NSParameterAssert (is_valid); + NSParameterAssert (_isValid); - if ([rmc connection] != self) - { - [rmc dismiss]; - [NSException raise: @"ProxyDecodedBadTarget" - format: @"request to release object on bad connection"]; - } - - [rmc decodeValueOfCType: @encode(typeof(count)) - at: &count - withName: NULL]; + [rmc decodeValueOfObjCType: @encode(int) at: &sequence]; + [rmc decodeValueOfObjCType: @encode(typeof(count)) at: &count]; for (pos = 0; pos < count; pos++) { unsigned target; NSDistantObject *prox; - [rmc decodeValueOfCType: @encode(typeof(target)) - at: &target - withName: NULL]; + [rmc decodeValueOfObjCType: @encode(typeof(target)) at: &target]; prox = (NSDistantObject*)[self includesLocalTarget: target]; if (prox != nil) @@ -1518,31 +1817,20 @@ static int messages_received_count; NSLog(@"releasing object with target (0x%x) on (0x%x) - nothing to do", target, (gsaddr)self); } - - [rmc dismiss]; } -- (void) _service_retain: rmc forConnection: receiving_connection +- (void) _service_retain: (NSPortCoder*)rmc { unsigned target; NSPortCoder *op; + int sequence; - NSParameterAssert (is_valid); + NSParameterAssert (_isValid); - if ([rmc connection] != self) - { - [rmc dismiss]; - [NSException raise: @"ProxyDecodedBadTarget" - format: @"request to retain object on bad connection"]; - } + [rmc decodeValueOfObjCType: @encode(int) at: &sequence]; + op = [self _makeRmc: sequence]; - op = [[self encodingClass] newForWritingWithConnection: [rmc connection] - sequenceNumber: [rmc sequenceNumber] - identifier: RETAIN_REPLY]; - - [rmc decodeValueOfCType: @encode(typeof(target)) - at: &target - withName: NULL]; + [rmc decodeValueOfObjCType: @encode(typeof(target)) at: &target]; if (debug_connection > 3) NSLog(@"looking to retain local object with target (0x%x) on (0x%x)", @@ -1552,7 +1840,7 @@ static int messages_received_count; { GSLocalCounter *counter; - [proxiesHashGate lock]; + [global_proxies_gate lock]; counter = NSMapGet (all_connections_local_targets, (void*)target); if (counter == nil) { @@ -1575,11 +1863,10 @@ static int messages_received_count; NSLog(@"target (0x%x) moved from cache", target); } } - [proxiesHashGate unlock]; + [global_proxies_gate unlock]; if (counter == nil) { - [op encodeObject: @"target not found anywhere" - withName: @"retain failed"]; + [op encodeObject: @"target not found anywhere"]; if (debug_connection > 3) NSLog(@"target (0x%x) not found anywhere for retain", target); } @@ -1587,7 +1874,7 @@ static int messages_received_count; { [NSDistantObject proxyWithLocal: counter->object connection: self]; - [op encodeObject: nil withName: @"retain ok"]; + [op encodeObject: nil]; if (debug_connection > 3) NSLog(@"retained object (0x%x) target (0x%x) on connection(0x%x)", counter->object, counter->target, self); @@ -1595,91 +1882,52 @@ static int messages_received_count; } else { - [op encodeObject: nil withName: @"already retained"]; + [op encodeObject: nil]; if (debug_connection > 3) NSLog(@"target (0x%x) already retained on connection (0x%x)", target, self); } - [op dismiss]; - [rmc dismiss]; + [self _sendRmc: op type: RETAIN_REPLY]; } - (void) shutdown { - id op; + NSPortCoder *op; - NSParameterAssert(receive_port); - NSParameterAssert (is_valid); - op = [[self encodingClass] - newForWritingWithConnection: self - sequenceNumber: [self _newMsgNumber] - identifier: CONNECTION_SHUTDOWN]; - [op dismiss]; + NSParameterAssert(_receivePort); + NSParameterAssert (_isValid); + op = [self _makeRmc: [self _newMsgNumber]]; + [self _sendRmc: op type: CONNECTION_SHUTDOWN]; } -- (void) _service_shutdown: rmc forConnection: receiving_connection +- (void) _service_shutdown: (NSPortCoder*)rmc { - NSParameterAssert (is_valid); + NSParameterAssert (_isValid); [self invalidate]; - if (receiving_connection == self) - [NSException raise: NSGenericException - format: @"connection waiting for request was shut down"]; - [rmc dismiss]; + [NSException raise: NSGenericException + format: @"connection waiting for request was shut down"]; } -- (const char *) typeForSelector: (SEL)sel remoteTarget: (unsigned)target +- (void) _service_typeForSelector: (NSPortCoder*)rmc { - id op, ip; - char *type = 0; - int seq_num; - - NSParameterAssert(receive_port); - NSParameterAssert (is_valid); - seq_num = [self _newMsgNumber]; - op = [[self encodingClass] - newForWritingWithConnection: self - sequenceNumber: seq_num - identifier: METHODTYPE_REQUEST]; - [op encodeValueOfObjCType: ": " - at: &sel - withName: NULL]; - [op encodeValueOfCType: @encode(unsigned) - at: &target - withName: NULL]; - [op dismiss]; - ip = [self _getReceivedReplyRmcWithSequenceNumber: seq_num]; - [ip decodeValueOfCType: @encode(char*) - at: &type - withName: NULL]; - [ip dismiss]; - return type; -} - -- (void) _service_typeForSelector: rmc -{ - NSPortCoder* op; - unsigned target; + NSPortCoder *op; + unsigned target; NSDistantObject *p; + int sequence; id o; SEL sel; const char *type; struct objc_method* m; - NSParameterAssert(receive_port); - NSParameterAssert (is_valid); - NSParameterAssert([rmc connection] == self); - op = [[self encodingClass] - newForWritingWithConnection: [rmc connection] - sequenceNumber: [rmc sequenceNumber] - identifier: METHODTYPE_REPLY]; + NSParameterAssert(_receivePort); + NSParameterAssert (_isValid); - [rmc decodeValueOfObjCType: ": " - at: &sel - withName: NULL]; - [rmc decodeValueOfCType: @encode(unsigned) - at: &target - withName: NULL]; + [rmc decodeValueOfObjCType: @encode(int) at: &sequence]; + op = [self _makeRmc: sequence]; + + [rmc decodeValueOfObjCType: ":" at: &sel]; + [rmc decodeValueOfObjCType: @encode(unsigned) at: &target]; p = [self includesLocalTarget: target]; o = [p localForProxy]; @@ -1693,11 +1941,8 @@ static int messages_received_count; type = m->method_types; else type = ""; - [op encodeValueOfCType: @encode(char*) - at: &type - withName: @"Requested Method Type for Target"]; - [op dismiss]; - [rmc dismiss]; + [op encodeValueOfObjCType: @encode(char*) at: &type]; + [self _sendRmc: op type: METHODTYPE_REPLY]; } @@ -1713,209 +1958,151 @@ static int messages_received_count; [self runConnectionUntilDate: [NSDate distantFuture]]; } -- (void) _handleRmc: rmc -{ - NSConnection *conn = [rmc connection]; - int ident = [rmc identifier]; - - if (debug_connection > 4) - NSLog(@"handling packet of type %d seq %d\n", ident, [rmc sequenceNumber]); - - switch (ident) - { - case ROOTPROXY_REQUEST: - /* It won't take much time to handle this, so go ahead and service - it, even if we are waiting for a reply. */ - [conn _service_rootObject: rmc]; - break; - case METHODTYPE_REQUEST: - /* It won't take much time to handle this, so go ahead and service - it, even if we are waiting for a reply. */ - [conn _service_typeForSelector: rmc]; - break; - case METHOD_REQUEST: - /* We just got a new request; we need to decide whether to queue - it or service it now. - If the REPLY_DEPTH is 0, then we aren't in the middle of waiting - for a reply, we are waiting for requests---so service it now. - If REPLY_DEPTH is non-zero, we may still want to service it now - if independent_queuing is NO. */ - if (request_depth == 0 || independent_queueing == NO) - { - request_depth++; - [conn _service_forwardForProxy: rmc]; - request_depth--; - /* Service any requests that were queued while we - were waiting for replies. - xxx Is this the right place for this check? */ - if (request_depth == 0) - [self _handleQueuedRmcRequests]; - } - else - { - [received_request_rmc_queue_gate lock]; - [received_request_rmc_queue addObject: rmc]; - [received_request_rmc_queue_gate unlock]; - } - break; - case ROOTPROXY_REPLY: - case METHOD_REPLY: - case METHODTYPE_REPLY: - case RETAIN_REPLY: - /* Remember multi-threaded callbacks will have to be handled specially */ - [received_reply_rmc_queue_gate lock]; - [received_reply_rmc_queue addObject: rmc]; - [received_reply_rmc_queue_gate unlock]; - break; - case CONNECTION_SHUTDOWN: - { - [conn _service_shutdown: rmc forConnection: self]; - break; - } - case PROXY_RELEASE: - { - [conn _service_release: rmc forConnection: self]; - break; - } - case PROXY_RETAIN: - { - [conn _service_retain: rmc forConnection: self]; - break; - } - default: - [rmc dismiss]; - [NSException raise: NSGenericException - format: @"unrecognized NSPortCoder identifier"]; - } -} - -- (void) _handleQueuedRmcRequests -{ - id rmc; - - [received_request_rmc_queue_gate lock]; - RETAIN(self); - while (is_valid && ([received_request_rmc_queue count] > 0)) - { - rmc = [received_request_rmc_queue objectAtIndex: 0]; - RETAIN(rmc); - [received_request_rmc_queue removeObjectAtIndex: 0]; - [received_request_rmc_queue_gate unlock]; - [self _handleRmc: rmc]; - [received_request_rmc_queue_gate lock]; - RELEASE(rmc); - } - RELEASE(self); - [received_request_rmc_queue_gate unlock]; -} - /* Deal with an RMC, either by queuing it for later service, or by servicing it right away. This method is called by the - receive_port's received-packet-invocation. */ - -/* Look for it on the queue, if it is not there, return nil. */ -- _getReceivedReplyRmcFromQueueWithSequenceNumber: (int)sn -{ - id the_rmc = nil; - unsigned count, i; - - [received_reply_rmc_queue_gate lock]; - - count = [received_reply_rmc_queue count]; - /* xxx There should be a per-thread queue of rmcs so we can do - callbacks when multi-threaded. */ - for (i = 0; i < count; i++) - { - id a_rmc = [received_reply_rmc_queue objectAtIndex: i]; - if ([a_rmc connection] == self - && [a_rmc sequenceNumber] == sn) - { - if (debug_connection) - NSLog(@"Getting received reply from queue\n"); - [received_reply_rmc_queue removeObjectAtIndex: i]; - the_rmc = a_rmc; - break; - } - /* xxx Make sure that there isn't a higher sequenceNumber, meaning - that we somehow dropped a packet. */ - } - [received_reply_rmc_queue_gate unlock]; - return the_rmc; -} + _receivePort's received-packet-invocation. */ /* Check the queue, then try to get it from the network by waiting while we run the NSRunLoop. Raise exception if we don't get anything before timing out. */ - _getReceivedReplyRmcWithSequenceNumber: (int)sn { - id rmc; - id timeout_date = nil; + NSPortCoder *rmc; + NSDate *timeout_date = nil; - while (!(rmc = [self _getReceivedReplyRmcFromQueueWithSequenceNumber: sn])) + [_queueGate lock]; + while ((rmc = (NSPortCoder*)NSMapGet(_replyMap, (void*)sn)) == nil) { - if (!timeout_date) - timeout_date = [[NSDate alloc] - initWithTimeIntervalSinceNow: reply_timeout]; + if (timeout_date == nil) + { + timeout_date = [NSDate dateWithTimeIntervalSinceNow: _replyTimeout]; + } + [_queueGate unlock]; if ([NSRunLoop runOnceBeforeDate: timeout_date - forMode: NSConnectionReplyMode] == NO) - break; + forMode: NSConnectionReplyMode] == NO) + { + [NSException raise: NSPortTimeoutException + format: @"timed out waiting for reply"]; + } + [_queueGate lock]; } - if (timeout_date) - [timeout_date release]; - if (rmc == nil) - [NSException raise: NSPortTimeoutException - format: @"timed out waiting for reply"]; + [_queueGate unlock]; return rmc; } -/* Sneaky, sneaky. See "sneaky" comment in TcpPort.m. - This method is called by InPort when it receives a new packet. */ -+ (void) invokeWithObject: packet +- (NSPortCoder*) _makeRmc: (int)sequence { - id rmc; - NSConnection *connection; + NSPortCoder *coder; - if (debug_connection > 3) - NSLog(@"packet arrived on %@", [[packet receivingInPort] description]); + NSParameterAssert(_isValid); - connection = NSMapGet(receive_port_2_ancestor, [packet receivingInPort]); - if (connection && [connection isValid]) - { - rmc = [NSPortCoder newDecodingWithPacket: packet - connection: connection]; - [[rmc connection] _handleRmc: rmc]; - } - else - { - [packet release]; /* Discard data on invalid connection. */ - } + coder = [GSPortCoder portCoderWithReceivePort: [self receivePort] + sendPort: [self sendPort] + components: nil]; + [coder encodeValueOfObjCType: @encode(int) at: &sequence]; + return coder; } - (int) _newMsgNumber { int n; - NSParameterAssert (is_valid); + NSParameterAssert (_isValid); [sequenceNumberGate lock]; - n = message_count++; + n = _messageCount++; [sequenceNumberGate unlock]; return n; } +- (void) _sendRmc: (NSPortCoder*)c type: (int)msgid +{ + NSPortMessage *message; + NSDate *limit; + BOOL raiseException = NO; + NSMutableArray *components = [c _components]; + + if (_authenticateOut == YES) + { + NSData *d; + + d = [[self delegate] authenticationDataForComponents: components]; + if (d == nil) + { + [NSException raise: NSGenericException + format: @"Bad authentication data provided by delegate"]; + } + [components addObject: d]; + } + message = [[NSPortMessage alloc] initWithSendPort: [self sendPort] + receivePort: [self receivePort] + components: components]; + [message setMsgid: msgid]; + limit = [NSDate dateWithTimeIntervalSinceNow: [self requestTimeout]]; + if ([message sendBeforeDate: limit] == NO) + { + NSString *text; + + switch (msgid) + { + case CONNECTION_SHUTDOWN: + case METHOD_REPLY: + case ROOTPROXY_REPLY: + case METHODTYPE_REPLY: + case PROXY_RELEASE: + case PROXY_RETAIN: + case RETAIN_REPLY: + raiseException = YES; + break; + + case METHOD_REQUEST: + case ROOTPROXY_REQUEST: + case METHODTYPE_REQUEST: + default: + raiseException = YES; + break; + } + text = stringFromMsgType(msgid); + if (raiseException == YES) + { + [NSException raise: NSPortTimeoutException format: text]; + } + else + { + NSLog(@"Port operation timed out - %@", text); + } + } + else + { + switch (msgid) + { + case METHOD_REQUEST: + _reqOutCount++; /* Sent a request. */ + break; + case METHOD_REPLY: + _repOutCount++; /* Sent back a reply. */ + break; + default: + break; + } + } +} + + /* Managing objects and proxies. */ -- (void) addLocalObject: anObj +- (void) addLocalObject: (id)anObj { id object = [anObj localForProxy]; unsigned target; GSLocalCounter *counter; - NSParameterAssert (is_valid); - [proxiesHashGate lock]; + NSParameterAssert (_isValid); + [_proxiesGate lock]; + [global_proxies_gate lock]; /* xxx Do we need to check to make sure it's not already there? */ /* This retains object. */ - NSMapInsert(local_objects, (void*)object, anObj); + NSMapInsert(_localObjects, (void*)object, anObj); /* * Keep track of local objects accross all connections. @@ -1935,22 +2122,23 @@ static int messages_received_count; [counter release]; } [anObj setProxyTarget: target]; - NSMapInsert(local_targets, (void*)target, anObj); + NSMapInsert(_localTargets, (void*)target, anObj); if (debug_connection > 2) NSLog(@"add local object (0x%x) target (0x%x) " - @"to connection (0x%x) (ref %d)\n", + @"to connection (0x%x) (ref %d)", (gsaddr)object, target, (gsaddr) self, counter->ref); - [proxiesHashGate unlock]; + [global_proxies_gate unlock]; + [_proxiesGate unlock]; } - (NSDistantObject*) localForObject: (id)object { NSDistantObject *p; - /* Don't assert (is_valid); */ - [proxiesHashGate lock]; - p = NSMapGet (local_objects, (void*)object); - [proxiesHashGate unlock]; + /* Don't assert (_isValid); */ + [_proxiesGate lock]; + p = NSMapGet (_localObjects, (void*)object); + [_proxiesGate unlock]; NSParameterAssert(!p || [p connectionForProxy] == self); return p; } @@ -1968,16 +2156,17 @@ static int messages_received_count; } } -- (void) removeLocalObject: anObj +- (void) removeLocalObject: (id)anObj { NSDistantObject *prox; unsigned target; GSLocalCounter *counter; unsigned val = 0; - [proxiesHashGate lock]; + [global_proxies_gate lock]; + [_proxiesGate lock]; - prox = NSMapGet(local_objects, (void*)anObj); + prox = NSMapGet(_localObjects, (void*)anObj); target = [prox targetForProxy]; /* @@ -2017,15 +2206,16 @@ static int messages_received_count; } } - NSMapRemove(local_objects, (void*)anObj); - NSMapRemove(local_targets, (void*)target); + NSMapRemove(_localObjects, (void*)anObj); + NSMapRemove(_localTargets, (void*)target); if (debug_connection > 2) NSLog(@"remove local object (0x%x) target (0x%x) " - @"from connection (0x%x) (ref %d)\n", + @"from connection (0x%x) (ref %d)", (gsaddr)anObj, target, (gsaddr)self, val); - [proxiesHashGate unlock]; + [_proxiesGate unlock]; + [global_proxies_gate unlock]; } - (void) _release_targets: (unsigned*)list count: (unsigned)number @@ -2037,36 +2227,31 @@ static int messages_received_count; * for the targets in the specified list since we don't have * proxies for them any more. */ - if (receive_port && is_valid && number > 0) { - id op; - unsigned i; + if (_receivePort && _isValid && number > 0) + { + id op; + unsigned i; + int sequence = [self _newMsgNumber]; - op = [[self encodingClass] - newForWritingWithConnection: self - sequenceNumber: [self _newMsgNumber] - identifier: PROXY_RELEASE]; + op = [self _makeRmc: sequence]; - [op encodeValueOfCType: @encode(unsigned) - at: &number - withName: NULL]; + [op encodeValueOfObjCType: @encode(unsigned) at: &number]; - for (i = 0; i < number; i++) - { - [op encodeValueOfCType: @encode(unsigned) - at: &list[i] - withName: NULL]; - if (debug_connection > 3) - NSLog(@"sending release for target (0x%x) on (0x%x)", - list[i], (gsaddr)self); - } + for (i = 0; i < number; i++) + { + [op encodeValueOfObjCType: @encode(unsigned) at: &list[i]]; + if (debug_connection > 3) + NSLog(@"sending release for target (0x%x) on (0x%x)", + list[i], (gsaddr)self); + } - [op dismiss]; - } + [self _sendRmc: op type: PROXY_RELEASE]; + } } NS_HANDLER { if (debug_connection) - NSLog(@"failed to release targets - %@\n", [localException name]); + NSLog(@"failed to release targets - %@", localException); } NS_ENDHANDLER } @@ -2079,33 +2264,27 @@ static int messages_received_count; * Tell the remote app that it must retain the local object * for the target on this connection. */ - if (receive_port && is_valid) + if (_receivePort && _isValid) { - id op; - id ip; - id result; - int seq_num = [self _newMsgNumber]; + NSPortCoder *op; + id ip; + id result; + int seq_num = [self _newMsgNumber]; - op = [[self encodingClass] - newForWritingWithConnection: self - sequenceNumber: seq_num - identifier: PROXY_RETAIN]; + op = [self _makeRmc: seq_num]; + [op encodeValueOfObjCType: @encode(typeof(target)) at: &target]; + [self _sendRmc: op type: PROXY_RETAIN]; - [op encodeValueOfCType: @encode(typeof(target)) - at: &target - withName: NULL]; - - [op dismiss]; ip = [self _getReceivedReplyRmcWithSequenceNumber: seq_num]; - [ip decodeObjectAt: &result withName: NULL]; + [ip decodeValueOfObjCType: @encode(id) at: &result]; if (result != nil) - NSLog(@"failed to retain target - %@\n", result); + NSLog(@"failed to retain target - %@", result); [ip dismiss]; } } NS_HANDLER { - NSLog(@"failed to retain target - %@\n", [localException name]); + NSLog(@"failed to retain target - %@", localException); } NS_ENDHANDLER } @@ -2114,11 +2293,11 @@ static int messages_received_count; { unsigned target = [aProxy targetForProxy]; - /* Don't assert (is_valid); */ - [proxiesHashGate lock]; + /* Don't assert (_isValid); */ + [_proxiesGate lock]; /* This also releases aProxy */ - NSMapRemove (remote_proxies, (void*)target); - [proxiesHashGate unlock]; + NSMapRemove(_remoteProxies, (void*)target); + [_proxiesGate unlock]; /* * Tell the remote application that we have removed our proxy and @@ -2131,10 +2310,10 @@ static int messages_received_count; { NSDistantObject *p; - /* Don't assert (is_valid); */ - [proxiesHashGate lock]; - p = NSMapGet (remote_proxies, (void*)target); - [proxiesHashGate unlock]; + /* Don't assert (_isValid); */ + [_proxiesGate lock]; + p = NSMapGet(_remoteProxies, (void*)target); + [_proxiesGate unlock]; NSParameterAssert(!p || [p connectionForProxy] == self); return p; } @@ -2143,50 +2322,50 @@ static int messages_received_count; { unsigned target = (unsigned int)[aProxy targetForProxy]; - NSParameterAssert (is_valid); + NSParameterAssert (_isValid); NSParameterAssert(aProxy->isa == [NSDistantObject class]); NSParameterAssert([aProxy connectionForProxy] == self); - [proxiesHashGate lock]; - if (NSMapGet (remote_proxies, (void*)target)) + [_proxiesGate lock]; + if (NSMapGet(_remoteProxies, (void*)target)) { - [proxiesHashGate unlock]; + [_proxiesGate unlock]; [NSException raise: NSGenericException format: @"Trying to add the same proxy twice"]; } - NSMapInsert (remote_proxies, (void*)target, aProxy); - [proxiesHashGate unlock]; + NSMapInsert(_remoteProxies, (void*)target, aProxy); + [_proxiesGate unlock]; } - (id) includesProxyForTarget: (unsigned)target { NSDistantObject *ret; - /* Don't assert (is_valid); */ - [proxiesHashGate lock]; - ret = NSMapGet (remote_proxies, (void*)target); - [proxiesHashGate unlock]; + /* Don't assert (_isValid); */ + [_proxiesGate lock]; + ret = NSMapGet (_remoteProxies, (void*)target); + [_proxiesGate unlock]; return ret; } - (id) includesLocalObject: (id)anObj { - NSDistantObject* ret; + NSDistantObject *ret; - /* Don't assert (is_valid); */ - [proxiesHashGate lock]; - ret = NSMapGet(local_objects, (void*)anObj); - [proxiesHashGate unlock]; + /* Don't assert (_isValid); */ + [_proxiesGate lock]; + ret = NSMapGet(_localObjects, (void*)anObj); + [_proxiesGate unlock]; return ret; } - (id) includesLocalTarget: (unsigned)target { - NSDistantObject* ret; + NSDistantObject *ret; - /* Don't assert (is_valid); */ - [proxiesHashGate lock]; - ret = NSMapGet(local_targets, (void*)target); - [proxiesHashGate unlock]; + /* Don't assert (_isValid); */ + [_proxiesGate lock]; + ret = NSMapGet(_localTargets, (void*)target); + [_proxiesGate unlock]; return ret; } @@ -2200,61 +2379,25 @@ static int messages_received_count; { id ret; - /* Don't assert (is_valid); */ - NSParameterAssert (all_connections_local_targets); - [proxiesHashGate lock]; - ret = NSMapGet (all_connections_local_targets, (void*)target); - [proxiesHashGate unlock]; + /* Don't assert (_isValid); */ + [global_proxies_gate lock]; + ret = NSMapGet(all_connections_local_targets, (void*)target); + [global_proxies_gate unlock]; return ret; } - -/* Pass nil to remove any reference keyed by aPort. */ -+ (void) setRootObject: anObj forInPort: (NSPort*)aPort -{ - id oldRootObject = [self rootObjectForInPort: aPort]; - - NSParameterAssert ([aPort isValid]); - /* xxx This retains aPort? How will aPort ever get dealloc'ed? */ - if (oldRootObject != anObj) - { - if (anObj) - { - [root_object_dictionary_gate lock]; - [root_object_dictionary setObject: anObj forKey: aPort]; - [root_object_dictionary_gate unlock]; - } - else /* anObj == nil && oldRootObject != nil */ - { - [root_object_dictionary_gate lock]; - [root_object_dictionary removeObjectForKey: aPort]; - [root_object_dictionary_gate unlock]; - } - } -} - -+ rootObjectForInPort: (NSPort*)aPort -{ - id ro; - - [root_object_dictionary_gate lock]; - ro = [root_object_dictionary objectForKey: aPort]; - [root_object_dictionary_gate unlock]; - return ro; -} - /* Accessing ivars */ /* Prevent trying to encode the connection itself */ -- (void) encodeWithCoder: anEncoder +- (void) encodeWithCoder: (NSCoder*)anEncoder { [self shouldNotImplement: _cmd]; } -+ newWithCoder: aDecoder; +- (id) initWithCoder: (NSCoder*)aDecoder; { [self shouldNotImplement: _cmd]; return self; @@ -2268,23 +2411,23 @@ static int messages_received_count; * NB. It is possible that the death of a port could be notified * to us after we are invalidated - in which case we must ignore it. */ -- (void) portIsInvalid: notification +- (void) portIsInvalid: (NSNotification*)notification { - if (is_valid) + if (_isValid) { id port = [notification object]; if (debug_connection) { NSLog(@"Received port invalidation notification for " - @"connection 0x%x\n\t%@\n", (gsaddr)self, port); + @"connection 0x%x\n\t%@", (gsaddr)self, port); } /* We shouldn't be getting any port invalidation notifications, except from our own ports; this is how we registered ourselves with the NSNotificationCenter in +newForInPort: outPort: ancestorConnection. */ - NSParameterAssert (port == receive_port || port == send_port); + NSParameterAssert (port == _receivePort || port == _sendPort); [self invalidate]; } @@ -2292,13 +2435,3 @@ static int messages_received_count; @end - - -/* Notification Strings. */ - -NSString *NSConnectionDidDieNotification -= @"NSConnectionDidDieNotification"; - -NSString *NSConnectionDidInitializeNotification -= @"NSConnectionDidInitializeNotification"; - diff --git a/Source/GSPortCoder.m b/Source/GSPortCoder.m index c50bf8f4b..b7a083727 100644 --- a/Source/GSPortCoder.m +++ b/Source/GSPortCoder.m @@ -399,10 +399,27 @@ typeCheck(char t1, char t2) - (NSData*) decodeDataObject { - unsigned pos; + int pos; - [self decodeValueOfObjCType: @encode(unsigned) at: &pos]; - return [_comp objectAtIndex: pos]; + [self decodeValueOfObjCType: @encode(int) at: &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 @@ -1121,10 +1138,22 @@ typeCheck(char t1, char t2) */ - (void) encodeDataObject: (NSData*)anObject { - unsigned pos = [_comp count]; + int pos; - [_comp addObject: anObject]; - [self encodeValueOfObjCType: @encode(unsigned) at: &pos]; + if (anObject == nil) + { + 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 @@ -1641,7 +1670,7 @@ typeCheck(char t1, char t2) @implementation GSPortCoder (Private) -- (NSArray*) _components +- (NSMutableArray*) _components { return _comp; } diff --git a/Source/NSArchiver.m b/Source/NSArchiver.m index 82e6a9116..c6d653781 100644 --- a/Source/NSArchiver.m +++ b/Source/NSArchiver.m @@ -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 diff --git a/Source/NSAttributedString.m b/Source/NSAttributedString.m index 0f06eabd5..fbd00ef04 100644 --- a/Source/NSAttributedString.m +++ b/Source/NSAttributedString.m @@ -138,15 +138,15 @@ static Class NSMutableAttributedString_concrete_class; return NSAllocateObject(self, 0, z); } -//NSCoding protocol -- (void) encodeWithCoder: (NSCoder*)anEncoder +- (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: anEncoder]; + [self subclassResponsibility: _cmd]; } - (id) initWithCoder: (NSCoder*)aDecoder { - return [super initWithCoder: aDecoder]; + [self subclassResponsibility: _cmd]; + return nil; } - (Class) classForPortCoder diff --git a/Source/NSCoder.m b/Source/NSCoder.m index 2c2e4bf55..b6092db64 100644 --- a/Source/NSCoder.m +++ b/Source/NSCoder.m @@ -276,6 +276,88 @@ 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 - (NSZone*) objectZone diff --git a/Source/NSConnection.m b/Source/NSConnection.m index df0f3f75e..d2308bea4 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -52,20 +52,6 @@ #include #include -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) - (id) localForProxy; - (void) setProxyTarget: (unsigned)target; @@ -2394,12 +2380,3 @@ static int messages_received_count; @end - -/* Notification Strings. */ - -NSString *NSConnectionDidDieNotification -= @"NSConnectionDidDieNotification"; - -NSString *NSConnectionDidInitializeNotification -= @"NSConnectionDidInitializeNotification"; - diff --git a/Source/NSDistantObject.m b/Source/NSDistantObject.m index 4207ee1fd..683678e15 100644 --- a/Source/NSDistantObject.m +++ b/Source/NSDistantObject.m @@ -211,13 +211,11 @@ enum NSLog(@"Sending a proxy, will be remote 0x%x connection 0x%x\n", proxy_target, (gsaddr)_connection); - [aRmc encodeValueOfCType: @encode(typeof(proxy_tag)) - at: &proxy_tag - withName: @"Proxy is local for sender"]; + [aRmc encodeValueOfObjCType: @encode(typeof(proxy_tag)) + at: &proxy_tag]; - [aRmc encodeValueOfCType: @encode(typeof(proxy_target)) - at: &proxy_target - withName: @"Proxy target"]; + [aRmc encodeValueOfObjCType: @encode(typeof(proxy_target)) + at: &proxy_target]; } else { @@ -230,13 +228,11 @@ enum NSLog(@"Sending a proxy, will be local 0x%x connection 0x%x\n", proxy_target, (gsaddr)_connection); - [aRmc encodeValueOfCType: @encode(typeof(proxy_tag)) - at: &proxy_tag - withName: @"Proxy is local for receiver"]; + [aRmc encodeValueOfObjCType: @encode(typeof(proxy_tag)) + at: &proxy_tag]; - [aRmc encodeValueOfCType: @encode(typeof(proxy_target)) - at: &proxy_target - withName: @"Proxy target"]; + [aRmc encodeValueOfObjCType: @encode(typeof(proxy_target)) + at: &proxy_target]; } } else @@ -275,20 +271,16 @@ enum * It's remote here, so we need to tell other side where to form * triangle connection to */ - [aRmc encodeValueOfCType: @encode(typeof(proxy_tag)) - at: &proxy_tag - withName: @"Proxy remote for both sender and receiver"]; + [aRmc encodeValueOfObjCType: @encode(typeof(proxy_tag)) + at: &proxy_tag]; - [aRmc encodeValueOfCType: @encode(typeof(localProxy->_handle)) - at: &localProxy->_handle - withName: @"Intermediary target"]; + [aRmc encodeValueOfObjCType: @encode(typeof(localProxy->_handle)) + at: &localProxy->_handle]; - [aRmc encodeValueOfCType: @encode(typeof(proxy_target)) - at: &proxy_target - withName: @"Original target"]; + [aRmc encodeValueOfObjCType: @encode(typeof(proxy_target)) + at: &proxy_target]; - [aRmc encodeBycopyObject: proxy_connection_out_port - withName: @"Original port"]; + [aRmc encodeBycopyObject: proxy_connection_out_port]; } } @@ -319,9 +311,8 @@ enum NSAssert(decoder_connection, NSInternalInconsistencyException); /* First get the tag, so we know what values need to be decoded. */ - [aCoder decodeValueOfCType: @encode(typeof(proxy_tag)) - at: &proxy_tag - withName: NULL]; + [aCoder decodeValueOfObjCType: @encode(typeof(proxy_tag)) + at: &proxy_tag]; switch (proxy_tag) { @@ -332,9 +323,8 @@ enum * Lookup the target handle to ensure that it exists here. * Return a retained copy of the local target object. */ - [aCoder decodeValueOfCType: @encode(typeof(target)) - at: &target - withName: NULL]; + [aCoder decodeValueOfObjCType: @encode(typeof(target)) + at: &target]; if (debug_proxy) 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 * create a new proxy object if necessary. */ - [aCoder decodeValueOfCType: @encode(typeof(target)) - at: &target - withName: NULL]; + [aCoder decodeValueOfObjCType: @encode(typeof(target)) + at: &target]; if (debug_proxy) NSLog(@"Receiving a proxy, was local 0x%x connection 0x%x\n", target, (gsaddr)decoder_connection); @@ -408,9 +397,8 @@ enum * time we will have obtained our own proxy for the original * object ... */ - [aCoder decodeValueOfCType: @encode(typeof(intermediary)) - at: &intermediary - withName: NULL]; + [aCoder decodeValueOfObjCType: @encode(typeof(intermediary)) + at: &intermediary]; [NSDistantObject proxyWithTarget: intermediary connection: decoder_connection]; @@ -419,12 +407,11 @@ enum * and (if necessary) get the originating process to retain the * object for us. */ - [aCoder decodeValueOfCType: @encode(typeof(target)) - at: &target - withName: NULL]; + [aCoder decodeValueOfObjCType: @encode(typeof(target)) + at: &target]; - [aCoder decodeObjectAt: &proxy_connection_out_port - withName: NULL]; + [aCoder decodeValueOfObjCType: @encode(id) + at: &proxy_connection_out_port]; NSAssert(proxy_connection_out_port, NSInternalInconsistencyException); /* diff --git a/Source/NSGAttributedString.m b/Source/NSGAttributedString.m index 39134a047..a3e1c065b 100644 --- a/Source/NSGAttributedString.m +++ b/Source/NSGAttributedString.m @@ -100,14 +100,12 @@ - (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; [aCoder encodeValueOfObjCType: @encode(unsigned) at: &loc]; [aCoder encodeValueOfObjCType: @encode(id) at: &attrs]; } - (id) initWithCoder: (NSCoder*)aCoder { - self = [super initWithCoder: aCoder]; [aCoder decodeValueOfObjCType: @encode(unsigned) at: &loc]; [aCoder decodeValueOfObjCType: @encode(id) at: &attrs]; return self; @@ -298,14 +296,12 @@ _attributesAtIndexEffectiveRange( - (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; [aCoder encodeValueOfObjCType: @encode(id) at: &_textChars]; [aCoder encodeValueOfObjCType: @encode(id) at: &_infoArray]; } - (id) initWithCoder: (NSCoder*)aCoder { - self = [super initWithCoder: aCoder]; [aCoder decodeValueOfObjCType: @encode(id) at: &_textChars]; [aCoder decodeValueOfObjCType: @encode(id) at: &_infoArray]; return self; @@ -407,14 +403,12 @@ _attributesAtIndexEffectiveRange( - (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; [aCoder encodeValueOfObjCType: @encode(id) at: &_textChars]; [aCoder encodeValueOfObjCType: @encode(id) at: &_infoArray]; } - (id) initWithCoder: (NSCoder*)aCoder { - self = [super initWithCoder: aCoder]; [aCoder decodeValueOfObjCType: @encode(id) at: &_textChars]; [aCoder decodeValueOfObjCType: @encode(id) at: &_infoArray]; return self; diff --git a/Source/NSHost.m b/Source/NSHost.m index 9672228fb..b588081cf 100644 --- a/Source/NSHost.m +++ b/Source/NSHost.m @@ -279,7 +279,6 @@ static NSString *myHost = nil; - (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; [aCoder encodeObject: [self address]]; } @@ -288,7 +287,6 @@ static NSString *myHost = nil; NSString *address; NSHost *host; - self = [super initWithCoder: aCoder]; address = [aCoder decodeObject]; host = RETAIN([NSHost hostWithAddress: address]); RELEASE(self); diff --git a/Source/NSNotification.m b/Source/NSNotification.m index 366b1a9df..861f35b7b 100644 --- a/Source/NSNotification.m +++ b/Source/NSNotification.m @@ -104,7 +104,6 @@ */ - (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; [aCoder encodeValueOfObjCType: @encode(id) at: &_name]; [aCoder encodeValueOfObjCType: @encode(id) at: &_object]; [aCoder encodeValueOfObjCType: @encode(id) at: &_info]; @@ -112,7 +111,6 @@ - (id) initWithCoder: (NSCoder*)aCoder { - [super initWithCoder: aCoder]; [aCoder decodeValueOfObjCType: @encode(id) at: &_name]; [aCoder decodeValueOfObjCType: @encode(id) at: &_object]; [aCoder decodeValueOfObjCType: @encode(id) at: &_info]; diff --git a/Source/NSObject.m b/Source/NSObject.m index 3a08793cd..4c4eb4217 100644 --- a/Source/NSObject.m +++ b/Source/NSObject.m @@ -677,10 +677,10 @@ static BOOL deallocNotifications = NO; return YES; } -- free +- (id) free { [NSException raise: NSGenericException - format: @"Use `dealloc' instead of `free' for %@.", self]; + format: @"Use `dealloc' instead of `free' for %@.", self]; return nil; } @@ -761,19 +761,19 @@ static BOOL deallocNotifications = NO; + (NSMethodSignature*) instanceMethodSignatureForSelector: (SEL)aSelector { - struct objc_method* mth = class_get_instance_method(self, aSelector); - return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types] - : nil; + struct objc_method* mth = class_get_instance_method(self, aSelector); + return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types] + : nil; } - (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector { - struct objc_method* mth = + struct objc_method* mth = (object_is_instance(self) ? class_get_instance_method(self->isa, aSelector) : class_get_class_method(self->isa, aSelector)); - return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types] - : nil; + return mth ? [NSMethodSignature signatureWithObjCTypes:mth->method_types] + : nil; } - (NSString*) description @@ -873,7 +873,7 @@ static BOOL deallocNotifications = NO; - (Class) classForPortCoder { - return [self classForCoder]; + return [self classForCoder]; } - (id) replacementObjectForArchiver: (NSArchiver*)anArchiver @@ -940,7 +940,7 @@ static BOOL deallocNotifications = NO; return self; } -+ autorelease ++ (id) autorelease { return self; } @@ -960,7 +960,7 @@ static BOOL deallocNotifications = NO; return (unsigned)self; } -- (BOOL) isEqual: anObject +- (BOOL) isEqual: (id)anObject { return (self == anObject); } @@ -1001,7 +1001,7 @@ static BOOL deallocNotifications = NO; return NO; } -- performSelector: (SEL)aSelector +- (id) performSelector: (SEL)aSelector { IMP msg; @@ -1022,7 +1022,7 @@ static BOOL deallocNotifications = NO; return (*msg)(self, aSelector); } -- performSelector: (SEL)aSelector withObject: anObject +- (id) performSelector: (SEL)aSelector withObject: (id) anObject { IMP msg; @@ -1044,7 +1044,9 @@ static BOOL deallocNotifications = NO; return (*msg)(self, aSelector, anObject); } -- performSelector: (SEL)aSelector withObject: object1 withObject: object2 +- (id) performSelector: (SEL)aSelector + withObject: (id) object1 + withObject: (id) object2 { IMP msg; @@ -1106,7 +1108,7 @@ static BOOL deallocNotifications = NO; #endif } -- retain +- (id) retain { #if GS_WITH_GC == 0 NSIncrementExtraRefCount(self); @@ -1114,7 +1116,7 @@ static BOOL deallocNotifications = NO; return self; } -+ retain ++ (id) retain { return self; } @@ -1133,14 +1135,14 @@ static BOOL deallocNotifications = NO; return UINT_MAX; } -- self +- (id) self { return self; } -- (NSZone *)zone +- (NSZone*) zone { - return fastZone(self); + return fastZone(self); } - (void) encodeWithCoder: (NSCoder*)aCoder @@ -1148,17 +1150,17 @@ static BOOL deallocNotifications = NO; return; } -- initWithCoder: (NSCoder*)aDecoder +- (id) initWithCoder: (NSCoder*)aDecoder { return self; } -+ (int)version ++ (int) version { return class_get_version(self); } -+ setVersion:(int)aVersion ++ (id) setVersion: (int)aVersion { if (aVersion < 0) [NSException raise: NSInvalidArgumentException @@ -1175,7 +1177,7 @@ static BOOL deallocNotifications = NO; /* NEXTSTEP Object class compatibility */ -- error:(const char *)aString, ... +- error: (const char *)aString, ... { #define FMT "error: %s (%s)\n%s\n" 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); } -- (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 { - return [self conformsToProtocol:aProtocol]; + return [self conformsToProtocol: 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); } -+ (IMP) instanceMethodFor:(SEL)aSel ++ (IMP) instanceMethodFor: (SEL)aSel { return [self instanceMethodForSelector:aSel]; } @@ -1246,18 +1248,18 @@ static BOOL deallocNotifications = NO; : 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; } -- notImplemented:(SEL)aSel +- (id) notImplemented: (SEL)aSel { [NSException raise: NSGenericException @@ -1265,7 +1267,7 @@ static BOOL deallocNotifications = NO; return nil; } -- doesNotRecognize:(SEL)aSel +- (id) doesNotRecognize: (SEL)aSel { [NSException raise: NSGenericException format: @"%s does not recognize %s", @@ -1273,12 +1275,12 @@ static BOOL deallocNotifications = NO; return nil; } -- perform: (SEL)sel with: anObject +- (id) perform: (SEL)sel with: (id)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 withObject:anotherObject]; @@ -1399,19 +1401,19 @@ static BOOL deallocNotifications = NO; // before doing their own archiving. These methods are private, in // the sense that they should only be called from subclasses. -- read: (TypedStream*)aStream +- (id) read: (TypedStream*)aStream { // [super read: aStream]; return self; } -- write: (TypedStream*)aStream +- (id) write: (TypedStream*)aStream { // [super write: aStream]; return self; } -- awake +- (id) awake { // [super awake]; return self; diff --git a/Source/NSPort.m b/Source/NSPort.m index 38f57efb3..d282e3c90 100644 --- a/Source/NSPort.m +++ b/Source/NSPort.m @@ -31,12 +31,6 @@ #include #include -NSString* NSPortDidBecomeInvalidNotification -= @"NSPortDidBecomeInvalidNotification"; - -NSString *NSPortTimeoutException -= @"NSPortTimeoutException"; - @implementation NSPort + (NSPort*) port diff --git a/Source/NSPortMessage.m b/Source/NSPortMessage.m index 35931753a..7309d2f46 100644 --- a/Source/NSPortMessage.m +++ b/Source/NSPortMessage.m @@ -75,14 +75,6 @@ return self; } -- (void) addComponent: (id)aComponent -{ - NSAssert([aComponent isKindOfClass: [NSData class]] - || [aComponent isKindOfClass: [NSPort class]], - NSInvalidArgumentException); - [_components addObject: aComponent]; -} - - (NSArray*) components { return AUTORELEASE([_components copy]); @@ -117,3 +109,10 @@ } @end +@implementation NSPortMessage (Private) +- (NSMutableArray*) _components +{ + return _components; +} +@end + diff --git a/Source/NSRunLoop.m b/Source/NSRunLoop.m index fcc2ca095..1deb2cc75 100644 --- a/Source/NSRunLoop.m +++ b/Source/NSRunLoop.m @@ -1315,11 +1315,6 @@ const NSMapTableValueCallBacks ArrayMapValueCallBacks = [self runUntilDate: date forMode: _current_mode]; } - -/* NSRunLoop mode strings. */ - -id NSDefaultRunLoopMode = @"NSDefaultRunLoopMode"; - @end diff --git a/Source/NSTimeZone.m b/Source/NSTimeZone.m index ebd9ea8f9..e6671d098 100644 --- a/Source/NSTimeZone.m +++ b/Source/NSTimeZone.m @@ -332,7 +332,6 @@ decode (const void *ptr) - (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; if (self == localTimeZone) [aCoder encodeObject: @"NSLocalTimeZone"]; else @@ -348,9 +347,8 @@ decode (const void *ptr) return [NSTimeZone timeZoneWithName: name]; } -- (id) initWithDecoder: (NSCoder*)aDecoder +- (id) initWithCoder: (NSCoder*)aDecoder { - self = [super initWithCoder: aDecoder]; [aDecoder decodeValueOfObjCType: @encode(id) at: &name]; return self; } @@ -452,15 +450,13 @@ static NSMapTable *absolutes = 0; [super dealloc]; } -- (void) encodeWithCoder: aCoder +- (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; [aCoder encodeObject: name]; } -- (id) initWithCoder: aDecoder +- (id) initWithCoder: (NSCoder*)aDecoder { - self = [super initWithCoder: aDecoder]; [aDecoder decodeValueOfObjCType: @encode(id) at: &name]; offset = [name intValue]; detail = [[NSConcreteTimeZoneDetail alloc] @@ -509,17 +505,15 @@ static NSMapTable *absolutes = 0; [super dealloc]; } -- (void) encodeWithCoder: aCoder +- (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; [aCoder encodeObject: abbrev]; [aCoder encodeValueOfObjCType: @encode(int) at: &offset]; [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(int) at: &offset]; [aDecoder decodeValueOfObjCType: @encode(BOOL) at: &is_dst]; diff --git a/Source/NSURL.m b/Source/NSURL.m index a50330615..8e991c178 100644 --- a/Source/NSURL.m +++ b/Source/NSURL.m @@ -163,7 +163,6 @@ NSString* NSURLPartKey_query = @"query"; //----------------------------------------------------------------------------- - (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; [aCoder encodeObject: _urlString]; [aCoder encodeObject: _baseURL]; //FIXME? _clients ? @@ -172,7 +171,6 @@ NSString* NSURLPartKey_query = @"query"; //----------------------------------------------------------------------------- - (id) initWithCoder: (NSCoder*)aCoder { - self = [super initWithCoder: aCoder]; [aCoder decodeValueOfObjCType: @encode(id) at: &_urlString]; [aCoder decodeValueOfObjCType: @encode(id) at: &_baseURL]; //FIXME? _clients ? diff --git a/Source/NSUnarchiver.m b/Source/NSUnarchiver.m index 25a7d4249..78cf80443 100644 --- a/Source/NSUnarchiver.m +++ b/Source/NSUnarchiver.m @@ -1297,70 +1297,5 @@ mapClassName(NSUnarchiverObjectInfo *info) 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 diff --git a/Source/externs.m b/Source/externs.m index 9deb75262..ee37f54cb 100644 --- a/Source/externs.m +++ b/Source/externs.m @@ -35,55 +35,73 @@ creating the potential for deadlock. */ NSRecursiveLock *gnustep_global_lock = nil; -/* Connection Notification Strings. */ +/* + * Connection Notification Strings. + */ +NSString* const NSConnectionDidDieNotification + = @"NSConnectionDidDieNotification"; +NSString* const NSConnectionDidInitializeNotification + = @"NSConnectionDidInitializeNotification"; -NSString *ConnectionBecameInvalidNotification = -@"ConnectionBecameInvalidNotification"; - -NSString *ConnectionWasCreatedNotification = -@"ConnectionWasCreatedNotification"; - -/* NSThread Notifications */ -NSString *NSWillBecomeMultiThreadedNotification +/* + * NSThread Notifications + */ +NSString* const NSWillBecomeMultiThreadedNotification = @"NSWillBecomeMultiThreadedNotification"; -NSString *NSThreadWillExitNotification +NSString* const NSThreadWillExitNotification = @"NSThreadWillExitNotification"; -/* Port Notifications */ -NSString *PortBecameInvalidNotification = @"PortBecameInvalidNotification"; - -NSString *InPortClientBecameInvalidNotification = +/* + * Port Notifications + */ +NSString* const PortBecameInvalidNotification = +@"PortBecameInvalidNotification"; +NSString* const InPortClientBecameInvalidNotification = @"InPortClientBecameInvalidNotification"; - -NSString *InPortAcceptedClientNotification = +NSString* const InPortAcceptedClientNotification = @"InPortAcceptedClientNotification"; -/* RunLoop modes */ -NSString *RunLoopConnectionReplyMode = @"RunLoopConnectionReplyMode"; +NSString* const NSPortDidBecomeInvalidNotification + = @"NSPortDidBecomeInvalidNotification"; + + +/* RunLoop modes */ +NSString* const NSDefaultRunLoopMode + = @"NSDefaultRunLoopMode"; +NSString* const NSConnectionReplyMode + = @"NSConnectionReplyMode"; -/* RunLoop mode strings. */ -id RunLoopDefaultMode = @"RunLoopDefaultMode"; /* Exceptions */ -NSString *NSInconsistentArchiveException = @"NSInconsistentArchiveException"; -NSString *NSGenericException = @"NSGenericException"; -NSString *NSInternalInconsistencyException = -@"NSInternalInconsistencyException"; -NSString *NSInvalidArgumentException = @"NSInvalidArgumentException"; -NSString *NSMallocException = @"NSMallocException"; -NSString *NSRangeException = @"NSRangeException"; -NSString *NSCharacterConversionException = @"NSCharacterConversionException"; +NSString* const NSCharacterConversionException + = @"NSCharacterConversionException"; +NSString* const NSFailedAuthenticationException + = @"NSFailedAuthenticationException"; +NSString* const NSGenericException + = @"NSGenericException"; +NSString* const NSInconsistentArchiveException + = @"NSInconsistentArchiveException"; +NSString* const NSInternalInconsistencyException + = @"NSInternalInconsistencyException"; +NSString* const NSInvalidArgumentException + = @"NSInvalidArgumentException"; +NSString* const NSMallocException + = @"NSMallocException"; +NSString* const NSPortTimeoutException + = @"NSPortTimeoutException"; +NSString* const NSRangeException + = @"NSRangeException"; /* Exception handler */ NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler; /* NSBundle */ -NSString* NSBundleDidLoadNotification = @"NSBundleDidLoadNotification"; -NSString* NSShowNonLocalizedStrings = @"NSShowNonLocalizedStrings"; -NSString* NSLoadedClasses = @"NSLoadedClasses"; +NSString* const NSBundleDidLoadNotification = @"NSBundleDidLoadNotification"; +NSString* const NSShowNonLocalizedStrings = @"NSShowNonLocalizedStrings"; +NSString* const NSLoadedClasses = @"NSLoadedClasses"; /* Stream */ -NSString* StreamException = @"StreamException"; +NSString* const StreamException = @"StreamException"; /* * File attributes names @@ -91,71 +109,141 @@ NSString* StreamException = @"StreamException"; /* File Attributes */ -NSString* const NSFileDeviceIdentifier = @"NSFileDeviceIdentifier"; -NSString* const NSFileGroupOwnerAccountName = @"NSFileGroupOwnerAccountName"; -NSString* const NSFileGroupOwnerAccountNumber = @"NSFileGroupOwnerAccountNumber"; -NSString* const NSFileModificationDate = @"NSFileModificationDate"; -NSString* const NSFileOwnerAccountName = @"NSFileOwnerAccountName"; -NSString* const NSFileOwnerAccountNumber = @"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"; +NSString* const NSFileDeviceIdentifier + = @"NSFileDeviceIdentifier"; +NSString* const NSFileGroupOwnerAccountName + = @"NSFileGroupOwnerAccountName"; +NSString* const NSFileGroupOwnerAccountNumber + = @"NSFileGroupOwnerAccountNumber"; +NSString* const NSFileModificationDate + = @"NSFileModificationDate"; +NSString* const NSFileOwnerAccountName + = @"NSFileOwnerAccountName"; +NSString* const NSFileOwnerAccountNumber + = @"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 */ -NSString* const NSFileTypeDirectory = @"NSFileTypeDirectory"; -NSString* const NSFileTypeRegular = @"NSFileTypeRegular"; -NSString* const NSFileTypeSymbolicLink = @"NSFileTypeSymbolicLink"; -NSString* const NSFileTypeSocket = @"NSFileTypeSocket"; -NSString* const NSFileTypeFifo = @"NSFileTypeFifo"; -NSString* const NSFileTypeCharacterSpecial = @"NSFileTypeCharacterSpecial"; -NSString* const NSFileTypeBlockSpecial = @"NSFileTypeBlockSpecial"; -NSString* const NSFileTypeUnknown = @"NSFileTypeUnknown"; +NSString* const NSFileTypeDirectory + = @"NSFileTypeDirectory"; +NSString* const NSFileTypeRegular + = @"NSFileTypeRegular"; +NSString* const NSFileTypeSymbolicLink + = @"NSFileTypeSymbolicLink"; +NSString* const NSFileTypeSocket + = @"NSFileTypeSocket"; +NSString* const NSFileTypeFifo + = @"NSFileTypeFifo"; +NSString* const NSFileTypeCharacterSpecial + = @"NSFileTypeCharacterSpecial"; +NSString* const NSFileTypeBlockSpecial + = @"NSFileTypeBlockSpecial"; +NSString* const NSFileTypeUnknown + = @"NSFileTypeUnknown"; /* FileSystem Attributes */ -NSString* const NSFileSystemSize = @"NSFileSystemSize"; -NSString* const NSFileSystemFreeSize = @"NSFileSystemFreeSize"; -NSString* const NSFileSystemNodes = @"NSFileSystemNodes"; -NSString* const NSFileSystemFreeNodes = @"NSFileSystemFreeNodes"; +NSString* const NSFileSystemSize + = @"NSFileSystemSize"; +NSString* const NSFileSystemFreeSize + = @"NSFileSystemFreeSize"; +NSString* const NSFileSystemNodes + = @"NSFileSystemNodes"; +NSString* const NSFileSystemFreeNodes + = @"NSFileSystemFreeNodes"; /* Standard domains */ -NSString* const NSArgumentDomain = @"NSArgumentDomain"; -NSString* const NSGlobalDomain = @"NSGlobalDomain"; -NSString* const NSRegistrationDomain = @"NSRegistrationDomain"; +NSString* const NSArgumentDomain + = @"NSArgumentDomain"; +NSString* const NSGlobalDomain + = @"NSGlobalDomain"; +NSString* const NSRegistrationDomain + = @"NSRegistrationDomain"; /* Public notification */ -NSString* const NSUserDefaultsDidChangeNotification = @"NSUserDefaultsDidChangeNotification"; +NSString* const NSUserDefaultsDidChangeNotification + = @"NSUserDefaultsDidChangeNotification"; /* Keys for language-dependent information */ -NSString* const NSWeekDayNameArray = @"NSWeekDayNameArray"; -NSString* const NSShortWeekDayNameArray = @"NSShortWeekDayNameArray"; -NSString* const NSMonthNameArray = @"NSMonthNameArray"; -NSString* const NSShortMonthNameArray = @"NSShortMonthNameArray"; -NSString* const NSTimeFormatString = @"NSTimeFormatString"; -NSString* const NSDateFormatString = @"NSDateFormatString"; -NSString* const NSTimeDateFormatString = @"NSTimeDateFormatString"; -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 NSWeekDayNameArray + = @"NSWeekDayNameArray"; +NSString* const NSShortWeekDayNameArray + = @"NSShortWeekDayNameArray"; +NSString* const NSMonthNameArray + = @"NSMonthNameArray"; +NSString* const NSShortMonthNameArray + = @"NSShortMonthNameArray"; +NSString* const NSTimeFormatString + = @"NSTimeFormatString"; +NSString* const NSDateFormatString + = @"NSDateFormatString"; +NSString* const NSTimeDateFormatString + = @"NSTimeDateFormatString"; +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 NSYearMonthWeekDesignations = @"NSYearMonthWeekDesignations"; -NSString* const NSEarlierTimeDesignations = @"NSEarlierTimeDesignations"; -NSString* const NSLaterTimeDesignations = @"NSLaterTimeDesignations"; -NSString* const NSThisDayDesignations = @"NSThisDayDesignations"; -NSString* const NSNextDayDesignations = @"NSNextDayDesignations"; -NSString* const NSNextNextDayDesignations = @"NSNextNextDayDesignations"; -NSString* const NSPriorDayDesignations = @"NSPriorDayDesignations"; -NSString* const NSDateTimeOrdering = @"NSDateTimeOrdering"; +NSString* const NSHourNameDesignations + = @"NSHourNameDesignations"; +NSString* const NSYearMonthWeekDesignations + = @"NSYearMonthWeekDesignations"; +NSString* const NSEarlierTimeDesignations + = @"NSEarlierTimeDesignations"; +NSString* const NSLaterTimeDesignations + = @"NSLaterTimeDesignations"; +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 */