GNUnet
0.22.2
002.c
Go to the documentation of this file.
1
static
char
*
string_option
;
2
static
int
a_flag
;
3
4
// ...
5
struct
GNUNET_GETOPT_CommandLineOption
options
[] = {
6
GNUNET_GETOPT_option_string
(
's'
,
"name"
,
"SOMESTRING"
,
7
gettext_noop
(
"text describing the string_option NAME"
),
8
&
string_option
},
9
GNUNET_GETOPT_option_flag
(
'f'
,
"flag"
,
10
gettext_noop
(
"text describing the flag option"
),
11
&
a_flag
),
12
GNUNET_GETOPT_OPTION_END
13
};
14
string_option
= NULL;
15
a_flag
=
GNUNET_SYSERR
;
16
// ...
17
string_option
static char * string_option
Definition:
002.c:1
a_flag
static int a_flag
Definition:
002.c:2
GNUNET_GETOPT_OPTION_END
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition:
002.c:13
GNUNET_GETOPT_option_flag
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag('f', "flag", gettext_noop("text describing the flag option"), &a_flag)
options
struct GNUNET_GETOPT_CommandLineOption options[]
Definition:
002.c:5
gettext_noop
#define gettext_noop(String)
Definition:
gettext.h:74
GNUNET_GETOPT_option_string
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_string(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a string.
Definition:
getopt_helpers.c:362
GNUNET_SYSERR
@ GNUNET_SYSERR
Definition:
gnunet_common.h:109
GNUNET_GETOPT_CommandLineOption
Definition of a command line option.
Definition:
gnunet_getopt_lib.h:110
doc
old
tutorial
examples
002.c
Generated by
1.9.4