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/Modules/clone.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'Src/Modules/clone.c') diff --git a/Src/Modules/clone.c b/Src/Modules/clone.c index cc303d063..adab4cb59 100644 --- a/Src/Modules/clone.c +++ b/Src/Modules/clone.c @@ -109,6 +109,14 @@ static struct builtin bintab[] = { BUILTIN("clone", 0, bin_clone, 1, 1, 0, NULL, NULL), }; +static struct features module_features = { + bintab, sizeof(bintab)/sizeof(*bintab), + NULL, 0, + NULL, 0, + NULL, 0, + 0 +}; + /**/ int setup_(UNUSED(Module m)) @@ -118,19 +126,33 @@ setup_(UNUSED(Module m)) /**/ int -boot_(Module m) +features_(Module m, char ***features) { - return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab)); + *features = featuresarray(m->nam, &module_features); + return 0; } /**/ int -cleanup_(Module m) +enables_(Module m, int **enables) +{ + return handlefeatures(m->nam, &module_features, enables); +} + +/**/ +int +boot_(UNUSED(Module m)) { - deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab)); return 0; } +/**/ +int +cleanup_(Module m) +{ + return setfeatureenables(m->nam, &module_features, NULL); +} + /**/ int finish_(UNUSED(Module m)) -- cgit v1.2.3