int
main (int argc, char *const *argv)
{
- static const struct GNUNET_GETOPT_CommandLineOption options[] = {
+ struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
return (GNUNET_OK ==
static int a_flag;
// ...
- static const struct GNUNET_GETOPT_CommandLineOption options[] = {
- {'s', "name", "SOMESTRING",
- gettext_noop ("text describing the string_option NAME"), 1,
- &GNUNET_GETOPT_set_string, &string_option},
- {'f', "flag", NULL,
- gettext_noop ("text describing the flag option"), 0,
- &GNUNET_GETOPT_set_one, &a_flag},
+ struct GNUNET_GETOPT_CommandLineOption options[] = {
+ GNUNET_GETOPT_option_string ('s', "name", "SOMESTRING",
+ gettext_noop ("text describing the string_option NAME"),
+ &string_option},
+ GNUNET_GETOPT_option_flag ('f', "flag",
+ gettext_noop ("text describing the flag option"),
+ &a_flag),
GNUNET_GETOPT_OPTION_END
};
string_option = NULL;