mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
Substitute (NSString*) for (id <String>)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1945 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ed85bf15d5
commit
79194a56fa
34 changed files with 212 additions and 212 deletions
|
@ -40,19 +40,19 @@
|
|||
It reads the CStream signature at the beginning of the file, and
|
||||
automatically creates the appropriate subclass of CStream with
|
||||
the correct format version. */
|
||||
+ cStreamReadingFromFile: (id <String>) filename;
|
||||
+ cStreamReadingFromFile: (NSString*) filename;
|
||||
+ cStreamReadingFromStream: (id <Streaming>) stream;
|
||||
|
||||
/* These are standard ways to create a new CStream with a Stream
|
||||
that is open for writing. */
|
||||
- initForWritingToFile: (id <String>) filename;
|
||||
- initForWritingToFile: (NSString*) filename;
|
||||
- initForWritingToStream: (id <Streaming>) stream;
|
||||
|
||||
- initForWritingToStream: (id <Streaming>) s
|
||||
withFormatVersion: (int)version;
|
||||
|
||||
+ cStreamWritingToStream: (id <Streaming>) stream;
|
||||
+ cStreamWritingToFile: (id <String>) filename;
|
||||
+ cStreamWritingToFile: (NSString*) filename;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -31,18 +31,18 @@
|
|||
|
||||
- (void) encodeValueOfCType: (const char*) type
|
||||
at: (const void*) d
|
||||
withName: (id <String>) name;
|
||||
withName: (NSString*) name;
|
||||
- (void) decodeValueOfCType: (const char*) type
|
||||
at: (void*) d
|
||||
withName: (id <String> *) namePtr;
|
||||
withName: (NSString* *) namePtr;
|
||||
|
||||
- (void) encodeWithName: (id <String>) name
|
||||
- (void) encodeWithName: (NSString*) name
|
||||
valuesOfCTypes: (const char *) types, ...;
|
||||
- (void) decodeWithName: (id <String> *)name
|
||||
- (void) decodeWithName: (NSString* *)name
|
||||
valuesOfCTypes: (const char *)types, ...;
|
||||
|
||||
- (void) encodeName: (id <String>) name;
|
||||
- (void) decodeName: (id <String> *) name;
|
||||
- (void) encodeName: (NSString*) name;
|
||||
- (void) decodeName: (NSString* *) name;
|
||||
|
||||
- (void) encodeIndent;
|
||||
- (void) decodeIndent;
|
||||
|
|
|
@ -64,10 +64,10 @@
|
|||
unsigned fref_counter; /* Keep track of unused fref numbers */
|
||||
}
|
||||
|
||||
- initForWritingToFile: (id <String>) filename;
|
||||
- initForWritingToFile: (id <String>) filename
|
||||
- initForWritingToFile: (NSString*) filename;
|
||||
- initForWritingToFile: (NSString*) filename
|
||||
withCStreamClass: (Class) cStreamClass;
|
||||
- initForWritingToFile: (id <String>) filename
|
||||
- initForWritingToFile: (NSString*) filename
|
||||
withFormatVersion: (int) version
|
||||
cStreamClass: (Class)scc
|
||||
cStreamFormatVersion: (int) cStreamFormatVersion;
|
||||
|
@ -81,10 +81,10 @@
|
|||
cStreamFormatVersion: (int) cStreamFormatVersion;
|
||||
|
||||
+ (BOOL) encodeRootObject: anObject
|
||||
withName: (id <String>) name
|
||||
toFile: (id <String>) filename;
|
||||
withName: (NSString*) name
|
||||
toFile: (NSString*) filename;
|
||||
+ (BOOL) encodeRootObject: anObject
|
||||
withName: (id <String>) name
|
||||
withName: (NSString*) name
|
||||
toStream: (id <Streaming>)stream;
|
||||
|
||||
/* Defaults */
|
||||
|
@ -118,12 +118,12 @@
|
|||
header of the file or stream determines which subclass of Decoder
|
||||
is created. */
|
||||
|
||||
+ newReadingFromFile: (id <String>) filename;
|
||||
+ newReadingFromFile: (NSString*) filename;
|
||||
+ newReadingFromStream: (id <Streaming>)stream;
|
||||
|
||||
+ decodeObjectWithName: (id <String> *) name
|
||||
fromFile: (id <String>) filename;
|
||||
+ decodeObjectWithName: (id <String> *) name
|
||||
+ decodeObjectWithName: (NSString* *) name
|
||||
fromFile: (NSString*) filename;
|
||||
+ decodeObjectWithName: (NSString* *) name
|
||||
fromStream: (id <Streaming>)stream;
|
||||
|
||||
@end
|
||||
|
|
|
@ -92,12 +92,12 @@
|
|||
it's unclear if we're connecting to another Connection that already
|
||||
registered with that name. */
|
||||
+ (Connection*) newWithRootObject: anObj;
|
||||
+ (Connection*) newRegisteringAtName: (id <String>)n withRootObject: anObj;
|
||||
+ (Connection*) newRegisteringAtName: (NSString*)n withRootObject: anObj;
|
||||
|
||||
/* Get a proxy to a remote server object.
|
||||
A new connection is created if necessary. */
|
||||
+ (Proxy*) rootProxyAtName: (id <String>)name onHost: (id <String>)host;
|
||||
+ (Proxy*) rootProxyAtName: (id <String>)name;
|
||||
+ (Proxy*) rootProxyAtName: (NSString*)name onHost: (NSString*)host;
|
||||
+ (Proxy*) rootProxyAtName: (NSString*)name;
|
||||
+ (Proxy*) rootProxyAtPort: (OutPort*)anOutPort;
|
||||
+ (Proxy*) rootProxyAtPort: (OutPort*)anOutPort withInPort: (InPort*)anInPort;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include <gnustep/base/NotificationDispatcher.h>
|
||||
|
||||
@protocol Notifying
|
||||
- (id <String>) name;
|
||||
- (NSString*) name;
|
||||
- object;
|
||||
- userInfo;
|
||||
@end
|
||||
|
@ -46,10 +46,10 @@
|
|||
id _info;
|
||||
}
|
||||
|
||||
+ notificationWithName: (id <String>)name
|
||||
+ notificationWithName: (NSString*)name
|
||||
object: object;
|
||||
|
||||
+ notificationWithName: (id <String>)name
|
||||
+ notificationWithName: (NSString*)name
|
||||
object: object
|
||||
userInfo: info;
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
INVOCATION and NAME, however, are retained. */
|
||||
|
||||
- (void) addInvocation: (id <Invoking>)invocation
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object;
|
||||
|
||||
/* Register OBSERVER to receive future notifications that match NAME
|
||||
|
@ -132,18 +132,18 @@
|
|||
|
||||
- (void) addObserver: observer
|
||||
selector: (SEL)sel
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object;
|
||||
|
||||
/* Class versions of the above two methods that send these messages
|
||||
to the default NotificationDispatcher for the class. */
|
||||
|
||||
+ (void) addInvocation: (id <Invoking>)invocation
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object;
|
||||
+ (void) addObserver: observer
|
||||
selector: (SEL)sel
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object;
|
||||
|
||||
|
||||
|
@ -159,7 +159,7 @@
|
|||
request, nil NAME or OBJECT act as wildcards. */
|
||||
|
||||
- (void) removeInvocation: invocation
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object;
|
||||
|
||||
/* Remove all records pertaining to OBSERVER. For instance, this
|
||||
|
@ -172,7 +172,7 @@
|
|||
OBJECT act as wildcards. */
|
||||
|
||||
- (void) removeObserver: observer
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object;
|
||||
|
||||
/* Class versions of the above four methods that send these messages
|
||||
|
@ -180,11 +180,11 @@
|
|||
|
||||
+ (void) removeInvocation: invocation;
|
||||
+ (void) removeInvocation: invocation
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object;
|
||||
+ (void) removeObserver: observer;
|
||||
+ (void) removeObserver: observer
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object;
|
||||
|
||||
|
||||
|
@ -195,9 +195,9 @@
|
|||
pass that single object instead of a Dictionary containing the object. */
|
||||
|
||||
- (void) postNotification: notification;
|
||||
- (void) postNotificationName: (id <String>)name
|
||||
- (void) postNotificationName: (NSString*)name
|
||||
object: object;
|
||||
- (void) postNotificationName: (id <String>)name
|
||||
- (void) postNotificationName: (NSString*)name
|
||||
object: object
|
||||
userInfo: info;
|
||||
|
||||
|
@ -205,9 +205,9 @@
|
|||
to the default NotificationDispatcher for the class. */
|
||||
|
||||
+ (void) postNotification: notification;
|
||||
+ (void) postNotificationName: (id <String>)name
|
||||
+ (void) postNotificationName: (NSString*)name
|
||||
object: object;
|
||||
+ (void) postNotificationName: (id <String>)name
|
||||
+ (void) postNotificationName: (NSString*)name
|
||||
object: object
|
||||
userInfo: info;
|
||||
|
||||
|
|
|
@ -55,12 +55,12 @@
|
|||
}
|
||||
|
||||
+ newForReceiving;
|
||||
+ newForReceivingFromRegisteredName: (id <String>)name;
|
||||
+ newForReceivingFromRegisteredName: (NSString*)name;
|
||||
|
||||
/* Register/Unregister this port for input handling through RunLoop
|
||||
RUN_LOOP in mode MODE. */
|
||||
- (void) addToRunLoop: run_loop forMode: (id <String>)mode;
|
||||
- (void) removeFromRunLoop: run_loop forMode: (id <String>)mode;
|
||||
- (void) addToRunLoop: run_loop forMode: (NSString*)mode;
|
||||
- (void) removeFromRunLoop: run_loop forMode: (NSString*)mode;
|
||||
|
||||
/* When a RunLoop is handling this InPort, and a new incoming
|
||||
packet arrives, INVOCATION will be invoked with the new packet
|
||||
|
@ -79,8 +79,8 @@
|
|||
|
||||
@interface OutPort : Port
|
||||
|
||||
+ newForSendingToRegisteredName: (id <String>)name
|
||||
onHost: (id <String>)hostname;
|
||||
+ newForSendingToRegisteredName: (NSString*)name
|
||||
onHost: (NSString*)hostname;
|
||||
- (BOOL) sendPacket: packet;
|
||||
|
||||
@end
|
||||
|
|
|
@ -17,30 +17,30 @@
|
|||
}
|
||||
|
||||
- (void) addPort: port
|
||||
forMode: (id <String>)mode;
|
||||
forMode: (NSString*)mode;
|
||||
- (void) removePort: port
|
||||
forMode: (id <String>)mode;
|
||||
forMode: (NSString*)mode;
|
||||
|
||||
- (void) addTimer: timer forMode: (id <String>)mode;
|
||||
- (void) addTimer: timer forMode: (NSString*)mode;
|
||||
|
||||
- limitDateForMode: (id <String>)mode;
|
||||
- (void) acceptInputForMode: (id <String>)mode
|
||||
- limitDateForMode: (NSString*)mode;
|
||||
- (void) acceptInputForMode: (NSString*)mode
|
||||
beforeDate: date;
|
||||
- (id <String>) currentMode;
|
||||
- (NSString*) currentMode;
|
||||
|
||||
- (void) run;
|
||||
- (void) runUntilDate: limit_date;
|
||||
- (BOOL) runOnceBeforeDate: date;
|
||||
- (BOOL) runOnceBeforeDate: date forMode: (id <String>)mode;
|
||||
- (BOOL) runOnceBeforeDate: date forMode: (NSString*)mode;
|
||||
|
||||
+ (void) run;
|
||||
+ (void) runUntilDate: date;
|
||||
+ (void) runUntilDate: date forMode: (id <String>)mode;
|
||||
+ (void) runUntilDate: date forMode: (NSString*)mode;
|
||||
+ (BOOL) runOnceBeforeDate: date;
|
||||
+ (BOOL) runOnceBeforeDate: date forMode: (id <String>)mode;
|
||||
+ (BOOL) runOnceBeforeDate: date forMode: (NSString*)mode;
|
||||
|
||||
+ currentInstance;
|
||||
+ (id <String>) currentMode;
|
||||
+ (NSString*) currentMode;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -64,16 +64,16 @@ extern id RunLoopDefaultMode;
|
|||
message whenever the descriptor (fd) is readable. */
|
||||
- (void) addReadDescriptor: (int)fd
|
||||
object: (id <FdListening>)listener
|
||||
forMode: (id <String>)mode;
|
||||
forMode: (NSString*)mode;
|
||||
/* Register an object (speaker) to receive 'readyForWritingOnFileDescriptor:'
|
||||
message whenever the descriptor (fd) is writable. */
|
||||
- (void) addWriteDescriptor: (int)fd
|
||||
object: (id <FdSpeaking>)speaker
|
||||
forMode: (id <String>)mode;
|
||||
forMode: (NSString*)mode;
|
||||
- (void) removeReadDescriptor: (int)fd
|
||||
forMode: (id <String>)mode;
|
||||
forMode: (NSString*)mode;
|
||||
- (void) removeWriteDescriptor: (int)fd
|
||||
forMode: (id <String>)mode;
|
||||
forMode: (NSString*)mode;
|
||||
@end
|
||||
|
||||
/* xxx This interface will probably change. */
|
||||
|
|
|
@ -48,7 +48,7 @@ typedef struct sockaddr_in sockport_t;
|
|||
+ newForSockPort: (sockport_t)s;
|
||||
+ newLocalWithNumber: (int)n;
|
||||
+ newLocal;
|
||||
+ newRemoteWithNumber: (int)n onHost: (id <String>)h;
|
||||
+ newRemoteWithNumber: (int)n onHost: (NSString*)h;
|
||||
|
||||
- (sockport_t) sockPort;
|
||||
|
||||
|
|
|
@ -38,15 +38,15 @@
|
|||
+ standardOut;
|
||||
+ standardError;
|
||||
|
||||
+ streamWithFilename: (id <String>)name fmode: (const char *)m;
|
||||
+ streamWithFilename: (NSString*)name fmode: (const char *)m;
|
||||
/* xxx Add the others too. */
|
||||
|
||||
- initWithFilePointer: (FILE*)afp fmode: (const char *)m;
|
||||
- initWithFilename: (id <String>)name fmode: (const char *)m;
|
||||
- initWithFilename: (NSString*)name fmode: (const char *)m;
|
||||
- initWithFileDescriptor: (int)fd fmode: (const char *)m;
|
||||
|
||||
- initWithPipeTo: (id <String>)systemCommand;
|
||||
- initWithPipeFrom: (id <String>)systemCommand;
|
||||
- initWithPipeTo: (NSString*)systemCommand;
|
||||
- initWithPipeFrom: (NSString*)systemCommand;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -35,13 +35,13 @@
|
|||
- (int) writeBytes: (const void*)b length: (int)l;
|
||||
- (int) readBytes: (void*)b length: (int)l;
|
||||
|
||||
- (int) writeFormat: (id <String>)format, ...;
|
||||
- (int) readFormat: (id <String>)format, ...;
|
||||
- (int) writeFormat: (id <String>)format arguments: (va_list)arg;
|
||||
- (int) readFormat: (id <String>)format arguments: (va_list)arg;
|
||||
- (int) writeFormat: (NSString*)format, ...;
|
||||
- (int) readFormat: (NSString*)format, ...;
|
||||
- (int) writeFormat: (NSString*)format arguments: (va_list)arg;
|
||||
- (int) readFormat: (NSString*)format arguments: (va_list)arg;
|
||||
|
||||
- (void) writeLine: (id <String>)l;
|
||||
- (id <String>) readLine;
|
||||
- (void) writeLine: (NSString*)l;
|
||||
- (NSString*) readLine;
|
||||
|
||||
- (unsigned) streamPosition;
|
||||
- (BOOL) isAtEof;
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
}
|
||||
|
||||
+ newForSendingToPortNumber: (unsigned short)n
|
||||
onHost: (id <String>)hostname;
|
||||
onHost: (NSString*)hostname;
|
||||
- (int) portNumber;
|
||||
|
||||
@end
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
}
|
||||
|
||||
- (int) portNumber;
|
||||
- (id <String>) hostname;
|
||||
- (NSString*) hostname;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
- (float) floatValue;
|
||||
- (double) doubleValue;
|
||||
- (const char *) cStringValue;
|
||||
- /* (id <String>) */ stringValue;
|
||||
- /* (NSString*) */ stringValue;
|
||||
@end
|
||||
|
||||
@protocol ValueSetting
|
||||
|
@ -41,7 +41,7 @@
|
|||
- (void) setFloatValue: (float)aFloat;
|
||||
- (void) setDoubleValue: (double)aDouble;
|
||||
- (void) setCStringValue: (const char *)aCString;
|
||||
- (void) setStringValue: /* (id <String>) */ aString;
|
||||
- (void) setStringValue: /* (NSString*) */ aString;
|
||||
@end
|
||||
|
||||
@protocol ValueHolding <ValueGetting, ValueSetting>
|
||||
|
|
|
@ -92,7 +92,7 @@ static int debug_binary_coder = 0;
|
|||
|
||||
- (void) encodeValueOfCType: (const char*)type
|
||||
at: (const void*)d
|
||||
withName: (id <String>) name
|
||||
withName: (NSString*) name
|
||||
{
|
||||
/* Make sure we're not being asked to encode an "ObjC" type. */
|
||||
assert(type);
|
||||
|
@ -319,7 +319,7 @@ static int debug_binary_coder = 0;
|
|||
|
||||
- (void) decodeValueOfCType: (const char*)type
|
||||
at: (void*)d
|
||||
withName: (id <String> *)namePtr
|
||||
withName: (NSString* *)namePtr
|
||||
{
|
||||
char encoded_type;
|
||||
|
||||
|
@ -488,14 +488,14 @@ static int debug_binary_coder = 0;
|
|||
|
||||
/* Encoding and decoding names. */
|
||||
|
||||
- (void) encodeName: (id <String>) name
|
||||
- (void) encodeName: (NSString*) name
|
||||
{
|
||||
if (debug_binary_coder)
|
||||
[[[self class] debugStderrCoder]
|
||||
encodeName:name];
|
||||
}
|
||||
|
||||
- (void) decodeName: (id <String> *)n
|
||||
- (void) decodeName: (NSString* *)n
|
||||
{
|
||||
#if 1
|
||||
if (n)
|
||||
|
|
|
@ -39,14 +39,14 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException";
|
|||
|
||||
- (void) encodeValueOfCType: (const char*) type
|
||||
at: (const void*) d
|
||||
withName: (id <String>) name;
|
||||
withName: (NSString*) name;
|
||||
{
|
||||
[self subclassResponsibility:_cmd];
|
||||
}
|
||||
|
||||
- (void) decodeValueOfCType: (const char*) type
|
||||
at: (void*) d
|
||||
withName: (id <String> *) namePtr;
|
||||
withName: (NSString* *) namePtr;
|
||||
{
|
||||
[self subclassResponsibility:_cmd];
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException";
|
|||
return [new_cstream autorelease];
|
||||
}
|
||||
|
||||
+ cStreamReadingFromFile: (id <String>) filename
|
||||
+ cStreamReadingFromFile: (NSString*) filename
|
||||
{
|
||||
return [self cStreamReadingFromStream:
|
||||
[StdioStream streamWithFilename: filename fmode: "r"]];
|
||||
|
@ -162,7 +162,7 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException";
|
|||
withFormatVersion: [[self class] defaultFormatVersion]];
|
||||
}
|
||||
|
||||
- initForWritingToFile: (id <String>) file
|
||||
- initForWritingToFile: (NSString*) file
|
||||
{
|
||||
return [self initForWritingToStream:
|
||||
[StdioStream streamWithFilename: file fmode: "w"]];
|
||||
|
@ -174,7 +174,7 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException";
|
|||
autorelease];
|
||||
}
|
||||
|
||||
+ cStreamWritingToFile: (id <String>) filename;
|
||||
+ cStreamWritingToFile: (NSString*) filename;
|
||||
{
|
||||
return [[[self alloc] initForWritingToFile: filename]
|
||||
autorelease];
|
||||
|
@ -183,7 +183,7 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException";
|
|||
|
||||
/* Encoding/decoding indentation */
|
||||
|
||||
- (void) encodeWithName: (id <String>) name
|
||||
- (void) encodeWithName: (NSString*) name
|
||||
valuesOfCTypes: (const char *) types, ...
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -200,7 +200,7 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException";
|
|||
va_end (ap);
|
||||
}
|
||||
|
||||
- (void) decodeWithName: (id <String> *)name
|
||||
- (void) decodeWithName: (NSString* *)name
|
||||
valuesOfCTypes: (const char *)types, ...
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -237,12 +237,12 @@ id CStreamSignatureMismatchException = @"CStreamSignatureMismatchException";
|
|||
/* Do nothing */
|
||||
}
|
||||
|
||||
- (void) encodeName: (id <String>) n
|
||||
- (void) encodeName: (NSString*) n
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
|
||||
- (void) decodeName: (id <String> *) name
|
||||
- (void) decodeName: (NSString* *) name
|
||||
{
|
||||
/* Do nothing */
|
||||
}
|
||||
|
|
|
@ -302,7 +302,7 @@ static int messages_received_count;
|
|||
if we're connecting to another Connection that already registered
|
||||
with that name. */
|
||||
|
||||
+ (Connection*) newRegisteringAtName: (id <String>)n withRootObject: anObj
|
||||
+ (Connection*) newRegisteringAtName: (NSString*)n withRootObject: anObj
|
||||
{
|
||||
id newPort;
|
||||
id newConn;
|
||||
|
@ -314,12 +314,12 @@ static int messages_received_count;
|
|||
return newConn;
|
||||
}
|
||||
|
||||
+ (Proxy*) rootProxyAtName: (id <String>)n
|
||||
+ (Proxy*) rootProxyAtName: (NSString*)n
|
||||
{
|
||||
return [self rootProxyAtName: n onHost: @""];
|
||||
}
|
||||
|
||||
+ (Proxy*) rootProxyAtName: (id <String>)n onHost: (id <String>)h
|
||||
+ (Proxy*) rootProxyAtName: (NSString*)n onHost: (NSString*)h
|
||||
{
|
||||
id p = [default_out_port_class newForSendingToRegisteredName: n onHost: h];
|
||||
return [self rootProxyAtPort: p];
|
||||
|
|
|
@ -81,14 +81,14 @@ static int debug_coder = 0;
|
|||
return new_coder;
|
||||
}
|
||||
|
||||
+ newReadingFromFile: (id <String>) filename
|
||||
+ newReadingFromFile: (NSString*) filename
|
||||
{
|
||||
return [self newReadingFromStream:
|
||||
[StdioStream streamWithFilename: filename
|
||||
fmode: "r"]];
|
||||
}
|
||||
|
||||
+ decodeObjectWithName: (id <String> *) name
|
||||
+ decodeObjectWithName: (NSString* *) name
|
||||
fromStream: (id <Streaming>)stream;
|
||||
{
|
||||
id c, o;
|
||||
|
@ -98,8 +98,8 @@ static int debug_coder = 0;
|
|||
return [o autorelease];
|
||||
}
|
||||
|
||||
+ decodeObjectWithName: (id <String> *) name
|
||||
fromFile: (id <String>) filename;
|
||||
+ decodeObjectWithName: (NSString* *) name
|
||||
fromFile: (NSString*) filename;
|
||||
{
|
||||
return [self decodeObjectWithName: name
|
||||
fromStream:
|
||||
|
@ -297,7 +297,7 @@ static int debug_coder = 0;
|
|||
|
||||
- (void) decodeValueOfCType: (const char*)type
|
||||
at: (void*)d
|
||||
withName: (id <String> *)namePtr
|
||||
withName: (NSString* *)namePtr
|
||||
{
|
||||
[cstream decodeValueOfCType:type
|
||||
at:d
|
||||
|
@ -306,7 +306,7 @@ static int debug_coder = 0;
|
|||
|
||||
- (void) decodeBytes: (void *)b
|
||||
count: (unsigned)c
|
||||
withName: (id <String> *) name
|
||||
withName: (NSString* *) name
|
||||
{
|
||||
int actual_count;
|
||||
/* xxx Is this what we want?
|
||||
|
@ -396,7 +396,7 @@ static int debug_coder = 0;
|
|||
return ret;
|
||||
}
|
||||
|
||||
- (const char *) decodeAtomicStringWithName: (id <String> *) name
|
||||
- (const char *) decodeAtomicStringWithName: (NSString* *) name
|
||||
{
|
||||
char *s;
|
||||
/* xxx Add repeat-string-ptr checking here */
|
||||
|
@ -405,7 +405,7 @@ static int debug_coder = 0;
|
|||
return s;
|
||||
}
|
||||
|
||||
- (SEL) decodeSelectorWithName: (id <String> *) name
|
||||
- (SEL) decodeSelectorWithName: (NSString* *) name
|
||||
{
|
||||
char tag;
|
||||
SEL ret = NULL;
|
||||
|
@ -529,7 +529,7 @@ static int debug_coder = 0;
|
|||
[self _coderPopRootObjectTable];
|
||||
}
|
||||
|
||||
- (void) _decodeRootObjectAt: (id*)ret withName: (id <String> *) name
|
||||
- (void) _decodeRootObjectAt: (id*)ret withName: (NSString* *) name
|
||||
{
|
||||
[self startDecodingInterconnectedObjects];
|
||||
[self decodeObjectAt:ret withName:name];
|
||||
|
@ -539,7 +539,7 @@ static int debug_coder = 0;
|
|||
|
||||
- (void) decodeValueOfObjCType: (const char*)type
|
||||
at: (void*)d
|
||||
withName: (id <String> *)namePtr
|
||||
withName: (NSString* *)namePtr
|
||||
{
|
||||
switch (*type)
|
||||
{
|
||||
|
@ -570,7 +570,7 @@ static int debug_coder = 0;
|
|||
}
|
||||
|
||||
/* This is the designated (and one-and-only) object decoder */
|
||||
- (void) decodeObjectAt: (id*) anObjPtr withName: (id <String> *) name
|
||||
- (void) decodeObjectAt: (id*) anObjPtr withName: (NSString* *) name
|
||||
{
|
||||
unsigned char tag;
|
||||
unsigned fref = 0;
|
||||
|
@ -698,7 +698,7 @@ static int debug_coder = 0;
|
|||
}
|
||||
|
||||
|
||||
- (void) decodeWithName: (id <String> *)name
|
||||
- (void) decodeWithName: (NSString* *)name
|
||||
valuesOfObjCTypes: (const char *)types, ...
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -717,7 +717,7 @@ static int debug_coder = 0;
|
|||
|
||||
- (void) decodeValueOfObjCTypes: (const char *)types
|
||||
at: (void *)d
|
||||
withName: (id <String> *)name
|
||||
withName: (NSString* *)name
|
||||
{
|
||||
[self decodeName:name];
|
||||
while (*types)
|
||||
|
@ -732,7 +732,7 @@ static int debug_coder = 0;
|
|||
- (void) decodeArrayOfObjCType: (const char *)type
|
||||
count: (unsigned)c
|
||||
at: (void *)d
|
||||
withName: (id <String> *) name
|
||||
withName: (NSString* *) name
|
||||
{
|
||||
int i;
|
||||
int offset = objc_sizeof_type(type);
|
||||
|
@ -758,7 +758,7 @@ static int debug_coder = 0;
|
|||
[cstream decodeUnindent];
|
||||
}
|
||||
|
||||
- (void) decodeName: (id <String> *)n
|
||||
- (void) decodeName: (NSString* *)n
|
||||
{
|
||||
[cstream decodeName: n];
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ my_object_is_class(id object)
|
|||
withCStreamClass: [[self class] defaultCStreamClass]];
|
||||
}
|
||||
|
||||
- initForWritingToFile: (id <String>) filename
|
||||
- initForWritingToFile: (NSString*) filename
|
||||
withFormatVersion: (int) version
|
||||
cStreamClass: (Class) cStreamClass
|
||||
cStreamFormatVersion: (int) cStreamFormatVersion
|
||||
|
@ -175,7 +175,7 @@ my_object_is_class(id object)
|
|||
cStreamFormatVersion: cStreamFormatVersion];
|
||||
}
|
||||
|
||||
- initForWritingToFile: (id <String>) filename
|
||||
- initForWritingToFile: (NSString*) filename
|
||||
withCStreamClass: (Class) cStreamClass
|
||||
{
|
||||
return [self initForWritingToStream: [StdioStream
|
||||
|
@ -184,7 +184,7 @@ my_object_is_class(id object)
|
|||
withCStreamClass: cStreamClass];
|
||||
}
|
||||
|
||||
- initForWritingToFile: (id <String>) filename
|
||||
- initForWritingToFile: (NSString*) filename
|
||||
{
|
||||
return [self initForWritingToStream:
|
||||
[StdioStream streamWithFilename: filename
|
||||
|
@ -196,7 +196,7 @@ my_object_is_class(id object)
|
|||
return [[self alloc] initForWritingToStream: s];
|
||||
}
|
||||
|
||||
+ newWritingToFile: (id <String>)filename
|
||||
+ newWritingToFile: (NSString*)filename
|
||||
{
|
||||
return [self newWritingToStream:
|
||||
[StdioStream streamWithFilename: filename
|
||||
|
@ -204,7 +204,7 @@ my_object_is_class(id object)
|
|||
}
|
||||
|
||||
+ (BOOL) encodeRootObject: anObject
|
||||
withName: (id <String>) name
|
||||
withName: (NSString*) name
|
||||
toStream: (id <Streaming>)stream
|
||||
{
|
||||
id c = [[self alloc] initForWritingToStream: stream];
|
||||
|
@ -215,8 +215,8 @@ my_object_is_class(id object)
|
|||
}
|
||||
|
||||
+ (BOOL) encodeRootObject: anObject
|
||||
withName: (id <String>) name
|
||||
toFile: (id <String>) filename
|
||||
withName: (NSString*) name
|
||||
toFile: (NSString*) filename
|
||||
{
|
||||
return [self encodeRootObject: anObject
|
||||
withName: name
|
||||
|
@ -365,7 +365,7 @@ my_object_is_class(id object)
|
|||
|
||||
- (void) encodeValueOfCType: (const char*)type
|
||||
at: (const void*)d
|
||||
withName: (id <String>)name
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[cstream encodeValueOfCType:type
|
||||
at:d
|
||||
|
@ -374,7 +374,7 @@ my_object_is_class(id object)
|
|||
|
||||
- (void) encodeBytes: (const void *)b
|
||||
count: (unsigned)c
|
||||
withName: (id <String>)name
|
||||
withName: (NSString*)name
|
||||
{
|
||||
/* xxx Is this what we want?
|
||||
It won't be cleanly readable in TextCStream's. */
|
||||
|
@ -450,14 +450,14 @@ my_object_is_class(id object)
|
|||
}
|
||||
|
||||
- (void) encodeAtomicString: (const char*) sp
|
||||
withName: (id <String>) name
|
||||
withName: (NSString*) name
|
||||
{
|
||||
/* xxx Add repeat-string-ptr checking here. */
|
||||
[self notImplemented:_cmd];
|
||||
[self encodeValueOfCType:@encode(char*) at:&sp withName:name];
|
||||
}
|
||||
|
||||
- (void) encodeSelector: (SEL)sel withName: (id <String>) name
|
||||
- (void) encodeSelector: (SEL)sel withName: (NSString*) name
|
||||
{
|
||||
[self encodeName:name];
|
||||
[self encodeIndent];
|
||||
|
@ -520,7 +520,7 @@ my_object_is_class(id object)
|
|||
|
||||
- (void) encodeValueOfObjCType: (const char*) type
|
||||
at: (const void*) d
|
||||
withName: (id <String>) name
|
||||
withName: (NSString*) name
|
||||
{
|
||||
switch (*type)
|
||||
{
|
||||
|
@ -564,7 +564,7 @@ my_object_is_class(id object)
|
|||
|
||||
/* NOTE: Unlike NeXT's, this *can* be called recursively */
|
||||
- (void) encodeRootObject: anObj
|
||||
withName: (id <String>)name
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[self encodeName: @"Root Object"];
|
||||
[self encodeIndent];
|
||||
|
@ -618,7 +618,7 @@ my_object_is_class(id object)
|
|||
|
||||
/* This is the designated object encoder */
|
||||
- (void) _encodeObject: anObj
|
||||
withName: (id <String>) name
|
||||
withName: (NSString*) name
|
||||
isBycopy: (BOOL) bycopy_flag
|
||||
isForwardReference: (BOOL) forward_ref_flag
|
||||
{
|
||||
|
@ -726,27 +726,27 @@ my_object_is_class(id object)
|
|||
}
|
||||
|
||||
- (void) encodeObject: anObj
|
||||
withName: (id <String>)name
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[self _encodeObject:anObj withName:name isBycopy:NO isForwardReference:NO];
|
||||
}
|
||||
|
||||
|
||||
- (void) encodeBycopyObject: anObj
|
||||
withName: (id <String>)name
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[self _encodeObject:anObj withName:name isBycopy:YES isForwardReference:NO];
|
||||
}
|
||||
|
||||
- (void) encodeObjectReference: anObj
|
||||
withName: (id <String>)name
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[self _encodeObject:anObj withName:name isBycopy:NO isForwardReference:YES];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void) encodeWithName: (id <String>)name
|
||||
- (void) encodeWithName: (NSString*)name
|
||||
valuesOfObjCTypes: (const char *)types, ...
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -765,7 +765,7 @@ my_object_is_class(id object)
|
|||
|
||||
- (void) encodeValueOfObjCTypes: (const char *)types
|
||||
at: (const void *)d
|
||||
withName: (id <String>)name
|
||||
withName: (NSString*)name
|
||||
{
|
||||
[self encodeName:name];
|
||||
while (*types)
|
||||
|
@ -780,7 +780,7 @@ my_object_is_class(id object)
|
|||
- (void) encodeArrayOfObjCType: (const char *)type
|
||||
count: (unsigned)c
|
||||
at: (const void *)d
|
||||
withName: (id <String>)name
|
||||
withName: (NSString*)name
|
||||
{
|
||||
int i;
|
||||
int offset = objc_sizeof_type(type);
|
||||
|
@ -806,7 +806,7 @@ my_object_is_class(id object)
|
|||
[cstream encodeUnindent];
|
||||
}
|
||||
|
||||
- (void) encodeName: (id <String>)n
|
||||
- (void) encodeName: (NSString*)n
|
||||
{
|
||||
[cstream encodeName: n];
|
||||
}
|
||||
|
@ -814,7 +814,7 @@ my_object_is_class(id object)
|
|||
|
||||
/* Substituting Classes */
|
||||
|
||||
- (id <String>) classNameEncodedForTrueClassName: (id <String>) trueName
|
||||
- (NSString*) classNameEncodedForTrueClassName: (NSString*) trueName
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
return nil;
|
||||
|
@ -826,8 +826,8 @@ my_object_is_class(id object)
|
|||
#endif
|
||||
}
|
||||
|
||||
- (void) encodeClassName: (id <String>) trueName
|
||||
intoClassName: (id <String>) inArchiveName
|
||||
- (void) encodeClassName: (NSString*) trueName
|
||||
intoClassName: (NSString*) inArchiveName
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@
|
|||
OBJC_FREE(keys);
|
||||
}
|
||||
|
||||
- (id <String>) description
|
||||
- (NSString*) description
|
||||
{
|
||||
id s = [NSMutableString new];
|
||||
id o, k;
|
||||
|
|
|
@ -182,7 +182,7 @@ static BOOL debug_memory_stream = NO;
|
|||
return l;
|
||||
}
|
||||
|
||||
- (id <String>) readLine
|
||||
- (NSString*) readLine
|
||||
{
|
||||
char *nl = memchr(buffer+prefix+position, '\n', eof_position-position);
|
||||
char *ret = NULL;
|
||||
|
@ -224,7 +224,7 @@ void unchar_func(void *s, int c)
|
|||
}
|
||||
|
||||
#if HAVE_VSPRINTF
|
||||
- (int) writeFormat: (id <String>)format
|
||||
- (int) writeFormat: (NSString*)format
|
||||
arguments: (va_list)arg
|
||||
{
|
||||
int ret;
|
||||
|
@ -256,7 +256,7 @@ void unchar_func(void *s, int c)
|
|||
}
|
||||
#endif
|
||||
|
||||
- (int) readFormat: (id <String>)format, ...
|
||||
- (int) readFormat: (NSString*)format, ...
|
||||
{
|
||||
int ret;
|
||||
va_list ap;
|
||||
|
|
|
@ -39,13 +39,13 @@
|
|||
@implementation NSGArchiverNullCStream
|
||||
- (void) encodeValueOfCType: (const char*)type
|
||||
at: (const void*)d
|
||||
withName: (id <String>) name
|
||||
withName: (NSString*) name
|
||||
{
|
||||
return;
|
||||
}
|
||||
- (void) decodeValueOfCType: (const char*)type
|
||||
at: (void*)d
|
||||
withName: (id <String> *)namePtr
|
||||
withName: (NSString* *)namePtr
|
||||
{
|
||||
[self shouldNotImplement: _cmd];
|
||||
}
|
||||
|
@ -80,7 +80,7 @@
|
|||
|
||||
/* Unlike the GNU version, this cannot be called recursively. */
|
||||
- (void) encodeRootObject: anObj
|
||||
withName: (id <String>)name
|
||||
withName: (NSString*)name
|
||||
{
|
||||
id saved_cstream;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
@implementation Notification
|
||||
|
||||
/* This is the designated initializer. */
|
||||
- initWithName: (id <String>)name
|
||||
- initWithName: (NSString*)name
|
||||
object: object
|
||||
userInfo: info
|
||||
{
|
||||
|
@ -48,7 +48,7 @@
|
|||
|
||||
/* Creating autoreleased Notification objects. */
|
||||
|
||||
+ notificationWithName: (id <String>)name
|
||||
+ notificationWithName: (NSString*)name
|
||||
object: object
|
||||
userInfo: info
|
||||
{
|
||||
|
@ -58,7 +58,7 @@
|
|||
autorelease];
|
||||
}
|
||||
|
||||
+ notificationWithName: (id <String>)name
|
||||
+ notificationWithName: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
return [self notificationWithName: name
|
||||
|
@ -69,7 +69,7 @@
|
|||
|
||||
/* Querying a Notification object. */
|
||||
|
||||
- (id <String>) name
|
||||
- (NSString*) name
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
}
|
||||
|
||||
- initWithName: n object: o;
|
||||
- (id <String>) notificationName;
|
||||
- (NSString*) notificationName;
|
||||
- notificationObject;
|
||||
- (void) postNotification: n;
|
||||
@end
|
||||
|
@ -101,7 +101,7 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id <String>) notificationName
|
||||
- (NSString*) notificationName
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
|
||||
- (void) _addObserver: observer
|
||||
notificationRequest: nr
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
/* If observer is nil, there is nothing to do; return. */
|
||||
|
@ -318,7 +318,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
}
|
||||
|
||||
- (void) addInvocation: (id <Invoking>)invocation
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
id nr;
|
||||
|
@ -347,7 +347,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
|
||||
- (void) addObserver: observer
|
||||
selector: (SEL)sel
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
id nr;
|
||||
|
@ -427,7 +427,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
request, nil NAME or OBJECT act as wildcards. */
|
||||
|
||||
- (void) removeInvocation: invocation
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
[self removeObserver: invocation
|
||||
|
@ -482,7 +482,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
adding an observation request, nil NAME or OBJECT act as wildcards. */
|
||||
|
||||
- (void) removeObserver: observer
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
Array *observer_nr_array;
|
||||
|
@ -597,14 +597,14 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
[_lock unlock];
|
||||
}
|
||||
|
||||
- (void) postNotificationName: (id <String>)name
|
||||
- (void) postNotificationName: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
[self postNotification: [Notification notificationWithName: name
|
||||
object: object]];
|
||||
}
|
||||
|
||||
- (void) postNotificationName: (id <String>)name
|
||||
- (void) postNotificationName: (NSString*)name
|
||||
object: object
|
||||
userInfo: info
|
||||
{
|
||||
|
@ -623,7 +623,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
}
|
||||
|
||||
+ (void) addInvocation: (id <Invoking>)invocation
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
[default_notification_dispatcher addInvocation: invocation
|
||||
|
@ -633,7 +633,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
|
||||
+ (void) addObserver: observer
|
||||
selector: (SEL)sel
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
[default_notification_dispatcher addObserver: observer
|
||||
|
@ -648,7 +648,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
}
|
||||
|
||||
+ (void) removeInvocation: invocation
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
[default_notification_dispatcher removeInvocation: invocation
|
||||
|
@ -662,7 +662,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
}
|
||||
|
||||
+ (void) removeObserver: observer
|
||||
name: (id <String>)name
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
[default_notification_dispatcher removeObserver: observer
|
||||
|
@ -675,14 +675,14 @@ static NotificationDispatcher *default_notification_dispatcher = nil;
|
|||
[default_notification_dispatcher postNotification: notification];
|
||||
}
|
||||
|
||||
+ (void) postNotificationName: (id <String>)name
|
||||
+ (void) postNotificationName: (NSString*)name
|
||||
object: object
|
||||
{
|
||||
[default_notification_dispatcher postNotificationName: name
|
||||
object: object];
|
||||
}
|
||||
|
||||
+ (void) postNotificationName: (id <String>)name
|
||||
+ (void) postNotificationName: (NSString*)name
|
||||
object: object
|
||||
userInfo: info
|
||||
{
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
return self;
|
||||
}
|
||||
|
||||
+ newForReceivingFromRegisteredName: (id <String>)name
|
||||
+ newForReceivingFromRegisteredName: (NSString*)name
|
||||
{
|
||||
[self subclassResponsibility:_cmd];
|
||||
return nil;
|
||||
|
@ -140,12 +140,12 @@
|
|||
_packet_invocation = invocation;
|
||||
}
|
||||
|
||||
- (void) addToRunLoop: run_loop forMode: (id <String>)mode
|
||||
- (void) addToRunLoop: run_loop forMode: (NSString*)mode
|
||||
{
|
||||
[self subclassResponsibility:_cmd];
|
||||
}
|
||||
|
||||
- (void) removeFromRunLoop: run_loop forMode: (id <String>)mode
|
||||
- (void) removeFromRunLoop: run_loop forMode: (NSString*)mode
|
||||
{
|
||||
[self subclassResponsibility:_cmd];
|
||||
}
|
||||
|
@ -155,8 +155,8 @@
|
|||
|
||||
@implementation OutPort
|
||||
|
||||
+ newForSendingToRegisteredName: (id <String>)name
|
||||
onHost: (id <String>)hostname
|
||||
+ newForSendingToRegisteredName: (NSString*)name
|
||||
onHost: (NSString*)hostname
|
||||
{
|
||||
[self subclassResponsibility:_cmd];
|
||||
return nil;
|
||||
|
|
|
@ -60,7 +60,7 @@ static BOOL debug_binary_coder;
|
|||
return c;
|
||||
}
|
||||
|
||||
- (void) encodeName: (id <String>) name
|
||||
- (void) encodeName: (NSString*) name
|
||||
{
|
||||
if (debug_binary_coder)
|
||||
[[[self class] debugStderrCoder]
|
||||
|
@ -73,7 +73,7 @@ static BOOL debug_binary_coder;
|
|||
|
||||
- (void) encodeValueOfCType: (const char*)type
|
||||
at: (const void*)d
|
||||
withName: (id <String>) name
|
||||
withName: (NSString*) name
|
||||
{
|
||||
if (debug_binary_coder)
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ static BOOL debug_binary_coder;
|
|||
|
||||
- (void) decodeValueOfCType: (const char*)type
|
||||
at: (void*)d
|
||||
withName: (id <String> *)namePtr
|
||||
withName: (NSString* *)namePtr
|
||||
{
|
||||
assert(type);
|
||||
assert(*type != '@');
|
||||
|
@ -274,7 +274,7 @@ static BOOL debug_binary_coder;
|
|||
return DEFAULT_FORMAT_VERSION;
|
||||
}
|
||||
|
||||
- (void) decodeName: (id <String> *)n
|
||||
- (void) decodeName: (NSString* *)n
|
||||
{
|
||||
#if 1
|
||||
if (n)
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
|
||||
- (void) addReadDescriptor: (int)fd
|
||||
object: (id <FdListening>)listener
|
||||
forMode: (id <String>)mode
|
||||
forMode: (NSString*)mode
|
||||
{
|
||||
Bag *fd_listeners;
|
||||
FdInfo *info;
|
||||
|
@ -156,7 +156,7 @@
|
|||
|
||||
- (void) addWriteDescriptor: (int)fd
|
||||
object: (id <FdSpeaking>)speaker
|
||||
forMode: (id <String>)mode
|
||||
forMode: (NSString*)mode
|
||||
{
|
||||
Bag *fd_speakers;
|
||||
FdInfo *info;
|
||||
|
@ -182,7 +182,7 @@
|
|||
}
|
||||
|
||||
- (void) removeReadDescriptor: (int)fd
|
||||
forMode: (id <String>)mode
|
||||
forMode: (NSString*)mode
|
||||
{
|
||||
Bag* fd_listeners;
|
||||
|
||||
|
@ -203,7 +203,7 @@
|
|||
}
|
||||
|
||||
- (void) removeWriteDescriptor: (int)fd
|
||||
forMode: (id <String>)mode
|
||||
forMode: (NSString*)mode
|
||||
{
|
||||
Bag* fd_speakers;
|
||||
|
||||
|
@ -253,7 +253,7 @@ static RunLoop *current_run_loop;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (id <String>) currentMode
|
||||
- (NSString*) currentMode
|
||||
{
|
||||
return _current_mode;
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ static RunLoop *current_run_loop;
|
|||
/* Adding and removing port objects. */
|
||||
|
||||
- (void) addPort: port
|
||||
forMode: (id <String>)mode
|
||||
forMode: (NSString*)mode
|
||||
{
|
||||
/* xxx Perhaps this should be a Bag instead; I think this currently works
|
||||
when a port is added more than once, but it doesn't work prettily. */
|
||||
|
@ -279,7 +279,7 @@ static RunLoop *current_run_loop;
|
|||
}
|
||||
|
||||
- (void) removePort: port
|
||||
forMode: (id <String>)mode
|
||||
forMode: (NSString*)mode
|
||||
{
|
||||
/* xxx Perhaps this should be a Bag instead. */
|
||||
Array *in_ports;
|
||||
|
@ -296,7 +296,7 @@ static RunLoop *current_run_loop;
|
|||
/* Adding timers. They are removed when they are invalid. */
|
||||
|
||||
- (void) addTimer: timer
|
||||
forMode: (id <String>)mode
|
||||
forMode: (NSString*)mode
|
||||
{
|
||||
Heap *timers;
|
||||
|
||||
|
@ -314,7 +314,7 @@ static RunLoop *current_run_loop;
|
|||
|
||||
/* Fire appropriate timers. */
|
||||
|
||||
- limitDateForMode: (id <String>)mode
|
||||
- limitDateForMode: (NSString*)mode
|
||||
{
|
||||
/* Linux doesn't always return double from methods, even though
|
||||
I'm using -lieee. */
|
||||
|
@ -361,7 +361,7 @@ static RunLoop *current_run_loop;
|
|||
/* Listen to input sources.
|
||||
If LIMIT_DATE is nil, then don't wait; i.e. call select() with 0 timeout */
|
||||
|
||||
- (void) acceptInputForMode: (id <String>)mode
|
||||
- (void) acceptInputForMode: (NSString*)mode
|
||||
beforeDate: limit_date
|
||||
{
|
||||
NSTimeInterval ti;
|
||||
|
@ -552,7 +552,7 @@ static RunLoop *current_run_loop;
|
|||
|
||||
/* Running the run loop once through for timers and input listening. */
|
||||
|
||||
- (BOOL) runOnceBeforeDate: date forMode: (id <String>)mode
|
||||
- (BOOL) runOnceBeforeDate: date forMode: (NSString*)mode
|
||||
{
|
||||
id d;
|
||||
|
||||
|
@ -588,7 +588,7 @@ static RunLoop *current_run_loop;
|
|||
|
||||
/* Running the run loop multiple times through. */
|
||||
|
||||
- (void) runUntilDate: date forMode: (id <String>)mode
|
||||
- (void) runUntilDate: date forMode: (NSString*)mode
|
||||
{
|
||||
volatile double ti;
|
||||
|
||||
|
@ -630,7 +630,7 @@ static RunLoop *current_run_loop;
|
|||
[current_run_loop runUntilDate: date];
|
||||
}
|
||||
|
||||
+ (void) runUntilDate: date forMode: (id <String>)mode
|
||||
+ (void) runUntilDate: date forMode: (NSString*)mode
|
||||
{
|
||||
assert (current_run_loop);
|
||||
[current_run_loop runUntilDate: date forMode: mode];
|
||||
|
@ -641,7 +641,7 @@ static RunLoop *current_run_loop;
|
|||
return [current_run_loop runOnceBeforeDate: date];
|
||||
}
|
||||
|
||||
+ (BOOL) runOnceBeforeDate: date forMode: (id <String>)mode
|
||||
+ (BOOL) runOnceBeforeDate: date forMode: (NSString*)mode
|
||||
{
|
||||
return [current_run_loop runOnceBeforeDate: date forMode: mode];
|
||||
}
|
||||
|
@ -652,7 +652,7 @@ static RunLoop *current_run_loop;
|
|||
return current_run_loop;
|
||||
}
|
||||
|
||||
+ (id <String>) currentMode
|
||||
+ (NSString*) currentMode
|
||||
{
|
||||
return [current_run_loop currentMode];
|
||||
}
|
||||
|
@ -679,9 +679,9 @@ id RunLoopDefaultMode = @"RunLoopDefaultMode";
|
|||
|
||||
|
||||
#if 0
|
||||
- getNotificationWithName: (id <String>)name
|
||||
- getNotificationWithName: (NSString*)name
|
||||
object: object
|
||||
inMode: (id <String>)mode
|
||||
inMode: (NSString*)mode
|
||||
beforeDate: date
|
||||
{
|
||||
/* See if any timers should fire, and fire them. */
|
||||
|
@ -698,9 +698,9 @@ id RunLoopDefaultMode = @"RunLoopDefaultMode";
|
|||
}
|
||||
|
||||
/* Some alternate names */
|
||||
- waitForNotificationWithName: (id <String>)name
|
||||
- waitForNotificationWithName: (NSString*)name
|
||||
object: object
|
||||
inMode: (id <String>)mode
|
||||
inMode: (NSString*)mode
|
||||
untilDate: date
|
||||
{
|
||||
}
|
||||
|
@ -710,14 +710,14 @@ id RunLoopDefaultMode = @"RunLoopDefaultMode";
|
|||
|
||||
/* The old alternate names */
|
||||
- (void) makeNotificationsForFileDescriptor: (int)fd
|
||||
forMode: (id <String>)mode
|
||||
name: (id <String>)name
|
||||
forMode: (NSString*)mode
|
||||
name: (NSString*)name
|
||||
object: object
|
||||
postingTo: (id <NotificationPosting>)poster
|
||||
postingStyle: style
|
||||
- (void) addFileDescriptor: (int)fd
|
||||
forMode: (id <String>)mode
|
||||
postingWithName: (id <String>)name
|
||||
forMode: (NSString*)mode
|
||||
postingWithName: (NSString*)name
|
||||
object: object;
|
||||
- (void) addFileDescriptor: (int)fd
|
||||
withAttender: (id <FileDescriptorAttending>)object
|
||||
|
|
|
@ -97,7 +97,7 @@ name_to_port_number (const char *name)
|
|||
return self;
|
||||
}
|
||||
|
||||
+ newPortFromRegisterWithName: (id <String>)name onHost: (id <String>)h
|
||||
+ newPortFromRegisterWithName: (NSString*)name onHost: (NSString*)h
|
||||
{
|
||||
id p;
|
||||
int n;
|
||||
|
@ -112,7 +112,7 @@ name_to_port_number (const char *name)
|
|||
return p;
|
||||
}
|
||||
|
||||
+ newRegisteredPortWithName: (id <String>)name
|
||||
+ newRegisteredPortWithName: (NSString*)name
|
||||
{
|
||||
int n;
|
||||
|
||||
|
@ -245,7 +245,7 @@ s1.sin_addr.s_addr == s2.sin_addr.s_addr)
|
|||
return sp;
|
||||
}
|
||||
|
||||
+ newRemoteWithNumber: (int)n onHost: (id <String>)h
|
||||
+ newRemoteWithNumber: (int)n onHost: (NSString*)h
|
||||
{
|
||||
struct sockaddr_in remote_addr;
|
||||
struct hostent *hp;
|
||||
|
|
|
@ -84,7 +84,7 @@ o_vscanf (void *stream,
|
|||
return stderrStream;
|
||||
}
|
||||
|
||||
+ streamWithFilename: (id <String>)name fmode: (const char *)m
|
||||
+ streamWithFilename: (NSString*)name fmode: (const char *)m
|
||||
{
|
||||
return [[[self alloc]
|
||||
initWithFilename: name fmode: m]
|
||||
|
@ -116,7 +116,7 @@ o_vscanf (void *stream,
|
|||
return self;
|
||||
}
|
||||
|
||||
- initWithFilename: (id <String>)name fmode: (const char *)m
|
||||
- initWithFilename: (NSString*)name fmode: (const char *)m
|
||||
{
|
||||
FILE *afp = fopen([name cStringNoCopy], (char*)m);
|
||||
if (!afp)
|
||||
|
@ -142,14 +142,14 @@ o_vscanf (void *stream,
|
|||
return [self initWithFilePointer:afp fmode:m];
|
||||
}
|
||||
|
||||
- initWithPipeTo: (id <String>) systemCommand
|
||||
- initWithPipeTo: (NSString*) systemCommand
|
||||
{
|
||||
return [self initWithFilePointer:
|
||||
popen([systemCommand cStringNoCopy], "w")
|
||||
fmode:"w"];
|
||||
}
|
||||
|
||||
- initWithPipeFrom: (id <String>) systemCommand
|
||||
- initWithPipeFrom: (NSString*) systemCommand
|
||||
{
|
||||
return [self initWithFilePointer:
|
||||
popen([systemCommand cStringNoCopy], "r")
|
||||
|
@ -188,7 +188,7 @@ o_vscanf (void *stream,
|
|||
return ret;
|
||||
}
|
||||
|
||||
- (int) writeFormat: (id <String>)format
|
||||
- (int) writeFormat: (NSString*)format
|
||||
arguments: (va_list)arg
|
||||
{
|
||||
return vfprintf(fp, [format cStringNoCopy], arg);
|
||||
|
@ -205,7 +205,7 @@ stdio_unchar_func(void *s, int c)
|
|||
ungetc(c, (FILE*)s);
|
||||
}
|
||||
|
||||
- (int) readFormat: (id <String>)format, ...
|
||||
- (int) readFormat: (NSString*)format, ...
|
||||
{
|
||||
int ret;
|
||||
va_list ap;
|
||||
|
|
|
@ -59,14 +59,14 @@ NSString* StreamException = @"StreamException";
|
|||
return 0;
|
||||
}
|
||||
|
||||
- (int) writeFormat: (id <String>)format
|
||||
- (int) writeFormat: (NSString*)format
|
||||
arguments: (va_list)arg
|
||||
{
|
||||
[self subclassResponsibility:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (int) writeFormat: (id <String>)format, ...
|
||||
- (int) writeFormat: (NSString*)format, ...
|
||||
{
|
||||
int ret;
|
||||
va_list ap;
|
||||
|
@ -77,27 +77,27 @@ NSString* StreamException = @"StreamException";
|
|||
return ret;
|
||||
}
|
||||
|
||||
- (int) readFormat: (id <String>)format
|
||||
- (int) readFormat: (NSString*)format
|
||||
arguments: (va_list)arg
|
||||
{
|
||||
[self subclassResponsibility:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (int) readFormat: (id <String>)format, ...
|
||||
- (int) readFormat: (NSString*)format, ...
|
||||
{
|
||||
[self subclassResponsibility:_cmd];
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (void) writeLine: (id <String>)l
|
||||
- (void) writeLine: (NSString*)l
|
||||
{
|
||||
const char *s = [l cStringNoCopy];
|
||||
[self writeBytes:s length:strlen(s)];
|
||||
[self writeBytes:"\n" length:1];
|
||||
}
|
||||
|
||||
- (id <String>) readLine
|
||||
- (NSString*) readLine
|
||||
{
|
||||
char *l;
|
||||
[self readFormat: @"%a[^\n]\n", &l];
|
||||
|
|
|
@ -285,7 +285,7 @@ static NSMapTable* port_number_2_port;
|
|||
return p;
|
||||
}
|
||||
|
||||
+ newForReceivingFromRegisteredName: (id <String>)name
|
||||
+ newForReceivingFromRegisteredName: (NSString*)name
|
||||
{
|
||||
return [self newForReceivingFromPortNumber:
|
||||
name_2_port_number ([name cStringNoCopy])];
|
||||
|
@ -853,7 +853,7 @@ static NSMapTable *out_port_bag = NULL;
|
|||
}
|
||||
|
||||
+ newForSendingToPortNumber: (unsigned short)n
|
||||
onHost: (id <String>)hostname
|
||||
onHost: (NSString*)hostname
|
||||
{
|
||||
struct hostent *hp;
|
||||
const char *host_cstring;
|
||||
|
@ -893,8 +893,8 @@ static NSMapTable *out_port_bag = NULL;
|
|||
pollingInPort: nil];
|
||||
}
|
||||
|
||||
+ newForSendingToRegisteredName: (id <String>)name
|
||||
onHost: (id <String>)hostname
|
||||
+ newForSendingToRegisteredName: (NSString*)name
|
||||
onHost: (NSString*)hostname
|
||||
{
|
||||
return [self newForSendingToPortNumber:
|
||||
name_2_port_number ([name cStringNoCopy])
|
||||
|
|
|
@ -51,7 +51,7 @@ static BOOL debug_textcoder = NO;
|
|||
|
||||
- (void) encodeValueOfCType: (const char*) type
|
||||
at: (const void*) d
|
||||
withName: (id <String>) name;
|
||||
withName: (NSString*) name;
|
||||
{
|
||||
assert(type);
|
||||
assert(*type != '@');
|
||||
|
@ -186,7 +186,7 @@ if (debug_textcoder) \
|
|||
|
||||
- (void) decodeValueOfCType: (const char*) type
|
||||
at: (void*) d
|
||||
withName: (id <String> *) namePtr;
|
||||
withName: (NSString* *) namePtr;
|
||||
{
|
||||
char *tmpname;
|
||||
|
||||
|
@ -372,7 +372,7 @@ if (debug_textcoder) \
|
|||
format: @"bad unindent format, got \"%s\"", line];
|
||||
}
|
||||
|
||||
- (void) encodeName: (id <String>) n
|
||||
- (void) encodeName: (NSString*) n
|
||||
{
|
||||
if (n)
|
||||
[stream writeFormat:@"%*s<%s>\n", indentation, "", [n cStringNoCopy]];
|
||||
|
@ -380,7 +380,7 @@ if (debug_textcoder) \
|
|||
[stream writeFormat:@"%*s<NULL>\n", indentation, ""];
|
||||
}
|
||||
|
||||
- (void) decodeName: (id <String> *) name
|
||||
- (void) decodeName: (NSString* *) name
|
||||
{
|
||||
const char *n;
|
||||
if (name)
|
||||
|
|
|
@ -180,7 +180,7 @@ static NSMapTable *port_number_2_in_port = NULL;
|
|||
return p;
|
||||
}
|
||||
|
||||
+ newForReceivingFromRegisteredName: (id <String>)name
|
||||
+ newForReceivingFromRegisteredName: (NSString*)name
|
||||
{
|
||||
int n;
|
||||
|
||||
|
@ -372,7 +372,7 @@ static Array *udp_out_port_array;
|
|||
|
||||
|
||||
+ newForSendingToPortNumber: (unsigned short)n
|
||||
onHost: (id <String>)hostname
|
||||
onHost: (NSString*)hostname
|
||||
{
|
||||
struct hostent *hp;
|
||||
const char *host_cstring;
|
||||
|
@ -425,7 +425,7 @@ static Array *udp_out_port_array;
|
|||
return (int) ntohs (_address.sin_port);
|
||||
}
|
||||
|
||||
- (id <String>) hostname
|
||||
- (NSString*) hostname
|
||||
{
|
||||
[self notImplemented: _cmd];
|
||||
return nil;
|
||||
|
|
|
@ -151,7 +151,7 @@ ostream_printf (ostream *s, const char *format, ...)
|
|||
void
|
||||
ostream_vprintf (ostream *s, const char *format, va_list argList)
|
||||
{
|
||||
id <String> str = [String stringWithCString: format];
|
||||
id str = [String stringWithCString: format];
|
||||
if (s->flags & OSTREAM_WRITEFLAG)
|
||||
[(id <Streaming>)s->stream_obj writeFormat: str arguments: argList];
|
||||
else
|
||||
|
@ -172,7 +172,7 @@ ostream_scanf (ostream *s, const char *format, ...)
|
|||
int
|
||||
ostream_vscanf (ostream *s, const char *format, va_list argList)
|
||||
{
|
||||
id <String> str = [String stringWithCString: format];
|
||||
id str = [String stringWithCString: format];
|
||||
if (s->flags & OSTREAM_READFLAG)
|
||||
return [(id <Streaming>)s->stream_obj readFormat: str
|
||||
arguments: argList];
|
||||
|
|
Loading…
Reference in a new issue