about summary refs log tree commit diff
path: root/Src/modentry.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/modentry.c')
-rw-r--r--Src/modentry.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/Src/modentry.c b/Src/modentry.c
index 63c4b825d..87c89e0d7 100644
--- a/Src/modentry.c
+++ b/Src/modentry.c
@@ -1,15 +1,35 @@
 #include "zsh.mdh"
 
+int setup_ _((Module));
 int boot_ _((Module));
 int cleanup_ _((Module));
+int finish_ _((Module));
 int modentry _((int boot, Module m));
 
 /**/
 int
 modentry(int boot, Module m)
 {
-    if (boot)
+    switch (boot) {
+    case 0:
+	return setup_(m);
+	break;
+
+    case 1:
 	return boot_(m);
-    else
+	break;
+
+    case 2:
 	return cleanup_(m);
+	break;
+
+    case 3:
+	return finish_(m);
+	break;
+
+    default:
+	zerr("bad call to modentry");
+	return 1;
+	break;
+    }
 }