From b0c5f09169ac31855ebf0e93772bb57b9635b380 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 28 May 2007 22:57:39 +0000 Subject: see 23479: add initial features support for modules --- Src/Zle/complist.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'Src/Zle/complist.c') diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c index cedccc254..787b7b25c 100644 --- a/Src/Zle/complist.c +++ b/Src/Zle/complist.c @@ -3219,6 +3219,14 @@ menuselect(char **args) return 0; } +static struct features module_features = { + NULL, 0, + NULL, 0, + NULL, 0, + NULL, 0, + 0 +}; + /**/ int setup_(UNUSED(Module m)) @@ -3226,6 +3234,21 @@ setup_(UNUSED(Module m)) return 0; } +/**/ +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) @@ -3269,7 +3292,7 @@ boot_(Module m) /**/ int -cleanup_(UNUSED(Module m)) +cleanup_(Module m) { free(mtab); free(mgtab); @@ -3279,7 +3302,7 @@ cleanup_(UNUSED(Module m)) deletehookfunc("menu_start", (Hookfn) domenuselect); unlinkkeymap("menuselect", 1); unlinkkeymap("listscroll", 1); - return 0; + return setfeatureenables(m->nam, &module_features, NULL); } /**/ -- cgit 1.4.1