|
Last change
on this file since 3280 was 3231, checked in by bird, 19 years ago |
|
eol style.
|
-
Property svn:eol-style
set to
native
|
|
File size:
611 bytes
|
| Line | |
|---|
| 1 | /* true and false builtins */
|
|---|
| 2 |
|
|---|
| 3 | #include "bashtypes.h"
|
|---|
| 4 | #include "shell.h"
|
|---|
| 5 | #include "builtins.h"
|
|---|
| 6 |
|
|---|
| 7 | true_builtin (list)
|
|---|
| 8 | WORD_LIST *list;
|
|---|
| 9 | {
|
|---|
| 10 | return EXECUTION_SUCCESS;
|
|---|
| 11 | }
|
|---|
| 12 |
|
|---|
| 13 | false_builtin (list)
|
|---|
| 14 | WORD_LIST *list;
|
|---|
| 15 | {
|
|---|
| 16 | return EXECUTION_FAILURE;
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | static char *true_doc[] = {
|
|---|
| 20 | "Return a successful result.",
|
|---|
| 21 | (char *)NULL
|
|---|
| 22 | };
|
|---|
| 23 |
|
|---|
| 24 | static char *false_doc[] = {
|
|---|
| 25 | "Return an unsuccessful result.",
|
|---|
| 26 | (char *)NULL
|
|---|
| 27 | };
|
|---|
| 28 |
|
|---|
| 29 | struct builtin true_struct = {
|
|---|
| 30 | "true",
|
|---|
| 31 | true_builtin,
|
|---|
| 32 | BUILTIN_ENABLED,
|
|---|
| 33 | true_doc,
|
|---|
| 34 | "true",
|
|---|
| 35 | 0
|
|---|
| 36 | };
|
|---|
| 37 |
|
|---|
| 38 | struct builtin false_struct = {
|
|---|
| 39 | "false",
|
|---|
| 40 | false_builtin,
|
|---|
| 41 | BUILTIN_ENABLED,
|
|---|
| 42 | false_doc,
|
|---|
| 43 | "false",
|
|---|
| 44 | 0
|
|---|
| 45 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.