diff options
author | Jari Aalto <jari.aalto@cante.net> | 1999-02-19 17:11:39 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:52 +0000 |
commit | b72432fdcc59300c6fe7c9d6c8a31ad3447933f5 (patch) | |
tree | b9899162338c2ff3fd83a8aef8831cb119e85cd7 /examples/loadables/hello.c | |
parent | bc4cd23ce958feda898c618215f94d8a4e8f4ffa (diff) | |
download | android_external_bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.tar.gz android_external_bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.tar.bz2 android_external_bash-b72432fdcc59300c6fe7c9d6c8a31ad3447933f5.zip |
Imported from ../bash-2.03.tar.gz.
Diffstat (limited to 'examples/loadables/hello.c')
-rw-r--r-- | examples/loadables/hello.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/loadables/hello.c b/examples/loadables/hello.c index 3f371e5..f4b4a8e 100644 --- a/examples/loadables/hello.c +++ b/examples/loadables/hello.c @@ -3,19 +3,21 @@ /* See Makefile for compilation details. */ -#include "config.h" +#include <config.h> #if defined (HAVE_UNISTD_H) # include <unistd.h> #endif #include <stdio.h> + #include "builtins.h" #include "shell.h" +#include "bashgetopt.h" /* A builtin `xxx' is normally implemented with an `xxx_builtin' function. If you're converting a command that uses the normal Unix argc/argv - calling convention, use argv = word_list_to_argv (list, &argc) and call + calling convention, use argv = make_builtin_argv (list, &argc) and call the original `main' something like `xxx_main'. Look at cat.c for an example. @@ -41,7 +43,6 @@ hello_builtin (list) which is printed by `help xxx'. It must end with a NULL. */ char *hello_doc[] = { "this is the long doc for the sample hello builtin", - "which is a bare-bones echo", (char *)NULL }; @@ -53,7 +54,7 @@ struct builtin hello_struct = { hello_builtin, /* function implementing the builtin */ BUILTIN_ENABLED, /* initial flags for builtin */ hello_doc, /* array of long documentation strings. */ - "hello [args]", /* usage synopsis; becomes short_doc */ + "hello", /* usage synopsis; becomes short_doc */ 0 /* reserved for internal use */ }; |