about summary refs log tree commit diff
path: root/Src/modentry.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-05-30 22:35:03 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-05-30 22:35:03 +0000
commitdd5602f59b599177fb130512fc543f7efa951990 (patch)
tree93f50c0abbbc61dbea120afb6f497afe6b976fea /Src/modentry.c
parentfd240e09b05ca15aa1deef35733124b6852fe809 (diff)
downloadzsh-dd5602f59b599177fb130512fc543f7efa951990.tar.gz
zsh-dd5602f59b599177fb130512fc543f7efa951990.tar.xz
zsh-dd5602f59b599177fb130512fc543f7efa951990.zip
22474: use variable argument lists to improve error message handling
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;
+    }
 }