diff options
Diffstat (limited to 'Src/Modules/mathfunc.c')
-rw-r--r-- | Src/Modules/mathfunc.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/Src/Modules/mathfunc.c b/Src/Modules/mathfunc.c index f6d437ff9..a473476e3 100644 --- a/Src/Modules/mathfunc.c +++ b/Src/Modules/mathfunc.c @@ -561,6 +561,14 @@ math_string(UNUSED(char *name), char *arg, int id) } +static struct features module_features = { + NULL, 0, + NULL, 0, + NULL, 0, + mftab, sizeof(mftab)/sizeof(*mftab), + 0 +}; + /**/ int setup_(UNUSED(Module m)) @@ -570,17 +578,31 @@ 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) { - return !addmathfuncs(m->nam, mftab, sizeof(mftab)/sizeof(*mftab)); + return 0; } /**/ int cleanup_(Module m) { - deletemathfuncs(m->nam, mftab, sizeof(mftab)/sizeof(*mftab)); - return 0; + return setfeatureenables(m->nam, &module_features, NULL); } /**/ |