From 5a7cef0202631204485cbcb1e36671e4321a936f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 25 Mar 2017 21:25:44 +0100 Subject: rename GNUNET_GETOPT functions to achieve better consistency --- src/util/getopt_helpers.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/util/getopt_helpers.c') diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c index 76342a6c9..c3d0e4c7c 100644 --- a/src/util/getopt_helpers.c +++ b/src/util/getopt_helpers.c @@ -60,7 +60,7 @@ print_version (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param version string with the version number */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_VERSION (const char *version) +GNUNET_GETOPT_option_version (const char *version) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'v', @@ -191,7 +191,7 @@ OUTER: * @param about string with brief description of the application */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_HELP (const char *about) +GNUNET_GETOPT_option_help (const char *about) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'h', @@ -242,7 +242,7 @@ increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val increment by 1 each time the option is present */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, +GNUNET_GETOPT_option_increment_uint (char shortName, const char *name, const char *description, unsigned int *val) @@ -266,7 +266,7 @@ GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, * @param[out] level set to the verbosity level */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level) +GNUNET_GETOPT_option_verbose (unsigned int *level) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'V', @@ -318,7 +318,7 @@ set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to 1 if the option is present */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_ONE (char shortName, +GNUNET_GETOPT_option_flag (char shortName, const char *name, const char *description, int *val) @@ -374,7 +374,7 @@ set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] str set to the string */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_STRING (char shortName, +GNUNET_GETOPT_option_string (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -401,7 +401,7 @@ GNUNET_GETOPT_OPTION_STRING (char shortName, * @param[out] level set to the log level */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_LOGLEVEL (char **level) +GNUNET_GETOPT_option_loglevel (char **level) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'L', @@ -453,7 +453,7 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] str set to the string */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_FILENAME (char shortName, +GNUNET_GETOPT_option_filename (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -479,7 +479,7 @@ GNUNET_GETOPT_OPTION_FILENAME (char shortName, * @param[out] logfn set to the name of the logfile */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_LOGFILE (char **logfn) +GNUNET_GETOPT_option_logfile (char **logfn) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'l', @@ -501,7 +501,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn) * @param[out] fn set to the name of the configuration file */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_CFG_FILE (char **fn) +GNUNET_GETOPT_option_cfgfile (char **fn) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'c', @@ -561,7 +561,7 @@ set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to the value specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, +GNUNET_GETOPT_option_ulong (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -626,7 +626,7 @@ set_relative_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to the time specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, +GNUNET_GETOPT_option_relative_time (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -691,7 +691,7 @@ set_absolute_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to the time specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, +GNUNET_GETOPT_option_absolute_time (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -755,7 +755,7 @@ set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to the value specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_UINT (char shortName, +GNUNET_GETOPT_option_uint (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -830,7 +830,7 @@ set_base32 (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, /** * Helper function to clean up after - * #GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE. + * #GNUNET_GETOPT_option_base32_fixed_size. * * @param cls value to GNUNET_free() */ @@ -853,7 +853,7 @@ free_bc (void *cls) * @param val_size size of @a val in bytes */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, +GNUNET_GETOPT_option_base32_fixed_size (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -885,7 +885,7 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, * @return @a opt with the mandatory flag set. */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt) +GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt) { opt.option_mandatory = 1; return opt; -- cgit v1.2.3