aboutsummaryrefslogtreecommitdiff
path: root/src/util/getopt_helpers.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-03-25 21:25:44 +0100
committerChristian Grothoff <christian@grothoff.org>2017-03-25 21:25:44 +0100
commit5a7cef0202631204485cbcb1e36671e4321a936f (patch)
treeff3d10ac71f9284f18be7c33939f3438071e15c4 /src/util/getopt_helpers.c
parent2ad934742422ecb63fe3fafdc8c73d067a9e2fb7 (diff)
downloadgnunet-5a7cef0202631204485cbcb1e36671e4321a936f.tar.gz
gnunet-5a7cef0202631204485cbcb1e36671e4321a936f.zip
rename GNUNET_GETOPT functions to achieve better consistency
Diffstat (limited to 'src/util/getopt_helpers.c')
-rw-r--r--src/util/getopt_helpers.c34
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 */
62struct GNUNET_GETOPT_CommandLineOption 62struct GNUNET_GETOPT_CommandLineOption
63GNUNET_GETOPT_OPTION_VERSION (const char *version) 63GNUNET_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 */
193struct GNUNET_GETOPT_CommandLineOption 193struct GNUNET_GETOPT_CommandLineOption
194GNUNET_GETOPT_OPTION_HELP (const char *about) 194GNUNET_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 */
244struct GNUNET_GETOPT_CommandLineOption 244struct GNUNET_GETOPT_CommandLineOption
245GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, 245GNUNET_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 */
268struct GNUNET_GETOPT_CommandLineOption 268struct GNUNET_GETOPT_CommandLineOption
269GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level) 269GNUNET_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 */
320struct GNUNET_GETOPT_CommandLineOption 320struct GNUNET_GETOPT_CommandLineOption
321GNUNET_GETOPT_OPTION_SET_ONE (char shortName, 321GNUNET_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 */
376struct GNUNET_GETOPT_CommandLineOption 376struct GNUNET_GETOPT_CommandLineOption
377GNUNET_GETOPT_OPTION_STRING (char shortName, 377GNUNET_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 */
403struct GNUNET_GETOPT_CommandLineOption 403struct GNUNET_GETOPT_CommandLineOption
404GNUNET_GETOPT_OPTION_LOGLEVEL (char **level) 404GNUNET_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 */
455struct GNUNET_GETOPT_CommandLineOption 455struct GNUNET_GETOPT_CommandLineOption
456GNUNET_GETOPT_OPTION_FILENAME (char shortName, 456GNUNET_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 */
481struct GNUNET_GETOPT_CommandLineOption 481struct GNUNET_GETOPT_CommandLineOption
482GNUNET_GETOPT_OPTION_LOGFILE (char **logfn) 482GNUNET_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 */
503struct GNUNET_GETOPT_CommandLineOption 503struct GNUNET_GETOPT_CommandLineOption
504GNUNET_GETOPT_OPTION_CFG_FILE (char **fn) 504GNUNET_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 */
563struct GNUNET_GETOPT_CommandLineOption 563struct GNUNET_GETOPT_CommandLineOption
564GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, 564GNUNET_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 */
628struct GNUNET_GETOPT_CommandLineOption 628struct GNUNET_GETOPT_CommandLineOption
629GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, 629GNUNET_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 */
693struct GNUNET_GETOPT_CommandLineOption 693struct GNUNET_GETOPT_CommandLineOption
694GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, 694GNUNET_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 */
757struct GNUNET_GETOPT_CommandLineOption 757struct GNUNET_GETOPT_CommandLineOption
758GNUNET_GETOPT_OPTION_SET_UINT (char shortName, 758GNUNET_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 */
855struct GNUNET_GETOPT_CommandLineOption 855struct GNUNET_GETOPT_CommandLineOption
856GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, 856GNUNET_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 */
887struct GNUNET_GETOPT_CommandLineOption 887struct GNUNET_GETOPT_CommandLineOption
888GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt) 888GNUNET_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;