about summary refs log tree commit diff
path: root/Src/Modules/example.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-07-06 21:52:38 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-07-06 21:52:38 +0000
commit1b52f47cf285d5f3835bce7ad73f360bd327d4e8 (patch)
treeaf5f6637517084bc7914dacfc7fda0a5799f3220 /Src/Modules/example.c
parent018c9a2708808b83d5962786f759a931ab27511d (diff)
downloadzsh-1b52f47cf285d5f3835bce7ad73f360bd327d4e8.tar.gz
zsh-1b52f47cf285d5f3835bce7ad73f360bd327d4e8.tar.xz
zsh-1b52f47cf285d5f3835bce7ad73f360bd327d4e8.zip
23665: autoloading of module features and related tweaks
Diffstat (limited to 'Src/Modules/example.c')
-rw-r--r--Src/Modules/example.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Src/Modules/example.c b/Src/Modules/example.c
index 88e910814..fa86f260c 100644
--- a/Src/Modules/example.c
+++ b/Src/Modules/example.c
@@ -165,19 +165,19 @@ static struct builtin bintab[] = {
 };
 
 static struct conddef cotab[] = {
-    CONDDEF("len", 0, cond_p_len, 1, 2, 0),
     CONDDEF("ex", CONDF_INFIX, cond_i_ex, 0, 0, 0),
+    CONDDEF("len", 0, cond_p_len, 1, 2, 0),
 };
 
 static struct paramdef patab[] = {
+    ARRPARAMDEF("exarr", &arrparam),
     INTPARAMDEF("exint", &intparam),
     STRPARAMDEF("exstr", &strparam),
-    ARRPARAMDEF("exarr", &arrparam),
 };
 
 static struct mathfunc mftab[] = {
-    NUMMATHFUNC("sum", math_sum, 1, -1, 0),
     STRMATHFUNC("length", math_length, 0),
+    NUMMATHFUNC("sum", math_sum, 1, -1, 0),
 };
 
 static struct funcwrap wrapper[] = {
@@ -187,8 +187,8 @@ static struct funcwrap wrapper[] = {
 static struct features module_features = {
     bintab, sizeof(bintab)/sizeof(*bintab),
     cotab, sizeof(cotab)/sizeof(*cotab),
-    patab, sizeof(patab)/sizeof(*patab),
     mftab, sizeof(mftab)/sizeof(*mftab),
+    patab, sizeof(patab)/sizeof(*patab),
     0
 };
 
@@ -205,7 +205,7 @@ setup_(UNUSED(Module m))
 int
 features_(Module m, char ***features)
 {
-    *features = featuresarray(m->nam, &module_features);
+    *features = featuresarray(m, &module_features);
     return 0;
 }
 
@@ -213,7 +213,7 @@ features_(Module m, char ***features)
 int
 enables_(Module m, int **enables)
 {
-    return handlefeatures(m->nam, &module_features, enables);
+    return handlefeatures(m, &module_features, enables);
 }
 
 /**/
@@ -234,7 +234,7 @@ int
 cleanup_(Module m)
 {
     deletewrapper(m, wrapper);
-    return setfeatureenables(m->nam, &module_features, NULL);
+    return setfeatureenables(m, &module_features, NULL);
 }
 
 /**/