summaryrefslogtreecommitdiff
path: root/addon.h
diff options
context:
space:
mode:
authorByron Rakitzis <byron@archone.tamu.edu>1992-05-27 00:00:01 +0100
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:22:04 +0100
commit6bb38f6a01dbf4bbd584e038ceace0a00faa27bb (patch)
tree589705b2492ce4681760846d9ca45600f0af298d /addon.h
release: rc-1.4
Diffstat (limited to 'addon.h')
-rw-r--r--addon.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/addon.h b/addon.h
new file mode 100644
index 0000000..25f2312
--- /dev/null
+++ b/addon.h
@@ -0,0 +1,38 @@
+/*
+ This file is the interface to the rest of rc for any locally
+ defined addon builtins. By default there are none.
+ The interface consists of the following macro.
+
+ ADDONS A comma-separated list of pairs of function pointers
+ and string literals.
+
+ The addon functions must also have proper prototypes in this file.
+ The builtins all have the form:
+
+ void b_NAME(char **av);
+
+ Builtins report their exit status using set(TRUE) or set(FALSE).
+
+ Example:
+
+ #define ADDONS { b_test, "test" },
+ extern void b_test(char **av);
+*/
+
+#define ADDONS /* no addons by default */
+
+#ifdef DWS
+
+/*
+ This is what DaviD Sanderson (dws@cs.wisc.edu) uses.
+*/
+
+#undef ADDONS
+#define ADDONS { b_access, "access" },\
+ { b_test, "test" },\
+ { b_test, "[" },
+
+extern void b_access(char **av);
+extern void b_test(char **av);
+
+#endif