From 3173fedfe4988d304bebf0e598384cab76fe94e9 Mon Sep 17 00:00:00 2001 From: tgoodwin Date: Wed, 8 Jul 1998 10:47:26 +0000 Subject: Initial revision --- addon.c | 22 ++++++++++++++++++++++ addon.h | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 addon.c create mode 100644 addon.h diff --git a/addon.c b/addon.c new file mode 100644 index 0000000..df3fcd7 --- /dev/null +++ b/addon.c @@ -0,0 +1,22 @@ +/* + This file contains the implementations of any locally defined + builtins. +*/ + +#ifdef DWS + +/* + This is what DaviD Sanderson (dws@cs.wisc.edu) uses. +*/ + +#include +#include +#include + +#include "rc.h" /* for bool TRUE, FALSE */ +#include "addon.h" + +#include "addon/access.c" +#include "addon/test.c" + +#endif 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 -- cgit v1.2.3