diff --git a/ChangeLog b/ChangeLog
index 6cf8ad996..e5a7d3376 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,28 @@
-2002-10-03 Richard Frith-Macdonald
* External - so NSDate and others can use it.
*/
-static void
+void
GSBreakTime(NSTimeInterval when, int *year, int *month, int *day,
int *hour, int *minute, int *second, int *mil)
{
diff --git a/Source/NSConnection.m b/Source/NSConnection.m
index 14d883a08..625eb3ed6 100644
--- a/Source/NSConnection.m
+++ b/Source/NSConnection.m
@@ -506,6 +506,7 @@ static BOOL multi_threaded = NO;
}
/**
+ * Not used in GNUstep
*/
+ (id) currentConversation
{
@@ -1164,7 +1165,8 @@ static BOOL multi_threaded = NO;
}
/**
- * Returns YES if the connection is invalid, NO otherwise.
+ * Returns YES if the connection is valid, NO otherwise.
+ * A connection is valid until it has been sent an -invalidate message.
*/
- (BOOL) isValid
{
@@ -1206,7 +1208,8 @@ static BOOL multi_threaded = NO;
/**
* Returns YES if the connection permits multiple threads to use it to
- * send requests, NO otherwise.
+ * send requests, NO otherwise.
+ * See the -enableMultipleThreads method.
*/
- (BOOL) multipleThreadsEnabled
{
@@ -1486,8 +1489,10 @@ static BOOL multi_threaded = NO;
/**
* Sets the time interval that the NSConnection will wait for a
- * reply to one of its requests before raising an
- * NSPortTimeoutException.
+ * reply for one of its requests before raising an
+ * NSPortTimeoutException.
+ * NB. In GNUstep you may also get such an exception if the connection
+ * becomes invalidated while waiting for a reply to a request.
*/
- (void) setReplyTimeout: (NSTimeInterval)to
{
diff --git a/Source/NSCountedSet.m b/Source/NSCountedSet.m
index c59cb1c37..ae64cee7c 100644
--- a/Source/NSCountedSet.m
+++ b/Source/NSCountedSet.m
@@ -317,13 +317,13 @@ static Class NSCountedSet_concrete_class;
* purge the set even when uniquing is turned off.
*/
void
-GSUPurge(unsigned level)
+GSUPurge(unsigned count)
{
if (uniqueLock != nil)
{
(*lockImp)(uniqueLock, @selector(lock));
}
- [uniqueSet purge: level];
+ [uniqueSet purge: count];
if (uniqueLock != nil)
{
(*unlockImp)(uniqueLock, @selector(unlock));
@@ -339,7 +339,7 @@ GSUPurge(unsigned level)
* alter the set even when uniquing is turned off.
*/
id
-GSUSet(id obj, unsigned level)
+GSUSet(id anObject, unsigned count)
{
id found;
unsigned i;
@@ -348,29 +348,29 @@ GSUSet(id obj, unsigned level)
{
(*lockImp)(uniqueLock, @selector(lock));
}
- found = [uniqueSet member: obj];
+ found = [uniqueSet member: anObject];
if (found == nil)
{
- found = obj;
- for (i = 0; i < level; i++)
+ found = anObject;
+ for (i = 0; i < count; i++)
{
- [uniqueSet addObject: obj];
+ [uniqueSet addObject: anObject];
}
}
else
{
i = [uniqueSet countForObject: found];
- if (i < level)
+ if (i < count)
{
- while (i < level)
+ while (i < count)
{
[uniqueSet addObject: found];
i++;
}
}
- else if (i > level)
+ else if (i > count)
{
- while (i > level)
+ while (i > count)
{
[uniqueSet removeObject: found];
i--;
@@ -391,7 +391,7 @@ GSUSet(id obj, unsigned level)
* If uniquing is turned off, it simply returns its argument.
*/
id
-GSUnique(id obj)
+GSUnique(id anObject)
{
if (uniquing == YES)
{
@@ -399,13 +399,13 @@ GSUnique(id obj)
{
(*lockImp)(uniqueLock, @selector(lock));
}
- obj = (*uniqueImp)(uniqueSet, @selector(unique:), obj);
+ anObject = (*uniqueImp)(uniqueSet, @selector(unique:), anObject);
if (uniqueLock != nil)
{
(*unlockImp)(uniqueLock, @selector(unlock));
}
}
- return obj;
+ return anObject;
}
/**
diff --git a/Source/NSData.m b/Source/NSData.m
index f327d9dd5..4a4ee74f0 100644
--- a/Source/NSData.m
+++ b/Source/NSData.m
@@ -461,8 +461,8 @@ failure:
* and with the specified length. Invokes
* -initWithBytesNoCopy:length:freeWhenDone:
*/
-+ (id) dataWithBytesNoCopy: (void*)bytes
- length: (unsigned int)length
++ (id) dataWithBytesNoCopy: (void*)aBuffer
+ length: (unsigned int)bufferSize
freeWhenDone: (BOOL)shouldFree
{
NSData *d;
@@ -475,7 +475,9 @@ failure:
{
d = [dataStatic allocWithZone: NSDefaultMallocZone()];
}
- d = [d initWithBytesNoCopy: bytes length: length freeWhenDone: shouldFree];
+ d = [d initWithBytesNoCopy: aBuffer
+ length: bufferSize
+ freeWhenDone: shouldFree];
return AUTORELEASE(d);
}
@@ -592,7 +594,8 @@ failure:
* The value fo shouldFree specifies whether the receiver should
* attempt to free the memory pointer to by aBuffer when the receiver
* is deallocated ... ie. it says whether the receiver owns
- * the memory.
+ * the memory. Supplying the wrong value here will lead to memory
+ * leaks or crashes.
*/
- (id) initWithBytesNoCopy: (void*)aBuffer
length: (unsigned int)bufferSize
diff --git a/Source/NSObjCRuntime.m b/Source/NSObjCRuntime.m
index d6971df37..e9f1f8500 100644
--- a/Source/NSObjCRuntime.m
+++ b/Source/NSObjCRuntime.m
@@ -152,7 +152,7 @@ BOOL
GSInstanceVariableInfo(id obj, NSString *iVarName,
const char **type, unsigned *size, unsigned *offset)
{
- const char *name = [iVarName cString];
+ const char *name = [iVarName UTF8String];
return GSFindInstanceVariable(obj, name, type, size, offset);
}
@@ -160,13 +160,13 @@ GSInstanceVariableInfo(id obj, NSString *iVarName,
/** ## deprecated ##
*/
BOOL
-GSGetInstanceVariable(id obj, NSString *iVarName, void *data)
+GSGetInstanceVariable(id obj, NSString *name, void *data)
{
- const char *name = [iVarName cString];
+ const char *cName = [name UTF8String];
int offset;
unsigned int size;
- if (GSFindInstanceVariable(obj, name, 0, &size, &offset) == YES)
+ if (GSFindInstanceVariable(obj, cName, 0, &size, &offset) == YES)
{
GSGetVariable(obj, offset, size, data);
return YES;
@@ -177,13 +177,13 @@ GSGetInstanceVariable(id obj, NSString *iVarName, void *data)
/** ## deprecated ##
*/
BOOL
-GSSetInstanceVariable(id obj, NSString *iVarName, const void *data)
+GSSetInstanceVariable(id obj, NSString *name, const void *data)
{
- const char *name = [iVarName cString];
+ const char *cName = [name UTF8String];
int offset;
unsigned int size;
- if (GSFindInstanceVariable(obj, name, 0, &size, &offset) == YES)
+ if (GSFindInstanceVariable(obj, cName, 0, &size, &offset) == YES)
{
GSSetVariable(obj, offset, size, data);
return YES;
diff --git a/Source/NSPortNameServer.m b/Source/NSPortNameServer.m
index 2202df84c..9ca9aa0d2 100644
--- a/Source/NSPortNameServer.m
+++ b/Source/NSPortNameServer.m
@@ -584,8 +584,8 @@ typedef enum {
return [self portForName: name onHost: nil];
}
-- (NSPort*) portForName: (NSString*)name
- onHost: (NSString*)host
+- (BOOL) _lookupName: (NSString*)name onHost: (NSString*)host
+ intoAddress: (NSString**)addr andPort: (unsigned*)port
{
GSPortCom *com = nil;
NSRunLoop *loop = [NSRunLoop currentRunLoop];
@@ -593,11 +593,11 @@ typedef enum {
struct in_addr *svrs = &singleServer;
unsigned numSvrs = 1;
unsigned count;
- unsigned portNum = 0;
unsigned len;
NSMutableArray *array;
NSDate *limit;
+ *port = 0;
if (name == nil)
{
[NSException raise: NSInvalidArgumentException
@@ -711,7 +711,7 @@ typedef enum {
{
unsigned i;
- portNum = 0;
+ *port = 0;
count = 0;
do
{
@@ -740,13 +740,12 @@ typedef enum {
{
break; /* No servers left to try! */
}
- [loop runMode: mode
- beforeDate: limit];
+ [loop runMode: mode beforeDate: limit];
/*
* Check for completed operations.
*/
- while (portNum == 0 && i-- > 0)
+ while (*port == 0 && i-- > 0)
{
com = [array objectAtIndex: i];
if ([com isActive] == NO)
@@ -754,9 +753,8 @@ typedef enum {
[com close];
if ([com state] == GSPC_DONE)
{
- portNum
- = GSSwapBigI32ToHost(*(gsu32*)[[com data] bytes]);
- if (portNum != 0)
+ *port = GSSwapBigI32ToHost(*(gsu32*)[[com data] bytes]);
+ if (*port != 0)
{
singleServer = [com addr];
}
@@ -765,7 +763,7 @@ typedef enum {
}
}
}
- while (portNum == 0 && [limit timeIntervalSinceNow] > 0);
+ while (*port == 0 && [limit timeIntervalSinceNow] > 0);
/*
* Make sure that any outstanding lookups are cancelled.
@@ -788,14 +786,32 @@ typedef enum {
NS_ENDHANDLER
[serverLock unlock];
- if (portNum)
+ if (*port)
+ {
+ *addr = [NSString stringWithCString: inet_ntoa(singleServer)];
+ return YES;
+ }
+ else
+ {
+ return NO;
+ }
+}
+
+- (NSPort*) portForName: (NSString*)name
+ onHost: (NSString*)host
+{
+ NSString *addr;
+ unsigned portNum = 0;
+
+ if ([self _lookupName: name
+ onHost: host
+ intoAddress: &addr
+ andPort: &portNum] == YES)
{
if (portClass == [GSTcpPort class])
{
- NSString *addr;
NSHost *host;
- addr = [NSString stringWithCString: inet_ntoa(singleServer)];
host = [NSHost hostWithAddress: addr];
return (NSPort*)[GSTcpPort portWithNumber: portNum
onHost: host
@@ -854,7 +870,6 @@ typedef enum {
NS_DURING
{
NSMutableSet *known = NSMapGet(_portMap, port);
- GSPortCom *tmp;
/*
* If there is no set of names for this port - create one.
@@ -875,8 +890,7 @@ typedef enum {
if ([known count] == 0)
{
com = [GSPortCom new];
- [com startPortUnregistration: [port portNumber]
- withName: nil];
+ [com startPortUnregistration: [port portNumber] withName: nil];
while ([limit timeIntervalSinceNow] > 0 && [com isActive] == YES)
{
[loop runMode: mode
@@ -888,18 +902,14 @@ typedef enum {
[NSException raise: NSPortTimeoutException
format: @"timed out unregistering port"];
}
- tmp = com;
- com = nil;
- RELEASE(tmp);
+ DESTROY(com);
}
com = [GSPortCom new];
- [com startPortRegistration: [port portNumber]
- withName: name];
+ [com startPortRegistration: [port portNumber] withName: name];
while ([limit timeIntervalSinceNow] > 0 && [com isActive] == YES)
{
- [loop runMode: mode
- beforeDate: limit];
+ [loop runMode: mode beforeDate: limit];
}
[com close];
if ([com state] != GSPC_DONE)
@@ -914,19 +924,53 @@ typedef enum {
result = GSSwapBigI32ToHost(*(gsu32*)[[com data] bytes]);
if (result == 0)
{
- [NSException raise: NSGenericException
- format: @"Unable to register name '%@' for the port -\n%@\n"
+ unsigned int portNum;
+ NSString *addr;
+ BOOL found;
+
+ NS_DURING
+ {
+ found = [self _lookupName: name
+ onHost: @""
+ intoAddress: &addr
+ andPort: &portNum];
+
+ }
+ NS_HANDLER
+ {
+ found = NO;
+ }
+ NS_ENDHANDLER
+
+ if (found == YES)
+ {
+ [NSException raise: NSGenericException
+ format: @"Unable to register name '%@' for the port -\n%@\n"
+@"It appears that a process is already registered with this name at port\n"
+@"'%d' IP address %@\n"
+@"Perhaps this program ran before and was shut down without unregistering,\n"
+@"so another process may be running using the same network port. If this is\n"
+@"the case, you can use -\n"
+@"gdomap -U '%@'\n"
+@"to remove the registration so that you can attempt this operation again.",
+ name, port, portNum, addr, name];
+ }
+ else
+ {
+ [NSException raise: NSGenericException
+ format: @"Unable to register name '%@' for the port -\n%@\n"
@"Typically, this might mean that a process is already running with the name\n"
@"'%@' ...\n"
@"Try the command -\n"
-@" gdomap -L '%@'\n"
+@" gdomap -M localhost -L '%@'\n"
@"to find its network details.\n"
@"Alternatively, it may have been shut down without unregistering, and\n"
@"another process may be running using the same network port. If this is\n"
@"the case, you can use -\n"
@"gdomap -U '%@'\n"
@"to remove the registration so that you can attempt this operation again.",
- name, port, name, name, name];
+ name, port, name, name, name];
+ }
}
else
{
@@ -938,16 +982,14 @@ typedef enum {
NSMapInsert(_nameMap, name, port);
}
}
- tmp = com;
- com = nil;
- RELEASE(tmp);
+ DESTROY(com);
}
NS_HANDLER
{
/*
* If we had a problem - close and unlock before continueing.
*/
- RELEASE(com);
+ DESTROY(com);
[serverLock unlock];
[localException raise];
}
diff --git a/Source/NSString.m b/Source/NSString.m
index 38d2b2189..55b10fbfd 100644
--- a/Source/NSString.m
+++ b/Source/NSString.m
@@ -4339,7 +4339,7 @@ handle_printf_atsign (FILE *stream,
* Removes the specified prefix from the string. Raises an exception
* if the prefix is not present.
*/
-- (void) deletePrefix: (NSString*)prefix;
+- (void) deletePrefix: (NSString*)prefix
{
NSCAssert2([self hasPrefix: prefix],
@"'%@' does not have the prefix '%@'", self, prefix);
diff --git a/Tools/AGSHtml.m b/Tools/AGSHtml.m
index 336ff8b15..64d92b0c2 100644
--- a/Tools/AGSHtml.m
+++ b/Tools/AGSHtml.m
@@ -519,6 +519,7 @@ static NSMutableSet *textNodes = nil;
ssect = 0;
sssect = 0;
[self outputNodeList: children to: buf];
+ heading = nil;
}
else if ([name isEqual: @"class"] == YES)
{
@@ -1086,16 +1087,23 @@ static NSMutableSet *textNodes = nil;
}
else if ([name isEqual: @"heading"] == YES)
{
- [buf appendString: indent];
- [buf appendString: @"<"];
- [buf appendString: heading];
- [buf appendString: @">"];
- [buf appendFormat: @"",
- chap, sect, ssect, sssect];
- [self outputText: children to: buf];
- [buf appendString: @""];
- [buf appendString: heading];
- [buf appendString: @">\n"];
+ if (heading == nil)
+ {
+ }
+ else
+ {
+ [buf appendString: indent];
+ [buf appendString: @"<"];
+ [buf appendString: heading];
+ [buf appendString: @">"];
+ [buf appendFormat: @"",
+ chap, sect, ssect, sssect];
+ [self outputText: children to: buf];
+ [buf appendString: @""];
+ [buf appendString: heading];
+ [buf appendString: @">\n"];
+ heading = nil;
+ }
}
else if ([name isEqual: @"index"] == YES)
{
@@ -1394,6 +1402,7 @@ static NSMutableSet *textNodes = nil;
ssect = 0;
sssect = 0;
[self outputNodeList: children to: buf];
+ heading = @"h1";
}
else if ([name isEqual: @"site"] == YES)
{
@@ -1442,12 +1451,14 @@ static NSMutableSet *textNodes = nil;
ssect++;
sssect = 0;
[self outputNodeList: children to: buf];
+ heading = @"h2";
}
else if ([name isEqual: @"subsubsect"] == YES)
{
heading = @"h4";
sssect++;
[self outputNodeList: children to: buf];
+ heading = @"h3";
}
else if ([name isEqual: @"type"] == YES)
{
@@ -1593,14 +1604,28 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
RELEASE(arp);
}
+/**
+ * Output all the nodes from this one onwards ... try to output
+ * as text first, if not possible, call the main method to output
+ * each node.
+ */
- (void) outputNodeList: (GSXMLNode*)node to: (NSMutableString*)buf
{
while (node != nil)
{
GSXMLNode *next = [node nextElement];
+ GSXMLNode *tmp;
- [self outputNode: node to: buf];
- node = next;
+ tmp = [self outputText: node to: buf];
+ if (tmp == node)
+ {
+ [self outputNode: node to: buf];
+ node = next;
+ }
+ else
+ {
+ node = tmp;
+ }
}
}
diff --git a/Tools/AGSOutput.h b/Tools/AGSOutput.h
index 1388fff07..058648a70 100644
--- a/Tools/AGSOutput.h
+++ b/Tools/AGSOutput.h
@@ -33,6 +33,7 @@
NSCharacterSet *spacenl; // Blanks excluding newline
NSArray *args; // Not retained.
BOOL verbose;
+ BOOL warn;
}
- (NSString*) checkComment: (NSString*)comment
@@ -58,7 +59,6 @@
- (unsigned) reformat: (NSString*)str
withIndent: (unsigned)ind
to: (NSMutableString*)buf;
-- (void) setVerbose: (BOOL)flag;
- (NSArray*) split: (NSString*)str;
@end
#endif
diff --git a/Tools/AGSOutput.m b/Tools/AGSOutput.m
index 101e0ec34..21b7fa6d5 100644
--- a/Tools/AGSOutput.m
+++ b/Tools/AGSOutput.m
@@ -81,24 +81,24 @@ static BOOL snuggleStart(NSString *t)
if ([comment length] == 0)
{
comment = @"Description forthcoming.";
- if (verbose == YES)
+ if (warn == YES)
{
NSString *name = [d objectForKey: @"Name"];
NSString *type = [d objectForKey: @"Type"];
if (unit == nil)
{
- NSLog(@"No comments for %@ %@", type, name);
+ NSLog(@"Warning - No comments for %@ %@", type, name);
}
else
{
if ([d objectForKey: @"ReturnType"] != nil)
{
- NSLog(@"No comments for [%@ %@]", unit, name);
+ NSLog(@"Warning - No comments for [%@ %@]", unit, name);
}
else
{
- NSLog(@"No comments for instance variable %@ in %@",
+ NSLog(@"Warning - No comments for instance variable %@ in %@",
name, unit);
}
}
@@ -213,6 +213,8 @@ static BOOL snuggleStart(NSString *t)
@"_0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"]);
identStart = RETAIN([NSCharacterSet characterSetWithCharactersInString:
@"_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"]);
+ verbose = [[NSUserDefaults standardUserDefaults] boolForKey: @"Verbose"];
+ warn = [[NSUserDefaults standardUserDefaults] boolForKey: @"Warn"];
return self;
}
@@ -629,7 +631,7 @@ static BOOL snuggleStart(NSString *t)
NSString *declared = [d objectForKey: @"Declared"];
NSString *standards = nil;
- if ([[d objectForKey: @"Implemented"] isEqual: @"YES"] == NO)
+ if (warn == YES && [[d objectForKey: @"Implemented"] isEqual: @"YES"] == NO)
{
NSLog(@"Warning ... %@ %@ is not implemented where expected", kind, name);
}
@@ -680,7 +682,7 @@ static BOOL snuggleStart(NSString *t)
NSString *standards = nil;
unsigned i = [aa count];
- if ([[d objectForKey: @"Implemented"] isEqual: @"YES"] == NO)
+ if (warn == YES && [[d objectForKey: @"Implemented"] isEqual: @"YES"] == NO)
{
NSLog(@"Warning ... function %@ is not implemented where expected", name);
}
@@ -861,7 +863,8 @@ static BOOL snuggleStart(NSString *t)
NSString *override = nil;
NSString *standards = nil;
- if (unit != nil && [[d objectForKey: @"Implemented"] isEqual: @"YES"] == NO)
+ if (warn == YES && unit != nil
+ && [[d objectForKey: @"Implemented"] isEqual: @"YES"] == NO)
{
NSLog(@"Warning ... method %@ %@ is not implemented where expected",
unit, name);
@@ -1056,7 +1059,7 @@ static BOOL snuggleStart(NSString *t)
[m setObject: @"YES" forKey: @"Implemented"];
}
}
- else
+ else if (warn == YES)
{
NSLog(@"Warning ... unit %@ is not implemented where expected", name);
}
@@ -1393,11 +1396,6 @@ static BOOL snuggleStart(NSString *t)
return ind;
}
-- (void) setVerbose: (BOOL)flag
-{
- verbose = flag;
-}
-
- (NSArray*) split: (NSString*)str
{
NSMutableArray *a = [NSMutableArray arrayWithCapacity: 128];
diff --git a/Tools/AGSParser.h b/Tools/AGSParser.h
index 8a8a67262..21549b599 100644
--- a/Tools/AGSParser.h
+++ b/Tools/AGSParser.h
@@ -61,6 +61,7 @@
BOOL inArgList;
BOOL documentAllInstanceVariables;
BOOL verbose;
+ BOOL warn;
NSDictionary *wordMap;
NSString *declared; /** Where classes were declared. */
NSMutableArray *ifStack; /** Track preprocessor conditionals. */
@@ -93,7 +94,6 @@
- (void) setDocumentAllInstanceVariables: (BOOL)flag;
- (void) setGenerateStandards: (BOOL)flag;
- (void) setStandards: (NSMutableDictionary*)dict;
-- (void) setVerbose: (BOOL)flag;
- (void) setWordMap: (NSDictionary*)map;
- (void) setupBuffer;
- (unsigned) skipArray;
diff --git a/Tools/AGSParser.m b/Tools/AGSParser.m
index fbf12349c..050e0edb0 100644
--- a/Tools/AGSParser.m
+++ b/Tools/AGSParser.m
@@ -24,6 +24,83 @@
@implementation AGSParser
+/**
+ * Method to add the comment from the main() function to the end
+ * of the initial chapter in the output document. We do this to
+ * support the use of autogsdoc to document tools.
+ */
+- (void) addMain: (NSString*)c
+{
+ NSString *chap;
+ NSMutableString *m;
+ NSRange r;
+
+ chap = [info objectForKey: @"chapter"];
+ if (chap == nil)
+ {
+ chap = [NSString stringWithFormat:
+ @"
+ * If the dictionary is nil, accumulate in the comment ivar instead.
+ * If the comment is empty, ignore it.
+ * If there is no comment in the dictionary, simply set the new value.
+ * If a comment already exists then the new comment text is appended to
+ * it with a separating line break inserted if necessary.
+ */
+- (void) appendComment: (NSString*)s to: (NSMutableDictionary*)d
+{
+ s = [s stringByTrimmingSpaces];
+ if ([s length] > 0)
+ {
+ NSString *old;
+
+ if (d == nil)
+ {
+ old = comment;
+ }
+ else
+ {
+ old = [d objectForKey: @"Comment"];
+ }
+ if (old != nil)
+ {
+ if ([old hasSuffix: @"
Even without any human assistance, this tool will produce skeleton
@@ -44,7 +44,18 @@
Any comment beginning with slash and two asterisks rather than
the common slash and single asterisk, is taken to be gsdoc markup, to
be use as the description of the class or method following it. This
- comment text is reformatted and then inserted into the output.
+ comment text is reformatted and then inserted into the output.
+ Where multiple comments are associatd with the same item, they are
+ joined together with a line break (<br />) between each if
+ necessary.
+
+ The tool can easily be used to document programs as well as libraries, + simply by giving it the name of the source file containing the main() + function of the program - it takes the special comments from that + function and handles them specially, inserting them as a section at + the end of the first chapter of the document (it creates the first + chapter if necessary).
There are some cases where special extra processing is performed,
@@ -90,7 +101,9 @@
+ code being documented works.
Any documentation for the main()
+ function of a program is inserted as a section at the end of this
+ chapter.
eg. [ NSObject-init],
- will create a reference to the init method of NSObject, while
-
[ (NSCopying)-copyWithZone:], creates a
+
eg. [
NSObject-init]
,
+ will create a reference to the init method of NSObject (either the
+ class proper, or any of its categories), while
+ [
(NSCopying)-copyWithZone:]
, creates a
reference to a method in the NSCopyIng protocol.
Note that no spaces must appear between the square brackets
in these specifiers.
-
Protocol namnes are enclosed in round brackets rather than
+
Protocol names are enclosed in round brackets rather than
the customary angle brackets, because gsdoc is an XML language, and
XML treats angle brackets specially.
- This is useful if constanr in the source code are scattered around many
+ This is useful if constants in the source code are scattered around many
files, and you need to group them into one place.
You are responsible for ensuring that the basic template document
(into which individual constant documentation is inserted) contains
- all the other information you want, but as a conveniencem autogsdoc
+ all the other information you want, but as a convenience autogsdoc
will generate a simple template (which you may then edit) for you
if the file does not exist.
Insertion takes place immediately before the back
element (or if that does not exist, immediately before the end
- of the body lement) in the template.
+ of the body element) in the template.
@@ -239,7 +253,7 @@
files, and you need to group it into one place.
You are responsible for ensuring that the basic template document
(into which individual function documentation is inserted) contains
- all the other information you want, but as a conveniencem autogsdoc
+ all the other information you want, but as a convenience autogsdoc
will generate a simple template (which you may then edit) for you
if the file does not exist.
Insertion takes place immediately before the back
@@ -336,7 +350,7 @@
files, and you need to group it into one place.
You are responsible for ensuring that the basic template document
(into which individual typedef documentation is inserted) contains
- all the other information you want, but as a conveniencem autogsdoc
+ all the other information you want, but as a convenience autogsdoc
will generate a simple template (which you may then edit) for you
if the file does not exist.
Insertion takes place immediately before the back
@@ -357,13 +371,21 @@
files, and you need to group it into one place.
You are responsible for ensuring that the basic template document
(into which individual variable documentation is inserted) contains
- all the other information you want, but as a conveniencem autogsdoc
+ all the other information you want, but as a convenience autogsdoc
will generate a simple template (which you may then edit) for you
if the file does not exist.
Insertion takes place immediately before the back
element (or if that does not exist, immediately before the end
of the body lement) in the template.