This file is part of GNUnet.
Copyright (C) 2012 GNUnet e.V.
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
GNUnet is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
+ Affero General Public License for more details.
*/
/**
* @param value value of the option
*/
static void
-print_option (void *cls, const char *section,
+print_option (void *cls,
+ const char *section,
const char *option,
const char *value)
{
+ (void) cls;
+ (void) section;
fprintf (stdout,
- "%s = %s\n", option, value);
+ "%s = %s\n",
+ option,
+ value);
}
print_section_name (void *cls,
const char *section)
{
- fprintf (stdout, "%s\n", section);
+ (void) cls;
+ fprintf (stdout,
+ "%s\n",
+ section);
}
struct GNUNET_CONFIGURATION_Handle *out = NULL;
struct GNUNET_CONFIGURATION_Handle *diff = NULL;
+ (void) cls;
+ (void) args;
if (rewrite)
{
struct GNUNET_CONFIGURATION_Handle *def;
* @return 0 ok, 1 on error
*/
int
-main (int argc, char *const *argv)
+main (int argc,
+ char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
- GNUNET_GETOPT_OPTION_SET_ONE ('f',
- "filename",
- gettext_noop ("obtain option of value as a filename (with $-expansion)"),
- &is_filename),
- GNUNET_GETOPT_OPTION_STRING ('s',
- "section",
- "SECTION",
- gettext_noop ("name of the section to access"),
- §ion),
- GNUNET_GETOPT_OPTION_STRING ('o',
- "option",
- "OPTION",
- gettext_noop ("name of the option to access"),
- &option),
- GNUNET_GETOPT_OPTION_STRING ('V',
- "value",
- "VALUE",
- gettext_noop ("value to set"),
- &value),
- GNUNET_GETOPT_OPTION_SET_ONE ('S',
- "list-sections",
- gettext_noop ("print available configuration sections"),
- &list_sections),
- GNUNET_GETOPT_OPTION_SET_ONE ('w',
- "rewrite",
- gettext_noop ("write configuration file that only contains delta to defaults"),
- &rewrite),
+ GNUNET_GETOPT_option_flag ('f',
+ "filename",
+ gettext_noop ("obtain option of value as a filename (with $-expansion)"),
+ &is_filename),
+ GNUNET_GETOPT_option_string ('s',
+ "section",
+ "SECTION",
+ gettext_noop ("name of the section to access"),
+ §ion),
+ GNUNET_GETOPT_option_string ('o',
+ "option",
+ "OPTION",
+ gettext_noop ("name of the option to access"),
+ &option),
+ GNUNET_GETOPT_option_string ('V',
+ "value",
+ "VALUE",
+ gettext_noop ("value to set"),
+ &value),
+ GNUNET_GETOPT_option_flag ('S',
+ "list-sections",
+ gettext_noop ("print available configuration sections"),
+ &list_sections),
+ GNUNET_GETOPT_option_flag ('w',
+ "rewrite",
+ gettext_noop ("write configuration file that only contains delta to defaults"),
+ &rewrite),
GNUNET_GETOPT_OPTION_END
};
if (GNUNET_OK !=