summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <mulk@minimulk.mst-plus>2008-08-08 19:09:24 +0200
committerMatthias Benkard <mulk@minimulk.mst-plus>2008-08-08 19:09:24 +0200
commit249175b68c3cb9d9b146c3930ae62cb2712f8d1a (patch)
treeca2fdca5bc699b6d8f0ca0f21886898cfdc90f4c
parent09b354980b8cfc50d01741b5ec433a5bab14ef6e (diff)
Make MLKPackage Fix-and-Continue-friendly.
-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];