Various fixes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8810 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 2001-01-26 12:09:35 +00:00
parent 6d84033e50
commit f8b59d8868
11 changed files with 104 additions and 59 deletions

View file

@ -1,3 +1,10 @@
2001-01-26 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSArray.m: Fix failure to assign result of init to self
(similar fixes in various other files).
* Tools/gsdoc.m: Fix error in parsing items containing mixed elements.
* Documentation/gsdoc/NSTimeZone.gsdoc: Fix erro in markup.
2001-01-25 Richard Frith-Macdonald <rfm@gnu.org>
* configure.in: Add check for rexcent versions of gmp

View file

@ -17,7 +17,6 @@
<declared>Foundation/NSTimeZone.h</declared>
<conform>NSCoding</conform>
<desc>
</desc>
<p>
If the GNUstep time zone datafiles become too out of date, one
can download an updated database from <uref
@ -40,6 +39,7 @@
wildly between OSes (this could be a big problem when
archiving is used between different systems).
</p>
</desc>
<method type="NSDictionary*" factory="yes">
<sel>abbreviationDictionary</sel>

View file

@ -21,6 +21,29 @@
</p>
<hr>
<p>
If the GNUstep time zone datafiles become too out of date, one
can download an updated database from <a href ="ftp://elsie.nci.nih.gov/pub/">ftp://elsie.nci.nih.gov/pub/</a>
and compile it as specified in the README file in the
NSTimeZones directory.
Time zone names in NSDates should be GMT, MET etc. not
Europe/Berlin, America/Washington etc.
The problem with this is that various time zones may use the
same abbreviation (e.g. Australia/Brisbane and
America/New_York both use EST), and some time zones
may have different rules for daylight saving time even if the
abbreviation and offsets from UTC are the same.
The problems with depending on the OS for providing time zone
info are that some methods for the NSTimeZone classes might be
difficult to implement, and also that time zone names may vary
wildly between OSes (this could be a big problem when
archiving is used between different systems).
</p>
<h2>Instance Variables </h2>
<ul>

View file

@ -347,7 +347,7 @@ static SEL eqSel;
[aCoder decodeValueOfObjCType: @encode(unsigned)
at: &count];
if ([self initWithCapacity: count] == nil)
if ((self = [self initWithCapacity: count]) == nil)
{
[NSException raise: NSMallocException
format: @"Unable to make array"];

View file

@ -201,7 +201,8 @@
{
int i;
if ([self initWithCapacity: c] == nil)
self = [self initWithCapacity: c];
if (self == nil)
{
return nil;
}

View file

@ -437,7 +437,7 @@ static SEL rlSel;
RELEASE(myString);
if ([result isKindOfClass: NSArrayClass])
{
[self initWithArray: result];
self = [self initWithArray: result];
return self;
}
}

View file

@ -424,7 +424,7 @@ static SEL appSel;
RELEASE(myString);
if ([result isKindOfClass: NSDictionaryClass])
{
[self initWithDictionary: result];
self = [self initWithDictionary: result];
return self;
}
}
@ -974,15 +974,18 @@ static NSString *indentStrings[] = {
- (id) initWithObjects: (id*)objects
forKeys: (id*)keys
count: (unsigned)count
{
self = [self initWithCapacity: count];
if (self != nil)
{
IMP setObj;
[self initWithCapacity: count];
setObj = [self methodForSelector: setSel];
while (count--)
{
(*setObj)(self, setSel, objects[count], keys[count]);
}
}
return self;
}

View file

@ -502,11 +502,14 @@ static Class NSMutableSet_concrete_class;
- (id) initWithObjects: (id*)objects
count: (unsigned)count
{
[self initWithCapacity: count];
self = [self initWithCapacity: count];
if (self != nil)
{
while (count--)
{
[self addObject: objects[count]];
}
}
return self;
}

View file

@ -459,7 +459,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
}
else
{
[self initWithFileDescriptor: 2 closeOnDealloc: NO];
self = [self initWithFileDescriptor: 2 closeOnDealloc: NO];
fh_stderr = self;
}
self = fh_stderr;
@ -477,7 +477,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
}
else
{
[self initWithFileDescriptor: 0 closeOnDealloc: NO];
self = [self initWithFileDescriptor: 0 closeOnDealloc: NO];
fh_stdin = self;
}
self = fh_stdin;
@ -495,7 +495,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
}
else
{
[self initWithFileDescriptor: 1 closeOnDealloc: NO];
self = [self initWithFileDescriptor: 1 closeOnDealloc: NO];
fh_stdout = self;
}
self = fh_stdout;

View file

@ -401,7 +401,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
}
else
{
[self initWithFileDescriptor: 2 closeOnDealloc: NO];
self = [self initWithFileDescriptor: 2 closeOnDealloc: NO];
fh_stderr = self;
}
self = fh_stderr;
@ -419,7 +419,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
}
else
{
[self initWithFileDescriptor: 0 closeOnDealloc: NO];
self = [self initWithFileDescriptor: 0 closeOnDealloc: NO];
fh_stdin = self;
}
self = fh_stdin;
@ -437,7 +437,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
}
else
{
[self initWithFileDescriptor: 1 closeOnDealloc: NO];
self = [self initWithFileDescriptor: 1 closeOnDealloc: NO];
fh_stdout = self;
}
self = fh_stdout;

View file

@ -1951,9 +1951,15 @@ loader(const char *url, const char *eid, xmlParserCtxtPtr *ctxt)
- (NSString *) parseItem: (xmlNodePtr)node
{
NSMutableString *text = [NSMutableString string];
NSDebugMLLog(@"debug", @"Start parsing item");
node = node->children;
while (node != 0)
{
BOOL step = YES;
if (strcmp(node->name, "class") == 0
|| strcmp(node->name, "category") == 0
|| strcmp(node->name, "protocol") == 0
@ -1964,39 +1970,41 @@ loader(const char *url, const char *eid, xmlParserCtxtPtr *ctxt)
|| strcmp(node->name, "ivariable") == 0
|| strcmp(node->name, "constant") == 0)
{
return [self parseDef: node];
[text appendString: [self parseDef: node]];
}
if (strcmp(node->name, "list") == 0
else if (strcmp(node->name, "list") == 0
|| strcmp(node->name, "enum") == 0
|| strcmp(node->name, "deflist") == 0
|| strcmp(node->name, "qalist") == 0)
{
return [self parseList: node];
[text appendString: [self parseList: node]];
}
if (strcmp(node->name, "p") == 0)
else if (strcmp(node->name, "p") == 0)
{
NSString *elem = [self parseText: node->children];
if (elem == nil)
if (elem != nil)
{
return nil;
[text appendFormat: @"<p>\r\n%@</p>\r\n", elem];
}
return [NSString stringWithFormat: @"<p>\r\n%@</p>\r\n", elem];
}
if (strcmp(node->name, "example") == 0)
else if (strcmp(node->name, "example") == 0)
{
return [self parseExample: node];
[text appendString: [self parseExample: node]];
}
if (strcmp(node->name, "embed") == 0)
else if (strcmp(node->name, "embed") == 0)
{
return [self parseEmbed: node];
[text appendString: [self parseEmbed: node]];
}
return [self parseText: node];
else
{
[text appendString: [self parseText: node end: &node]];
step = NO;
}
if (step == YES)
node = node->next;
}
return text;
}
- (NSString *) parseList: (xmlNodePtr)node