diff options
Diffstat (limited to 'doc/examples/filtering/files/hello/hello.c')
-rw-r--r-- | doc/examples/filtering/files/hello/hello.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/examples/filtering/files/hello/hello.c b/doc/examples/filtering/files/hello/hello.c new file mode 100644 index 000000000..338baf797 --- /dev/null +++ b/doc/examples/filtering/files/hello/hello.c @@ -0,0 +1,25 @@ +/* + * hello.c - Simple hello program + */ +#include <stdio.h> +#include <libhello.h> + +int main(int argc, char *argv[]) +{ + const char *person = NULL; + + if (argc > 1) + person = argv[1]; + + if (person) + hello(person); + else { +#ifdef DEFAULT_PERSON + hello(DEFAULT_PERSON); +#else + hello("stranger"); +#endif + } + + return 0; +} |