diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/getopt_helpers.c | 34 | ||||
-rw-r--r-- | src/util/gnunet-config.c | 12 | ||||
-rw-r--r-- | src/util/gnunet-ecc.c | 10 | ||||
-rw-r--r-- | src/util/gnunet-resolver.c | 2 | ||||
-rw-r--r-- | src/util/gnunet-scrypt.c | 8 | ||||
-rw-r--r-- | src/util/program.c | 10 | ||||
-rw-r--r-- | src/util/service.c | 12 | ||||
-rw-r--r-- | src/util/test_getopt.c | 16 | ||||
-rw-r--r-- | src/util/test_program.c | 14 |
9 files changed, 59 insertions, 59 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; |
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c index 2beb772a9..fb3b9ebf9 100644 --- a/src/util/gnunet-config.c +++ b/src/util/gnunet-config.c | |||
@@ -224,30 +224,30 @@ int | |||
224 | main (int argc, char *const *argv) | 224 | main (int argc, char *const *argv) |
225 | { | 225 | { |
226 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 226 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
227 | GNUNET_GETOPT_OPTION_SET_ONE ('f', | 227 | GNUNET_GETOPT_option_flag ('f', |
228 | "filename", | 228 | "filename", |
229 | gettext_noop ("obtain option of value as a filename (with $-expansion)"), | 229 | gettext_noop ("obtain option of value as a filename (with $-expansion)"), |
230 | &is_filename), | 230 | &is_filename), |
231 | GNUNET_GETOPT_OPTION_STRING ('s', | 231 | GNUNET_GETOPT_option_string ('s', |
232 | "section", | 232 | "section", |
233 | "SECTION", | 233 | "SECTION", |
234 | gettext_noop ("name of the section to access"), | 234 | gettext_noop ("name of the section to access"), |
235 | §ion), | 235 | §ion), |
236 | GNUNET_GETOPT_OPTION_STRING ('o', | 236 | GNUNET_GETOPT_option_string ('o', |
237 | "option", | 237 | "option", |
238 | "OPTION", | 238 | "OPTION", |
239 | gettext_noop ("name of the option to access"), | 239 | gettext_noop ("name of the option to access"), |
240 | &option), | 240 | &option), |
241 | GNUNET_GETOPT_OPTION_STRING ('V', | 241 | GNUNET_GETOPT_option_string ('V', |
242 | "value", | 242 | "value", |
243 | "VALUE", | 243 | "VALUE", |
244 | gettext_noop ("value to set"), | 244 | gettext_noop ("value to set"), |
245 | &value), | 245 | &value), |
246 | GNUNET_GETOPT_OPTION_SET_ONE ('S', | 246 | GNUNET_GETOPT_option_flag ('S', |
247 | "list-sections", | 247 | "list-sections", |
248 | gettext_noop ("print available configuration sections"), | 248 | gettext_noop ("print available configuration sections"), |
249 | &list_sections), | 249 | &list_sections), |
250 | GNUNET_GETOPT_OPTION_SET_ONE ('w', | 250 | GNUNET_GETOPT_option_flag ('w', |
251 | "rewrite", | 251 | "rewrite", |
252 | gettext_noop ("write configuration file that only contains delta to defaults"), | 252 | gettext_noop ("write configuration file that only contains delta to defaults"), |
253 | &rewrite), | 253 | &rewrite), |
diff --git a/src/util/gnunet-ecc.c b/src/util/gnunet-ecc.c index 732228b52..2a712f4eb 100644 --- a/src/util/gnunet-ecc.c +++ b/src/util/gnunet-ecc.c | |||
@@ -411,25 +411,25 @@ main (int argc, | |||
411 | { | 411 | { |
412 | list_keys_count = UINT32_MAX; | 412 | list_keys_count = UINT32_MAX; |
413 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 413 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
414 | GNUNET_GETOPT_OPTION_SET_ONE ('i', | 414 | GNUNET_GETOPT_option_flag ('i', |
415 | "iterate", | 415 | "iterate", |
416 | gettext_noop ("list keys included in a file (for testing)"), | 416 | gettext_noop ("list keys included in a file (for testing)"), |
417 | &list_keys), | 417 | &list_keys), |
418 | GNUNET_GETOPT_OPTION_SET_UINT ('e', | 418 | GNUNET_GETOPT_option_uint ('e', |
419 | "end=", | 419 | "end=", |
420 | "COUNT", | 420 | "COUNT", |
421 | gettext_noop ("number of keys to list included in a file (for testing)"), | 421 | gettext_noop ("number of keys to list included in a file (for testing)"), |
422 | &list_keys_count), | 422 | &list_keys_count), |
423 | GNUNET_GETOPT_OPTION_SET_UINT ('g', | 423 | GNUNET_GETOPT_option_uint ('g', |
424 | "generate-keys", | 424 | "generate-keys", |
425 | "COUNT", | 425 | "COUNT", |
426 | gettext_noop ("create COUNT public-private key pairs (for testing)"), | 426 | gettext_noop ("create COUNT public-private key pairs (for testing)"), |
427 | &make_keys), | 427 | &make_keys), |
428 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | 428 | GNUNET_GETOPT_option_flag ('p', |
429 | "print-public-key", | 429 | "print-public-key", |
430 | gettext_noop ("print the public key in ASCII format"), | 430 | gettext_noop ("print the public key in ASCII format"), |
431 | &print_public_key), | 431 | &print_public_key), |
432 | GNUNET_GETOPT_OPTION_SET_ONE ('E', | 432 | GNUNET_GETOPT_option_flag ('E', |
433 | "examples", | 433 | "examples", |
434 | gettext_noop ("print examples of ECC operations (used for compatibility testing)"), | 434 | gettext_noop ("print examples of ECC operations (used for compatibility testing)"), |
435 | &print_examples_flag), | 435 | &print_examples_flag), |
diff --git a/src/util/gnunet-resolver.c b/src/util/gnunet-resolver.c index 563cf9fce..7ffafee32 100644 --- a/src/util/gnunet-resolver.c +++ b/src/util/gnunet-resolver.c | |||
@@ -145,7 +145,7 @@ int | |||
145 | main (int argc, char *const *argv) | 145 | main (int argc, char *const *argv) |
146 | { | 146 | { |
147 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 147 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
148 | GNUNET_GETOPT_OPTION_SET_ONE ('r', | 148 | GNUNET_GETOPT_option_flag ('r', |
149 | "reverse", | 149 | "reverse", |
150 | gettext_noop ("perform a reverse lookup"), | 150 | gettext_noop ("perform a reverse lookup"), |
151 | &reverse), | 151 | &reverse), |
diff --git a/src/util/gnunet-scrypt.c b/src/util/gnunet-scrypt.c index 7c73cfe1e..3b3b7d695 100644 --- a/src/util/gnunet-scrypt.c +++ b/src/util/gnunet-scrypt.c | |||
@@ -311,22 +311,22 @@ main (int argc, | |||
311 | char *const *argv) | 311 | char *const *argv) |
312 | { | 312 | { |
313 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 313 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
314 | GNUNET_GETOPT_OPTION_SET_ULONG ('b', | 314 | GNUNET_GETOPT_option_ulong ('b', |
315 | "bits", | 315 | "bits", |
316 | "BITS", | 316 | "BITS", |
317 | gettext_noop ("number of bits to require for the proof of work"), | 317 | gettext_noop ("number of bits to require for the proof of work"), |
318 | &nse_work_required), | 318 | &nse_work_required), |
319 | GNUNET_GETOPT_OPTION_FILENAME ('k', | 319 | GNUNET_GETOPT_option_filename ('k', |
320 | "keyfile", | 320 | "keyfile", |
321 | "FILE", | 321 | "FILE", |
322 | gettext_noop ("file with private key, otherwise default is used"), | 322 | gettext_noop ("file with private key, otherwise default is used"), |
323 | &pkfn), | 323 | &pkfn), |
324 | GNUNET_GETOPT_OPTION_FILENAME ('o', | 324 | GNUNET_GETOPT_option_filename ('o', |
325 | "outfile", | 325 | "outfile", |
326 | "FILE", | 326 | "FILE", |
327 | gettext_noop ("file with proof of work, otherwise default is used"), | 327 | gettext_noop ("file with proof of work, otherwise default is used"), |
328 | &pwfn), | 328 | &pwfn), |
329 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', | 329 | GNUNET_GETOPT_option_relative_time ('t', |
330 | "timeout", | 330 | "timeout", |
331 | "TIME", | 331 | "TIME", |
332 | gettext_noop ("time to wait between calculations"), | 332 | gettext_noop ("time to wait between calculations"), |
diff --git a/src/util/program.c b/src/util/program.c index e2b356f88..92a9750f3 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -148,11 +148,11 @@ GNUNET_PROGRAM_run2 (int argc, char *const *argv, const char *binaryName, | |||
148 | struct GNUNET_CONFIGURATION_Handle *cfg; | 148 | struct GNUNET_CONFIGURATION_Handle *cfg; |
149 | 149 | ||
150 | struct GNUNET_GETOPT_CommandLineOption defoptions[] = { | 150 | struct GNUNET_GETOPT_CommandLineOption defoptions[] = { |
151 | GNUNET_GETOPT_OPTION_CFG_FILE (&cc.cfgfile), | 151 | GNUNET_GETOPT_option_cfgfile (&cc.cfgfile), |
152 | GNUNET_GETOPT_OPTION_HELP (binaryHelp), | 152 | GNUNET_GETOPT_option_help (binaryHelp), |
153 | GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev), | 153 | GNUNET_GETOPT_option_loglevel (&loglev), |
154 | GNUNET_GETOPT_OPTION_LOGFILE (&logfile), | 154 | GNUNET_GETOPT_option_logfile (&logfile), |
155 | GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION) | 155 | GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION) |
156 | }; | 156 | }; |
157 | struct GNUNET_GETOPT_CommandLineOption *allopts; | 157 | struct GNUNET_GETOPT_CommandLineOption *allopts; |
158 | const char *gargs; | 158 | const char *gargs; |
diff --git a/src/util/service.c b/src/util/service.c index 800d09a42..f63737e56 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -1722,15 +1722,15 @@ GNUNET_SERVICE_run_ (int argc, | |||
1722 | int err; | 1722 | int err; |
1723 | 1723 | ||
1724 | struct GNUNET_GETOPT_CommandLineOption service_options[] = { | 1724 | struct GNUNET_GETOPT_CommandLineOption service_options[] = { |
1725 | GNUNET_GETOPT_OPTION_CFG_FILE (&opt_cfg_filename), | 1725 | GNUNET_GETOPT_option_cfgfile (&opt_cfg_filename), |
1726 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 1726 | GNUNET_GETOPT_option_flag ('d', |
1727 | "daemonize", | 1727 | "daemonize", |
1728 | gettext_noop ("do daemonize (detach from terminal)"), | 1728 | gettext_noop ("do daemonize (detach from terminal)"), |
1729 | &do_daemonize), | 1729 | &do_daemonize), |
1730 | GNUNET_GETOPT_OPTION_HELP (NULL), | 1730 | GNUNET_GETOPT_option_help (NULL), |
1731 | GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev), | 1731 | GNUNET_GETOPT_option_loglevel (&loglev), |
1732 | GNUNET_GETOPT_OPTION_LOGFILE (&logfile), | 1732 | GNUNET_GETOPT_option_logfile (&logfile), |
1733 | GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION), | 1733 | GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION), |
1734 | GNUNET_GETOPT_OPTION_END | 1734 | GNUNET_GETOPT_OPTION_END |
1735 | }; | 1735 | }; |
1736 | 1736 | ||
diff --git a/src/util/test_getopt.c b/src/util/test_getopt.c index 13cedd7f5..16f2df8d1 100644 --- a/src/util/test_getopt.c +++ b/src/util/test_getopt.c | |||
@@ -56,7 +56,7 @@ testVerbose () | |||
56 | unsigned int vflags = 0; | 56 | unsigned int vflags = 0; |
57 | 57 | ||
58 | const struct GNUNET_GETOPT_CommandLineOption verboseoptionlist[] = { | 58 | const struct GNUNET_GETOPT_CommandLineOption verboseoptionlist[] = { |
59 | GNUNET_GETOPT_OPTION_VERBOSE (&vflags), | 59 | GNUNET_GETOPT_option_verbose (&vflags), |
60 | GNUNET_GETOPT_OPTION_END | 60 | GNUNET_GETOPT_OPTION_END |
61 | }; | 61 | }; |
62 | 62 | ||
@@ -83,7 +83,7 @@ testVersion () | |||
83 | NULL | 83 | NULL |
84 | }; | 84 | }; |
85 | const struct GNUNET_GETOPT_CommandLineOption versionoptionlist[] = { | 85 | const struct GNUNET_GETOPT_CommandLineOption versionoptionlist[] = { |
86 | GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION), | 86 | GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION), |
87 | GNUNET_GETOPT_OPTION_END | 87 | GNUNET_GETOPT_OPTION_END |
88 | }; | 88 | }; |
89 | 89 | ||
@@ -105,7 +105,7 @@ testAbout () | |||
105 | NULL | 105 | NULL |
106 | }; | 106 | }; |
107 | const struct GNUNET_GETOPT_CommandLineOption aboutoptionlist[] = { | 107 | const struct GNUNET_GETOPT_CommandLineOption aboutoptionlist[] = { |
108 | GNUNET_GETOPT_OPTION_HELP ("Testing"), | 108 | GNUNET_GETOPT_option_help ("Testing"), |
109 | GNUNET_GETOPT_OPTION_END | 109 | GNUNET_GETOPT_OPTION_END |
110 | }; | 110 | }; |
111 | 111 | ||
@@ -131,8 +131,8 @@ testLogOpts () | |||
131 | char *fn = NULL; | 131 | char *fn = NULL; |
132 | 132 | ||
133 | const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = { | 133 | const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = { |
134 | GNUNET_GETOPT_OPTION_LOGFILE (&fn), | 134 | GNUNET_GETOPT_option_logfile (&fn), |
135 | GNUNET_GETOPT_OPTION_LOGLEVEL (&level), | 135 | GNUNET_GETOPT_option_loglevel (&level), |
136 | GNUNET_GETOPT_OPTION_END | 136 | GNUNET_GETOPT_OPTION_END |
137 | }; | 137 | }; |
138 | 138 | ||
@@ -173,16 +173,16 @@ testFlagNum () | |||
173 | unsigned long long lnum = 0; | 173 | unsigned long long lnum = 0; |
174 | 174 | ||
175 | const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = { | 175 | const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = { |
176 | GNUNET_GETOPT_OPTION_SET_ONE ('f', | 176 | GNUNET_GETOPT_option_flag ('f', |
177 | "--flag", | 177 | "--flag", |
178 | "helptext", | 178 | "helptext", |
179 | &flag), | 179 | &flag), |
180 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | 180 | GNUNET_GETOPT_option_uint ('n', |
181 | "--num", | 181 | "--num", |
182 | "ARG", | 182 | "ARG", |
183 | "helptext", | 183 | "helptext", |
184 | &num), | 184 | &num), |
185 | GNUNET_GETOPT_OPTION_SET_ULONG ('N', | 185 | GNUNET_GETOPT_option_ulong ('N', |
186 | "--lnum", | 186 | "--lnum", |
187 | "ARG", | 187 | "ARG", |
188 | "helptext", | 188 | "helptext", |
diff --git a/src/util/test_program.c b/src/util/test_program.c index d206952af..6d51b1872 100644 --- a/src/util/test_program.c +++ b/src/util/test_program.c | |||
@@ -64,40 +64,40 @@ main (int argc, char *argv[]) | |||
64 | NULL | 64 | NULL |
65 | }; | 65 | }; |
66 | struct GNUNET_GETOPT_CommandLineOption options1[] = { | 66 | struct GNUNET_GETOPT_CommandLineOption options1[] = { |
67 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 67 | GNUNET_GETOPT_option_flag ('n', |
68 | "name", | 68 | "name", |
69 | "description", | 69 | "description", |
70 | &setme1), | 70 | &setme1), |
71 | GNUNET_GETOPT_OPTION_END | 71 | GNUNET_GETOPT_OPTION_END |
72 | }; | 72 | }; |
73 | struct GNUNET_GETOPT_CommandLineOption options2[] = { | 73 | struct GNUNET_GETOPT_CommandLineOption options2[] = { |
74 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 74 | GNUNET_GETOPT_option_flag ('n', |
75 | "name", | 75 | "name", |
76 | "description", | 76 | "description", |
77 | &setme1), | 77 | &setme1), |
78 | GNUNET_GETOPT_OPTION_SET_ONE ('N', | 78 | GNUNET_GETOPT_option_flag ('N', |
79 | "number", | 79 | "number", |
80 | "description", | 80 | "description", |
81 | &setme2), | 81 | &setme2), |
82 | GNUNET_GETOPT_OPTION_END | 82 | GNUNET_GETOPT_OPTION_END |
83 | }; | 83 | }; |
84 | struct GNUNET_GETOPT_CommandLineOption options3[] = { | 84 | struct GNUNET_GETOPT_CommandLineOption options3[] = { |
85 | GNUNET_GETOPT_OPTION_SET_ONE ('N', | 85 | GNUNET_GETOPT_option_flag ('N', |
86 | "number", | 86 | "number", |
87 | "description", | 87 | "description", |
88 | &setme1), | 88 | &setme1), |
89 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 89 | GNUNET_GETOPT_option_flag ('n', |
90 | "name", | 90 | "name", |
91 | "description", | 91 | "description", |
92 | &setme2), | 92 | &setme2), |
93 | GNUNET_GETOPT_OPTION_END | 93 | GNUNET_GETOPT_OPTION_END |
94 | }; | 94 | }; |
95 | struct GNUNET_GETOPT_CommandLineOption options4[] = { | 95 | struct GNUNET_GETOPT_CommandLineOption options4[] = { |
96 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 96 | GNUNET_GETOPT_option_flag ('n', |
97 | "name", | 97 | "name", |
98 | "description", | 98 | "description", |
99 | &setme1), | 99 | &setme1), |
100 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 100 | GNUNET_GETOPT_option_flag ('n', |
101 | "name", | 101 | "name", |
102 | "description", | 102 | "description", |
103 | &setme2), | 103 | &setme2), |