summaryrefslogtreecommitdiff
path: root/Src/Zle/compctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/compctl.c')
-rw-r--r--Src/Zle/compctl.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c
index 81f11b423..bafbb2f68 100644
--- a/Src/Zle/compctl.c
+++ b/Src/Zle/compctl.c
@@ -3942,6 +3942,14 @@ static struct builtin bintab[] = {
BUILTIN("compcall", 0, bin_compcall, 0, 0, 0, "TD", NULL),
};
+static struct features module_features = {
+ bintab, sizeof(bintab)/sizeof(*bintab),
+ NULL, 0,
+ NULL, 0,
+ NULL, 0,
+ 0
+};
+
/**/
int
setup_(UNUSED(Module m))
@@ -3964,11 +3972,26 @@ setup_(UNUSED(Module m))
/**/
int
+features_(Module m, char ***features)
+{
+ *features = featuresarray(m->nam, &module_features);
+ return 0;
+}
+
+/**/
+int
+enables_(Module m, int **enables)
+{
+ return handlefeatures(m->nam, &module_features, enables);
+}
+
+/**/
+int
boot_(Module m)
{
addhookfunc("compctl_make", (Hookfn) ccmakehookfn);
addhookfunc("compctl_cleanup", (Hookfn) cccleanuphookfn);
- return (addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab)) != 1);
+ return 0;
}
/**/
@@ -3977,8 +4000,7 @@ cleanup_(Module m)
{
deletehookfunc("compctl_make", (Hookfn) ccmakehookfn);
deletehookfunc("compctl_cleanup", (Hookfn) cccleanuphookfn);
- deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
- return 0;
+ return setfeatureenables(m->nam, &module_features, NULL);
}
/**/