diff options
Diffstat (limited to 'doc/documentation/tutorial-examples/001.c')
-rw-r--r-- | doc/documentation/tutorial-examples/001.c | 29 |
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 0000000000..7f6699dd22 --- /dev/null +++ b/doc/documentation/tutorial-examples/001.c @@ -0,0 +1,29 @@ +#include <gnunet/platform.h> +#include <gnunet/gnunet_util_lib.h> + +static int ret; + +static void +run (void *cls, + char *const *args, + const char *cfgfile, + const struct GNUNET_CONFIGURATION_Handle *cfg) +{ + // main code here + ret = 0; +} + +int +main (int argc, char *const *argv) +{ + struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_OPTION_END + }; + return (GNUNET_OK == + GNUNET_PROGRAM_run (argc, + argv, + "binary-name", + gettext_noop ("binary description text"), + options, &run, NULL)) ? ret : 1; +} + |