Merged in 1.6.0 branch

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16228 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2003-03-23 07:06:27 +00:00
parent 04e888af0a
commit cc098b74c2
38 changed files with 812 additions and 295 deletions

View file

@ -775,6 +775,7 @@ static NSMutableSet *textNodes = nil;
if (val == nil)
{
val = text;
if (val == nil) val = @"";
}
[buf appendString: [self makeAnchor: val ofType: @"label" name: @""]];
}
@ -844,6 +845,7 @@ static NSMutableSet *textNodes = nil;
{
NSString *content = [t content];
if (content == nil) content = @"";
str = [str stringByAppendingString: content];
}
t = [t next];
@ -1180,6 +1182,7 @@ static NSMutableSet *textNodes = nil;
if (val == nil)
{
val = text;
if (val == nil) val = @"";
}
[buf appendString:
[self makeAnchor: val ofType: @"label" name: text]];
@ -1219,6 +1222,7 @@ static NSMutableSet *textNodes = nil;
{
NSString *content = [t content];
if (content == nil) content = @"";
str = [str stringByAppendingString: content];
}
t = [t next];
@ -1333,6 +1337,7 @@ static NSMutableSet *textNodes = nil;
{
NSString *content = [t content];
if (content == nil) content = @"";
sel = [sel stringByAppendingString: content];
if (hadArg == YES)
{
@ -1356,7 +1361,10 @@ static NSMutableSet *textNodes = nil;
{
if ([t type] == XML_TEXT_NODE)
{
str = [str stringByAppendingString: [t content]];
NSString *content = [t content];
if (content == nil) content = @"";
str = [str stringByAppendingString: content];
}
t = [t next];
}
@ -1991,6 +1999,7 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
{
NSString *str = [node content];
if (str == nil) str = @"";
[buf appendString: str];
}
else if ([node type] == XML_ENTITY_REF_NODE)
@ -2043,6 +2052,7 @@ NSLog(@"Element '%@' not implemented", name); // FIXME
{
NSString *text = [[node firstChild] content];
if (text == nil) text = @"";
[buf appendString: indent];
[buf appendString: @"<dd>"];
[buf appendString: [self protocolRef: text]];

View file

@ -274,6 +274,7 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
{
NSMutableDictionary *d;
NSString *k;
NSString *c;
d = [refs objectForKey: @"contents"];
if (d == nil)
@ -285,7 +286,9 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
k = [NSString stringWithFormat: @"%03u%03u%03u%03u",
chap, sect, ssect, sssect];
[d setObject: [[children content] stringByTrimmingSpaces] forKey: k];
c = [[children content] stringByTrimmingSpaces];
if (c == nil) c = @"";
[d setObject: c forKey: k];
children = nil;
}
else if ([name isEqual: @"ivariable"] == YES)
@ -303,6 +306,7 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
NSString *val;
text = [[children content] stringByTrimmingSpaces];
if (text == nil) text = @"";
children = nil;
all = [refs objectForKey: name];
if (all == nil)
@ -352,8 +356,11 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
{
if ([t type] == XML_TEXT_NODE)
{
sel = [sel stringByAppendingString:
[[t content] stringByTrimmingSpaces]];
NSString *s;
s = [[t content] stringByTrimmingSpaces];
if (s == nil) s = @"";
sel = [sel stringByAppendingString: s];
}
t = [t next];
}
@ -416,6 +423,7 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
else if ([name isEqual: @"title"] == YES)
{
NSMutableDictionary *d;
NSString *s;
d = [refs objectForKey: @"title"];
if (d == nil)
@ -425,8 +433,9 @@ setDirectory(NSMutableDictionary *dict, NSString *path)
RELEASE(d);
}
[d setObject: [[children content] stringByTrimmingSpaces]
forKey: base];
s = [[children content] stringByTrimmingSpaces];
if (s == nil) s = @"";
[d setObject: s forKey: base];
children = nil;
}
else

View file

@ -1344,6 +1344,31 @@
}
}
if (buffer[pos] == '_')
{
NSString *ident = [self parseIdentifier];
if ([ident isEqualToString: @"__attribute__"] == YES)
{
[self skipSpaces];
if (pos < length && buffer[pos] == '(')
{
[self skipBlock];
[self skipSpaces];
}
}
else
{
[self log: @"Underscore is not from __attribute__"];
goto fail;
}
if (pos >= length)
{
[self log: @"Unexpected end of declaration"];
goto fail;
}
}
if (buffer[pos] == ';')
{
[self skipStatement];