GNUnet  0.10.x
Functions | Variables
gnunet-auction-info.c File Reference
#include "platform.h"
#include "gnunet_util_lib.h"
Include dependency graph for gnunet-auction-info.c:

Go to the source code of this file.

Functions

static void run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
 Main function that will be run by the scheduler. More...
 
int main (int argc, char *const *argv)
 The main function. More...
 

Variables

static int ret
 Final status code. More...
 

Function Documentation

◆ run()

static void run ( void *  cls,
char *const *  args,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle cfg 
)
static

Main function that will be run by the scheduler.

Parameters
clsclosure
argsremaining command-line arguments
cfgfilename of the configuration file used (for saving, can be NULL!)
cfgconfiguration

Definition at line 45 of file gnunet-auction-info.c.

Referenced by main().

49 {
50  /* main code here */
51 }
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *const *  argv 
)

The main function.

Parameters
argcnumber of arguments from the command line
argvcommand line arguments
Returns
0 ok, 1 on error

Definition at line 62 of file gnunet-auction-info.c.

References gettext_noop, GNUNET_free, GNUNET_GETOPT_OPTION_END, GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_STRINGS_get_utf8_args(), ret, and run().

63 {
64  static const struct GNUNET_GETOPT_CommandLineOption options[] = {
65  /* FIMXE: add options here */
67  };
68  if (GNUNET_OK !=
69  GNUNET_STRINGS_get_utf8_args (argc, argv,
70  &argc, &argv))
71  return 2;
72 
73  ret = (GNUNET_OK ==
74  GNUNET_PROGRAM_run (argc, argv,
75  "gnunet-auction",
76  gettext_noop ("help text"),
77  options,
78  &run,
79  NULL)) ? ret : 1;
80  GNUNET_free ((void*) argv);
81  return ret;
82 }
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
int GNUNET_STRINGS_get_utf8_args(int argc, char *const *argv, int *u8argc, char *const **u8argv)
Returns utf-8 encoded arguments.
Definition: strings.c:1521
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:78
Definition of a command line option.
static void run(void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Main function that will be run by the scheduler.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
static int ret
Final status code.
int 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, parse options).
Definition: program.c:361
#define GNUNET_free(ptr)
Wrapper around free.
#define gettext_noop(String)
Definition: gettext.h:69
Here is the call graph for this function:

Variable Documentation

◆ ret

int ret
static

Final status code.

Definition at line 33 of file gnunet-auction-info.c.

Referenced by main().