Imported from ../bash-2.0.tar.gz.
This commit is contained in:
parent
726f63884d
commit
ccc6cda312
502 changed files with 91988 additions and 69123 deletions
45
examples/loadables/truefalse.c
Normal file
45
examples/loadables/truefalse.c
Normal file
|
|
@ -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
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue