mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 01:21:08 +00:00
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:
parent
6d84033e50
commit
f8b59d8868
11 changed files with 104 additions and 59 deletions
|
@ -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>
|
2001-01-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* configure.in: Add check for rexcent versions of gmp
|
* configure.in: Add check for rexcent versions of gmp
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
<declared>Foundation/NSTimeZone.h</declared>
|
<declared>Foundation/NSTimeZone.h</declared>
|
||||||
<conform>NSCoding</conform>
|
<conform>NSCoding</conform>
|
||||||
<desc>
|
<desc>
|
||||||
</desc>
|
|
||||||
<p>
|
<p>
|
||||||
If the GNUstep time zone datafiles become too out of date, one
|
If the GNUstep time zone datafiles become too out of date, one
|
||||||
can download an updated database from <uref
|
can download an updated database from <uref
|
||||||
|
@ -40,6 +39,7 @@
|
||||||
wildly between OSes (this could be a big problem when
|
wildly between OSes (this could be a big problem when
|
||||||
archiving is used between different systems).
|
archiving is used between different systems).
|
||||||
</p>
|
</p>
|
||||||
|
</desc>
|
||||||
|
|
||||||
<method type="NSDictionary*" factory="yes">
|
<method type="NSDictionary*" factory="yes">
|
||||||
<sel>abbreviationDictionary</sel>
|
<sel>abbreviationDictionary</sel>
|
||||||
|
|
|
@ -21,6 +21,29 @@
|
||||||
</p>
|
</p>
|
||||||
<hr>
|
<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>
|
<h2>Instance Variables </h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -347,7 +347,7 @@ static SEL eqSel;
|
||||||
|
|
||||||
[aCoder decodeValueOfObjCType: @encode(unsigned)
|
[aCoder decodeValueOfObjCType: @encode(unsigned)
|
||||||
at: &count];
|
at: &count];
|
||||||
if ([self initWithCapacity: count] == nil)
|
if ((self = [self initWithCapacity: count]) == nil)
|
||||||
{
|
{
|
||||||
[NSException raise: NSMallocException
|
[NSException raise: NSMallocException
|
||||||
format: @"Unable to make array"];
|
format: @"Unable to make array"];
|
||||||
|
|
|
@ -201,7 +201,8 @@
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if ([self initWithCapacity: c] == nil)
|
self = [self initWithCapacity: c];
|
||||||
|
if (self == nil)
|
||||||
{
|
{
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
|
@ -437,7 +437,7 @@ static SEL rlSel;
|
||||||
RELEASE(myString);
|
RELEASE(myString);
|
||||||
if ([result isKindOfClass: NSArrayClass])
|
if ([result isKindOfClass: NSArrayClass])
|
||||||
{
|
{
|
||||||
[self initWithArray: result];
|
self = [self initWithArray: result];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -424,7 +424,7 @@ static SEL appSel;
|
||||||
RELEASE(myString);
|
RELEASE(myString);
|
||||||
if ([result isKindOfClass: NSDictionaryClass])
|
if ([result isKindOfClass: NSDictionaryClass])
|
||||||
{
|
{
|
||||||
[self initWithDictionary: result];
|
self = [self initWithDictionary: result];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -974,15 +974,18 @@ static NSString *indentStrings[] = {
|
||||||
- (id) initWithObjects: (id*)objects
|
- (id) initWithObjects: (id*)objects
|
||||||
forKeys: (id*)keys
|
forKeys: (id*)keys
|
||||||
count: (unsigned)count
|
count: (unsigned)count
|
||||||
|
{
|
||||||
|
self = [self initWithCapacity: count];
|
||||||
|
if (self != nil)
|
||||||
{
|
{
|
||||||
IMP setObj;
|
IMP setObj;
|
||||||
|
|
||||||
[self initWithCapacity: count];
|
|
||||||
setObj = [self methodForSelector: setSel];
|
setObj = [self methodForSelector: setSel];
|
||||||
while (count--)
|
while (count--)
|
||||||
{
|
{
|
||||||
(*setObj)(self, setSel, objects[count], keys[count]);
|
(*setObj)(self, setSel, objects[count], keys[count]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -502,11 +502,14 @@ static Class NSMutableSet_concrete_class;
|
||||||
- (id) initWithObjects: (id*)objects
|
- (id) initWithObjects: (id*)objects
|
||||||
count: (unsigned)count
|
count: (unsigned)count
|
||||||
{
|
{
|
||||||
[self initWithCapacity: count];
|
self = [self initWithCapacity: count];
|
||||||
|
if (self != nil)
|
||||||
|
{
|
||||||
while (count--)
|
while (count--)
|
||||||
{
|
{
|
||||||
[self addObject: objects[count]];
|
[self addObject: objects[count]];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -459,7 +459,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[self initWithFileDescriptor: 2 closeOnDealloc: NO];
|
self = [self initWithFileDescriptor: 2 closeOnDealloc: NO];
|
||||||
fh_stderr = self;
|
fh_stderr = self;
|
||||||
}
|
}
|
||||||
self = fh_stderr;
|
self = fh_stderr;
|
||||||
|
@ -477,7 +477,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[self initWithFileDescriptor: 0 closeOnDealloc: NO];
|
self = [self initWithFileDescriptor: 0 closeOnDealloc: NO];
|
||||||
fh_stdin = self;
|
fh_stdin = self;
|
||||||
}
|
}
|
||||||
self = fh_stdin;
|
self = fh_stdin;
|
||||||
|
@ -495,7 +495,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[self initWithFileDescriptor: 1 closeOnDealloc: NO];
|
self = [self initWithFileDescriptor: 1 closeOnDealloc: NO];
|
||||||
fh_stdout = self;
|
fh_stdout = self;
|
||||||
}
|
}
|
||||||
self = fh_stdout;
|
self = fh_stdout;
|
||||||
|
|
|
@ -401,7 +401,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[self initWithFileDescriptor: 2 closeOnDealloc: NO];
|
self = [self initWithFileDescriptor: 2 closeOnDealloc: NO];
|
||||||
fh_stderr = self;
|
fh_stderr = self;
|
||||||
}
|
}
|
||||||
self = fh_stderr;
|
self = fh_stderr;
|
||||||
|
@ -419,7 +419,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[self initWithFileDescriptor: 0 closeOnDealloc: NO];
|
self = [self initWithFileDescriptor: 0 closeOnDealloc: NO];
|
||||||
fh_stdin = self;
|
fh_stdin = self;
|
||||||
}
|
}
|
||||||
self = fh_stdin;
|
self = fh_stdin;
|
||||||
|
@ -437,7 +437,7 @@ getAddr(NSString* name, NSString* svc, NSString* pcl, struct sockaddr_in *sin)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[self initWithFileDescriptor: 1 closeOnDealloc: NO];
|
self = [self initWithFileDescriptor: 1 closeOnDealloc: NO];
|
||||||
fh_stdout = self;
|
fh_stdout = self;
|
||||||
}
|
}
|
||||||
self = fh_stdout;
|
self = fh_stdout;
|
||||||
|
|
|
@ -1951,9 +1951,15 @@ loader(const char *url, const char *eid, xmlParserCtxtPtr *ctxt)
|
||||||
|
|
||||||
- (NSString *) parseItem: (xmlNodePtr)node
|
- (NSString *) parseItem: (xmlNodePtr)node
|
||||||
{
|
{
|
||||||
|
NSMutableString *text = [NSMutableString string];
|
||||||
|
|
||||||
NSDebugMLLog(@"debug", @"Start parsing item");
|
NSDebugMLLog(@"debug", @"Start parsing item");
|
||||||
node = node->children;
|
node = node->children;
|
||||||
|
|
||||||
|
while (node != 0)
|
||||||
|
{
|
||||||
|
BOOL step = YES;
|
||||||
|
|
||||||
if (strcmp(node->name, "class") == 0
|
if (strcmp(node->name, "class") == 0
|
||||||
|| strcmp(node->name, "category") == 0
|
|| strcmp(node->name, "category") == 0
|
||||||
|| strcmp(node->name, "protocol") == 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, "ivariable") == 0
|
||||||
|| strcmp(node->name, "constant") == 0)
|
|| strcmp(node->name, "constant") == 0)
|
||||||
{
|
{
|
||||||
return [self parseDef: node];
|
[text appendString: [self parseDef: node]];
|
||||||
}
|
}
|
||||||
|
else if (strcmp(node->name, "list") == 0
|
||||||
if (strcmp(node->name, "list") == 0
|
|
||||||
|| strcmp(node->name, "enum") == 0
|
|| strcmp(node->name, "enum") == 0
|
||||||
|| strcmp(node->name, "deflist") == 0
|
|| strcmp(node->name, "deflist") == 0
|
||||||
|| strcmp(node->name, "qalist") == 0)
|
|| strcmp(node->name, "qalist") == 0)
|
||||||
{
|
{
|
||||||
return [self parseList: node];
|
[text appendString: [self parseList: node]];
|
||||||
}
|
}
|
||||||
|
else if (strcmp(node->name, "p") == 0)
|
||||||
if (strcmp(node->name, "p") == 0)
|
|
||||||
{
|
{
|
||||||
NSString *elem = [self parseText: node->children];
|
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];
|
|
||||||
}
|
}
|
||||||
|
else if (strcmp(node->name, "example") == 0)
|
||||||
if (strcmp(node->name, "example") == 0)
|
|
||||||
{
|
{
|
||||||
return [self parseExample: node];
|
[text appendString: [self parseExample: node]];
|
||||||
}
|
}
|
||||||
|
else if (strcmp(node->name, "embed") == 0)
|
||||||
if (strcmp(node->name, "embed") == 0)
|
|
||||||
{
|
{
|
||||||
return [self parseEmbed: node];
|
[text appendString: [self parseEmbed: node]];
|
||||||
}
|
}
|
||||||
|
else
|
||||||
return [self parseText: node];
|
{
|
||||||
|
[text appendString: [self parseText: node end: &node]];
|
||||||
|
step = NO;
|
||||||
|
}
|
||||||
|
if (step == YES)
|
||||||
|
node = node->next;
|
||||||
|
}
|
||||||
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) parseList: (xmlNodePtr)node
|
- (NSString *) parseList: (xmlNodePtr)node
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue