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