about summary refs log tree commit diff
path: root/Src/Zle/deltochar.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-05-28 22:57:39 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-05-28 22:57:39 +0000
commitb0c5f09169ac31855ebf0e93772bb57b9635b380 (patch)
tree410c43a9843b2c88166c2cb9acd531eaa36d036d /Src/Zle/deltochar.c
parentbd7632079045b1b6d0dee498c40833b409cf757e (diff)
downloadzsh-b0c5f09169ac31855ebf0e93772bb57b9635b380.tar.gz
zsh-b0c5f09169ac31855ebf0e93772bb57b9635b380.tar.xz
zsh-b0c5f09169ac31855ebf0e93772bb57b9635b380.zip
see 23479: add initial features support for modules
Diffstat (limited to 'Src/Zle/deltochar.c')
-rw-r--r--Src/Zle/deltochar.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/Src/Zle/deltochar.c b/Src/Zle/deltochar.c
index e7bfabfd3..0c64cf18d 100644
--- a/Src/Zle/deltochar.c
+++ b/Src/Zle/deltochar.c
@@ -74,6 +74,16 @@ deltochar(UNUSED(char **args))
     return !ok;
 }
 
+
+static struct features module_features = {
+    NULL, 0,
+    NULL, 0,
+    NULL, 0,
+    NULL, 0,
+    0
+};
+
+
 /**/
 int
 setup_(UNUSED(Module m))
@@ -83,6 +93,21 @@ 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)
 {
     w_deletetochar = addzlefunction("delete-to-char", deltochar,
@@ -100,11 +125,11 @@ boot_(Module m)
 
 /**/
 int
-cleanup_(UNUSED(Module m))
+cleanup_(Module m)
 {
     deletezlefunction(w_deletetochar);
     deletezlefunction(w_zaptochar);
-    return 0;
+    return setfeatureenables(m->nam, &module_features, NULL);
 }
 
 /**/