diff options
Diffstat (limited to 'src/util/getopt_helpers.c')
-rw-r--r-- | src/util/getopt_helpers.c | 34 |
1 files changed, 17 insertions, 17 deletions
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, | |||
60 | * @param version string with the version number | 60 | * @param version string with the version number |
61 | */ | 61 | */ |
62 | struct GNUNET_GETOPT_CommandLineOption | 62 | struct GNUNET_GETOPT_CommandLineOption |
63 | GNUNET_GETOPT_OPTION_VERSION (const char *version) | 63 | GNUNET_GETOPT_option_version (const char *version) |
64 | { | 64 | { |
65 | struct GNUNET_GETOPT_CommandLineOption clo = { | 65 | struct GNUNET_GETOPT_CommandLineOption clo = { |
66 | .shortName = 'v', | 66 | .shortName = 'v', |
@@ -191,7 +191,7 @@ OUTER: | |||
191 | * @param about string with brief description of the application | 191 | * @param about string with brief description of the application |
192 | */ | 192 | */ |
193 | struct GNUNET_GETOPT_CommandLineOption | 193 | struct GNUNET_GETOPT_CommandLineOption |
194 | GNUNET_GETOPT_OPTION_HELP (const char *about) | 194 | GNUNET_GETOPT_option_help (const char *about) |
195 | { | 195 | { |
196 | struct GNUNET_GETOPT_CommandLineOption clo = { | 196 | struct GNUNET_GETOPT_CommandLineOption clo = { |
197 | .shortName = 'h', | 197 | .shortName = 'h', |
@@ -242,7 +242,7 @@ increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
242 | * @param[out] val increment by 1 each time the option is present | 242 | * @param[out] val increment by 1 each time the option is present |
243 | */ | 243 | */ |
244 | struct GNUNET_GETOPT_CommandLineOption | 244 | struct GNUNET_GETOPT_CommandLineOption |
245 | GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, | 245 | GNUNET_GETOPT_option_increment_uint (char shortName, |
246 | const char *name, | 246 | const char *name, |
247 | const char *description, | 247 | const char *description, |
248 | unsigned int *val) | 248 | unsigned int *val) |
@@ -266,7 +266,7 @@ GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, | |||
266 | * @param[out] level set to the verbosity level | 266 | * @param[out] level set to the verbosity level |
267 | */ | 267 | */ |
268 | struct GNUNET_GETOPT_CommandLineOption | 268 | struct GNUNET_GETOPT_CommandLineOption |
269 | GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level) | 269 | GNUNET_GETOPT_option_verbose (unsigned int *level) |
270 | { | 270 | { |
271 | struct GNUNET_GETOPT_CommandLineOption clo = { | 271 | struct GNUNET_GETOPT_CommandLineOption clo = { |
272 | .shortName = 'V', | 272 | .shortName = 'V', |
@@ -318,7 +318,7 @@ set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
318 | * @param[out] val set to 1 if the option is present | 318 | * @param[out] val set to 1 if the option is present |
319 | */ | 319 | */ |
320 | struct GNUNET_GETOPT_CommandLineOption | 320 | struct GNUNET_GETOPT_CommandLineOption |
321 | GNUNET_GETOPT_OPTION_SET_ONE (char shortName, | 321 | GNUNET_GETOPT_option_flag (char shortName, |
322 | const char *name, | 322 | const char *name, |
323 | const char *description, | 323 | const char *description, |
324 | int *val) | 324 | int *val) |
@@ -374,7 +374,7 @@ set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
374 | * @param[out] str set to the string | 374 | * @param[out] str set to the string |
375 | */ | 375 | */ |
376 | struct GNUNET_GETOPT_CommandLineOption | 376 | struct GNUNET_GETOPT_CommandLineOption |
377 | GNUNET_GETOPT_OPTION_STRING (char shortName, | 377 | GNUNET_GETOPT_option_string (char shortName, |
378 | const char *name, | 378 | const char *name, |
379 | const char *argumentHelp, | 379 | const char *argumentHelp, |
380 | const char *description, | 380 | const char *description, |
@@ -401,7 +401,7 @@ GNUNET_GETOPT_OPTION_STRING (char shortName, | |||
401 | * @param[out] level set to the log level | 401 | * @param[out] level set to the log level |
402 | */ | 402 | */ |
403 | struct GNUNET_GETOPT_CommandLineOption | 403 | struct GNUNET_GETOPT_CommandLineOption |
404 | GNUNET_GETOPT_OPTION_LOGLEVEL (char **level) | 404 | GNUNET_GETOPT_option_loglevel (char **level) |
405 | { | 405 | { |
406 | struct GNUNET_GETOPT_CommandLineOption clo = { | 406 | struct GNUNET_GETOPT_CommandLineOption clo = { |
407 | .shortName = 'L', | 407 | .shortName = 'L', |
@@ -453,7 +453,7 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
453 | * @param[out] str set to the string | 453 | * @param[out] str set to the string |
454 | */ | 454 | */ |
455 | struct GNUNET_GETOPT_CommandLineOption | 455 | struct GNUNET_GETOPT_CommandLineOption |
456 | GNUNET_GETOPT_OPTION_FILENAME (char shortName, | 456 | GNUNET_GETOPT_option_filename (char shortName, |
457 | const char *name, | 457 | const char *name, |
458 | const char *argumentHelp, | 458 | const char *argumentHelp, |
459 | const char *description, | 459 | const char *description, |
@@ -479,7 +479,7 @@ GNUNET_GETOPT_OPTION_FILENAME (char shortName, | |||
479 | * @param[out] logfn set to the name of the logfile | 479 | * @param[out] logfn set to the name of the logfile |
480 | */ | 480 | */ |
481 | struct GNUNET_GETOPT_CommandLineOption | 481 | struct GNUNET_GETOPT_CommandLineOption |
482 | GNUNET_GETOPT_OPTION_LOGFILE (char **logfn) | 482 | GNUNET_GETOPT_option_logfile (char **logfn) |
483 | { | 483 | { |
484 | struct GNUNET_GETOPT_CommandLineOption clo = { | 484 | struct GNUNET_GETOPT_CommandLineOption clo = { |
485 | .shortName = 'l', | 485 | .shortName = 'l', |
@@ -501,7 +501,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn) | |||
501 | * @param[out] fn set to the name of the configuration file | 501 | * @param[out] fn set to the name of the configuration file |
502 | */ | 502 | */ |
503 | struct GNUNET_GETOPT_CommandLineOption | 503 | struct GNUNET_GETOPT_CommandLineOption |
504 | GNUNET_GETOPT_OPTION_CFG_FILE (char **fn) | 504 | GNUNET_GETOPT_option_cfgfile (char **fn) |
505 | { | 505 | { |
506 | struct GNUNET_GETOPT_CommandLineOption clo = { | 506 | struct GNUNET_GETOPT_CommandLineOption clo = { |
507 | .shortName = 'c', | 507 | .shortName = 'c', |
@@ -561,7 +561,7 @@ set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
561 | * @param[out] val set to the value specified at the command line | 561 | * @param[out] val set to the value specified at the command line |
562 | */ | 562 | */ |
563 | struct GNUNET_GETOPT_CommandLineOption | 563 | struct GNUNET_GETOPT_CommandLineOption |
564 | GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, | 564 | GNUNET_GETOPT_option_ulong (char shortName, |
565 | const char *name, | 565 | const char *name, |
566 | const char *argumentHelp, | 566 | const char *argumentHelp, |
567 | const char *description, | 567 | const char *description, |
@@ -626,7 +626,7 @@ set_relative_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
626 | * @param[out] val set to the time specified at the command line | 626 | * @param[out] val set to the time specified at the command line |
627 | */ | 627 | */ |
628 | struct GNUNET_GETOPT_CommandLineOption | 628 | struct GNUNET_GETOPT_CommandLineOption |
629 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, | 629 | GNUNET_GETOPT_option_relative_time (char shortName, |
630 | const char *name, | 630 | const char *name, |
631 | const char *argumentHelp, | 631 | const char *argumentHelp, |
632 | const char *description, | 632 | const char *description, |
@@ -691,7 +691,7 @@ set_absolute_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
691 | * @param[out] val set to the time specified at the command line | 691 | * @param[out] val set to the time specified at the command line |
692 | */ | 692 | */ |
693 | struct GNUNET_GETOPT_CommandLineOption | 693 | struct GNUNET_GETOPT_CommandLineOption |
694 | GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, | 694 | GNUNET_GETOPT_option_absolute_time (char shortName, |
695 | const char *name, | 695 | const char *name, |
696 | const char *argumentHelp, | 696 | const char *argumentHelp, |
697 | const char *description, | 697 | const char *description, |
@@ -755,7 +755,7 @@ set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
755 | * @param[out] val set to the value specified at the command line | 755 | * @param[out] val set to the value specified at the command line |
756 | */ | 756 | */ |
757 | struct GNUNET_GETOPT_CommandLineOption | 757 | struct GNUNET_GETOPT_CommandLineOption |
758 | GNUNET_GETOPT_OPTION_SET_UINT (char shortName, | 758 | GNUNET_GETOPT_option_uint (char shortName, |
759 | const char *name, | 759 | const char *name, |
760 | const char *argumentHelp, | 760 | const char *argumentHelp, |
761 | const char *description, | 761 | const char *description, |
@@ -830,7 +830,7 @@ set_base32 (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, | |||
830 | 830 | ||
831 | /** | 831 | /** |
832 | * Helper function to clean up after | 832 | * Helper function to clean up after |
833 | * #GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE. | 833 | * #GNUNET_GETOPT_option_base32_fixed_size. |
834 | * | 834 | * |
835 | * @param cls value to GNUNET_free() | 835 | * @param cls value to GNUNET_free() |
836 | */ | 836 | */ |
@@ -853,7 +853,7 @@ free_bc (void *cls) | |||
853 | * @param val_size size of @a val in bytes | 853 | * @param val_size size of @a val in bytes |
854 | */ | 854 | */ |
855 | struct GNUNET_GETOPT_CommandLineOption | 855 | struct GNUNET_GETOPT_CommandLineOption |
856 | GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, | 856 | GNUNET_GETOPT_option_base32_fixed_size (char shortName, |
857 | const char *name, | 857 | const char *name, |
858 | const char *argumentHelp, | 858 | const char *argumentHelp, |
859 | const char *description, | 859 | const char *description, |
@@ -885,7 +885,7 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, | |||
885 | * @return @a opt with the mandatory flag set. | 885 | * @return @a opt with the mandatory flag set. |
886 | */ | 886 | */ |
887 | struct GNUNET_GETOPT_CommandLineOption | 887 | struct GNUNET_GETOPT_CommandLineOption |
888 | GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt) | 888 | GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt) |
889 | { | 889 | { |
890 | opt.option_mandatory = 1; | 890 | opt.option_mandatory = 1; |
891 | return opt; | 891 | return opt; |