summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKPackage.m53
1 files changed, 33 insertions, 20 deletions
diff --git a/MLKPackage.m b/MLKPackage.m
index 256b6a9..f867694 100644
--- a/MLKPackage.m
+++ b/MLKPackage.m
@@ -33,26 +33,39 @@ static NSMutableDictionary *packages = nil;
@implementation MLKPackage
+(void) initialize
{
- packages = [[NSMutableDictionary alloc] init];
-
- MLKPackage *cl = [MLKPackage packageWithName:@"COMMON-LISP"
- nicknames:[NSSet setWithObject:@"CL"]];
- MLKPackage *clUser = [MLKPackage packageWithName:@"COMMON-LISP-USER"
- nicknames:[NSSet setWithObject:@"CL-USER"]];;
- MLKPackage *sys = [MLKPackage packageWithName:@"TOILET-SYSTEM"
- nicknames:[NSSet setWithObjects:
- @"TL-SYS", @"SYSTEM",
- @"SYS", nil]];
- MLKPackage *toilet = [MLKPackage packageWithName:@"TOILET-LISP"
- nicknames:[NSSet setWithObjects:
- @"TL", @"TOILET", nil]];
- MLKPackage *tlUser = [MLKPackage packageWithName:@"TOILET-LISP-USER"
- nicknames:[NSSet setWithObjects:
- @"TL-USER",
- @"TOILET-USER",
- nil]];
-
- [MLKPackage packageWithName:@"KEYWORD" nicknames:[NSSet set]];
+ MLKPackage *cl, *clUser, *sys, *toilet, *tlUser;
+
+ if (!packages)
+ {
+ packages = [[NSMutableDictionary alloc] init];
+
+ cl = [MLKPackage packageWithName:@"COMMON-LISP"
+ nicknames:[NSSet setWithObject:@"CL"]];
+ clUser = [MLKPackage packageWithName:@"COMMON-LISP-USER"
+ nicknames:[NSSet setWithObject:@"CL-USER"]];;
+ sys = [MLKPackage packageWithName:@"TOILET-SYSTEM"
+ nicknames:[NSSet setWithObjects:
+ @"TL-SYS", @"SYSTEM",
+ @"SYS", nil]];
+ toilet = [MLKPackage packageWithName:@"TOILET-LISP"
+ nicknames:[NSSet setWithObjects:
+ @"TL", @"TOILET", nil]];
+ tlUser = [MLKPackage packageWithName:@"TOILET-LISP-USER"
+ nicknames:[NSSet setWithObjects:
+ @"TL-USER",
+ @"TOILET-USER",
+ nil]];
+
+ [MLKPackage packageWithName:@"KEYWORD" nicknames:[NSSet set]];
+ }
+ else
+ {
+ cl = [self findPackage:@"COMMON-LISP"];
+ clUser = [self findPackage:@"COMMON-LISP-USER"];
+ sys = [self findPackage:@"TOILET-SYSTEM"];
+ toilet = [self findPackage:@"TOILET-LISP"];
+ tlUser = [self findPackage:@"TOILET-LISP-USER"];
+ }
[cl usePackage:sys];