summaryrefslogtreecommitdiff
path: root/doc/examples/integration-commands/files/hello/hello.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/integration-commands/files/hello/hello.c')
-rw-r--r--doc/examples/integration-commands/files/hello/hello.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/examples/integration-commands/files/hello/hello.c b/doc/examples/integration-commands/files/hello/hello.c
new file mode 100644
index 000000000..83e762c29
--- /dev/null
+++ b/doc/examples/integration-commands/files/hello/hello.c
@@ -0,0 +1,20 @@
+/*
+ * 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
+ hello("stranger");
+
+ return 0;
+}