aboutsummaryrefslogtreecommitdiff
path: root/doc/documentation/tutorial-examples/001.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/documentation/tutorial-examples/001.c')
-rw-r--r--doc/documentation/tutorial-examples/001.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/documentation/tutorial-examples/001.c b/doc/documentation/tutorial-examples/001.c
new file mode 100644
index 000000000..7f6699dd2
--- /dev/null
+++ b/doc/documentation/tutorial-examples/001.c
@@ -0,0 +1,29 @@
1#include <gnunet/platform.h>
2#include <gnunet/gnunet_util_lib.h>
3
4static int ret;
5
6static void
7run (void *cls,
8 char *const *args,
9 const char *cfgfile,
10 const struct GNUNET_CONFIGURATION_Handle *cfg)
11{
12 // main code here
13 ret = 0;
14}
15
16int
17main (int argc, char *const *argv)
18{
19 struct GNUNET_GETOPT_CommandLineOption options[] = {
20 GNUNET_GETOPT_OPTION_END
21 };
22 return (GNUNET_OK ==
23 GNUNET_PROGRAM_run (argc,
24 argv,
25 "binary-name",
26 gettext_noop ("binary description text"),
27 options, &run, NULL)) ? ret : 1;
28}
29