add array 'informalProtocols' to accumulate informal protocols as they are found

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20089 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adrian Robert 2004-09-19 23:05:09 +00:00
parent 4920b3a4da
commit 896ff24db8
2 changed files with 11 additions and 0 deletions

View file

@ -32,6 +32,7 @@
NSCharacterSet *spaces; // All blank characters
NSCharacterSet *spacenl; // Blanks excluding newline
NSArray *args; // Not retained.
NSMutableArray *informalProtocols; // built up as discovered
BOOL verbose;
BOOL warn;
}
@ -62,5 +63,6 @@
withIndent: (unsigned)ind
to: (NSMutableString*)buf;
- (NSArray*) split: (NSString*)str;
- (NSArray*) informalProtocols;
@end
#endif

View file

@ -131,6 +131,7 @@ static BOOL snuggleStart(NSString *t)
DESTROY(identStart);
DESTROY(spaces);
DESTROY(spacenl);
DESTROY(informalProtocols);
[super dealloc];
}
@ -231,6 +232,7 @@ static BOOL snuggleStart(NSString *t)
@"_0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"]);
identStart = RETAIN([NSCharacterSet characterSetWithCharactersInString:
@"_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"]);
informalProtocols = [NSMutableArray new];
verbose = [[NSUserDefaults standardUserDefaults] boolForKey: @"Verbose"];
warn = [[NSUserDefaults standardUserDefaults] boolForKey: @"Warn"];
@ -1177,6 +1179,8 @@ static BOOL snuggleStart(NSString *t)
{
[m setObject: @"YES" forKey: @"Implemented"];
}
[informalProtocols addObject: name];
}
else if (warn == YES)
{
@ -2237,6 +2241,11 @@ static BOOL snuggleStart(NSString *t)
return a;
}
- (NSArray*) informalProtocols
{
return informalProtocols;
}
@end