Expand description
zsh/example module — port of Src/Modules/example.c.
Top-level declaration order matches C source line-by-line:
static zlong intparam;c:35static char *strparam;c:36static char **arrparam;c:37bin_example(nam, args, ops, func)c:42cond_p_len(a, id)c:80cond_i_ex(a, id)c:95math_sum(name, argc, argv, id)c:104math_length(name, arg, id)c:133ex_wrapper(prog, w, name)c:145static struct builtin bintab[]c:164static struct conddef cotab[]c:168static struct paramdef patab[]c:173static struct mathfunc mftab[]c:179static struct funcwrap wrapper[]c:184static struct features module_featuresc:188setup_(m)c:198features_(m, features)c:207enables_(m, enables)c:215boot_(m)c:222cleanup_(m)c:235finish_(m)c:243
Statics§
- arrparam
- Port of
static char **arrparam;fromSrc/Modules/example.c:37. Bound to theexarrarray paramdef at c:174.Nonemirrors C’s initial NULL. - intparam
- Port of
static zlong intparam;fromSrc/Modules/example.c:35. Bound to theexintinteger paramdef at c:175. - strparam
- Port of
static char *strparam;fromSrc/Modules/example.c:36. Bound to theexstrstring paramdef at c:176.Nonemirrors C’s initial NULL whichbin_exampleprints as the empty string at c:63.
Functions§
- bin_
example - Port of
bin_example(char *nam, char **args, Options ops, UNUSED(int func))fromSrc/Modules/example.c:42. - boot_
- Port of
boot_(UNUSED(Module m))fromSrc/Modules/example.c:222. C body sets the demo paramdef-bound statics then callsaddwrapper(m, wrapper). - cleanup_
- Port of
cleanup_(UNUSED(Module m))fromSrc/Modules/example.c:235. C body:deletewrapper(m, wrapper); return setfeatureenables(m, &module_features, NULL); - cond_
i_ ex - Port of
cond_i_ex(char **a, UNUSED(int id))fromSrc/Modules/example.c:95. - cond_
p_ len - Port of
cond_p_len(char **a, UNUSED(int id))fromSrc/Modules/example.c:80. - enables_
- Port of
enables_(UNUSED(Module m), UNUSED(int **enables))fromSrc/Modules/example.c:215. C body:return handlefeatures(m, &module_features, enables); - ex_
wrapper - Port of
ex_wrapper(Eprog prog, FuncWrap w, char *name)fromSrc/Modules/example.c:145. - features_
- Port of
features_(UNUSED(Module m), UNUSED(char ***features))fromSrc/Modules/example.c:207. C body:*features = featuresarray(m, &module_features); return 0; - finish_
- Port of
finish_(UNUSED(Module m))fromSrc/Modules/example.c:243. - math_
length - Port of
math_length(UNUSED(char *name), char *arg, UNUSED(int id))fromSrc/Modules/example.c:133. - math_
sum - Port of
math_sum(UNUSED(char *name), int argc, mnumber *argv, UNUSED(int id))fromSrc/Modules/example.c:104. - setup_
- Port of
setup_(UNUSED(Module m))fromSrc/Modules/example.c:198.