diff options
author | Pete Travis <immanetize@fedoraproject.org> | 2014-10-01 11:33:51 -0600 |
---|---|---|
committer | Pete Travis <immanetize@fedoraproject.org> | 2014-10-01 11:33:51 -0600 |
commit | 3f6c1435a4cbdf73a65639b05898a01c0dfc21ac (patch) | |
tree | c29f3db44b106fc8b145656cd0238341551b22c0 /scratch/bash-3.1-postpatch/examples/loadables/truefalse.c | |
parent | 46c50fce0354d81d347a8055314a688fc8aa9f52 (diff) | |
download | rpmbuild-3f6c1435a4cbdf73a65639b05898a01c0dfc21ac.tar.gz rpmbuild-3f6c1435a4cbdf73a65639b05898a01c0dfc21ac.tar.xz rpmbuild-3f6c1435a4cbdf73a65639b05898a01c0dfc21ac.zip |
we might need this sles10 stuff latersles10-bash
Diffstat (limited to 'scratch/bash-3.1-postpatch/examples/loadables/truefalse.c')
-rw-r--r-- | scratch/bash-3.1-postpatch/examples/loadables/truefalse.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/scratch/bash-3.1-postpatch/examples/loadables/truefalse.c b/scratch/bash-3.1-postpatch/examples/loadables/truefalse.c new file mode 100644 index 0000000..e77c74c --- /dev/null +++ b/scratch/bash-3.1-postpatch/examples/loadables/truefalse.c @@ -0,0 +1,45 @@ +/* true and false builtins */ + +#include "bashtypes.h" +#include "shell.h" +#include "builtins.h" + +true_builtin (list) + WORD_LIST *list; +{ + return EXECUTION_SUCCESS; +} + +false_builtin (list) + WORD_LIST *list; +{ + return EXECUTION_FAILURE; +} + +static char *true_doc[] = { + "Return a successful result.", + (char *)NULL +}; + +static char *false_doc[] = { + "Return an unsuccessful result.", + (char *)NULL +}; + +struct builtin true_struct = { + "true", + true_builtin, + BUILTIN_ENABLED, + true_doc, + "true", + 0 +}; + +struct builtin false_struct = { + "false", + false_builtin, + BUILTIN_ENABLED, + false_doc, + "false", + 0 +}; |