GNUnet 0.21.1
001.c
Go to the documentation of this file.
1#include "platform.h"
2#include <gnunet/platform.h>
3#include <gnunet/gnunet_util_lib.h>
4
5static int ret;
6
7static void
8run (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
17int
18main (int argc, char *const *argv)
19{
22 };
23 return (GNUNET_OK ==
25 argv,
26 "binary-name",
27 gettext_noop ("binary description text"),
28 options, &run, NULL)) ? ret : 1;
29}
30
static int ret
Definition: 001.c:5
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Definition: 001.c:8
int main(int argc, char *const *argv)
Definition: 001.c:18
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
#define gettext_noop(String)
Definition: gettext.h:70
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:109
@ GNUNET_OK
enum GNUNET_GenericReturnValue GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration,...
Definition: program.c:400
Definition of a command line option.