diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-25 21:25:44 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-25 21:25:44 +0100 |
commit | 5a7cef0202631204485cbcb1e36671e4321a936f (patch) | |
tree | ff3d10ac71f9284f18be7c33939f3438071e15c4 /src | |
parent | 2ad934742422ecb63fe3fafdc8c73d067a9e2fb7 (diff) | |
download | gnunet-5a7cef0202631204485cbcb1e36671e4321a936f.tar.gz gnunet-5a7cef0202631204485cbcb1e36671e4321a936f.zip |
rename GNUNET_GETOPT functions to achieve better consistency
Diffstat (limited to 'src')
68 files changed, 404 insertions, 404 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index 78c78738a..4c30985b1 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -764,64 +764,64 @@ main (int argc, char *const *argv) | |||
764 | { | 764 | { |
765 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 765 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
766 | 766 | ||
767 | GNUNET_GETOPT_OPTION_SET_ONE ('e', | 767 | GNUNET_GETOPT_option_flag ('e', |
768 | "end", | 768 | "end", |
769 | gettext_noop ("stop all GNUnet services"), | 769 | gettext_noop ("stop all GNUnet services"), |
770 | &end), | 770 | &end), |
771 | 771 | ||
772 | GNUNET_GETOPT_OPTION_STRING ('i', | 772 | GNUNET_GETOPT_option_string ('i', |
773 | "init", | 773 | "init", |
774 | "SERVICE", | 774 | "SERVICE", |
775 | gettext_noop ("start a particular service"), | 775 | gettext_noop ("start a particular service"), |
776 | &init), | 776 | &init), |
777 | 777 | ||
778 | GNUNET_GETOPT_OPTION_STRING ('k', | 778 | GNUNET_GETOPT_option_string ('k', |
779 | "kill", | 779 | "kill", |
780 | "SERVICE", | 780 | "SERVICE", |
781 | gettext_noop ("stop a particular service"), | 781 | gettext_noop ("stop a particular service"), |
782 | &term), | 782 | &term), |
783 | 783 | ||
784 | GNUNET_GETOPT_OPTION_SET_ONE ('s', | 784 | GNUNET_GETOPT_option_flag ('s', |
785 | "start", | 785 | "start", |
786 | gettext_noop ("start all GNUnet default services"), | 786 | gettext_noop ("start all GNUnet default services"), |
787 | &start), | 787 | &start), |
788 | 788 | ||
789 | GNUNET_GETOPT_OPTION_SET_ONE ('r', | 789 | GNUNET_GETOPT_option_flag ('r', |
790 | "restart", | 790 | "restart", |
791 | gettext_noop ("stop and start all GNUnet default services"), | 791 | gettext_noop ("stop and start all GNUnet default services"), |
792 | &restart), | 792 | &restart), |
793 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 793 | GNUNET_GETOPT_option_flag ('d', |
794 | "delete", | 794 | "delete", |
795 | gettext_noop ("delete config file and directory on exit"), | 795 | gettext_noop ("delete config file and directory on exit"), |
796 | &delete), | 796 | &delete), |
797 | 797 | ||
798 | GNUNET_GETOPT_OPTION_SET_ONE ('m', | 798 | GNUNET_GETOPT_option_flag ('m', |
799 | "monitor", | 799 | "monitor", |
800 | gettext_noop ("monitor ARM activities"), | 800 | gettext_noop ("monitor ARM activities"), |
801 | &monitor), | 801 | &monitor), |
802 | 802 | ||
803 | GNUNET_GETOPT_OPTION_SET_ONE ('q', | 803 | GNUNET_GETOPT_option_flag ('q', |
804 | "quiet", | 804 | "quiet", |
805 | gettext_noop ("don't print status messages"), | 805 | gettext_noop ("don't print status messages"), |
806 | &quiet), | 806 | &quiet), |
807 | 807 | ||
808 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', | 808 | GNUNET_GETOPT_option_relative_time ('T', |
809 | "timeout", | 809 | "timeout", |
810 | "DELAY", | 810 | "DELAY", |
811 | gettext_noop ("exit with error status if operation does not finish after DELAY"), | 811 | gettext_noop ("exit with error status if operation does not finish after DELAY"), |
812 | &timeout), | 812 | &timeout), |
813 | 813 | ||
814 | GNUNET_GETOPT_OPTION_SET_ONE ('I', | 814 | GNUNET_GETOPT_option_flag ('I', |
815 | "info", | 815 | "info", |
816 | gettext_noop ("list currently running services"), | 816 | gettext_noop ("list currently running services"), |
817 | &list), | 817 | &list), |
818 | 818 | ||
819 | GNUNET_GETOPT_OPTION_SET_ONE ('O', | 819 | GNUNET_GETOPT_option_flag ('O', |
820 | "no-stdout", | 820 | "no-stdout", |
821 | gettext_noop ("don't let gnunet-service-arm inherit standard output"), | 821 | gettext_noop ("don't let gnunet-service-arm inherit standard output"), |
822 | &no_stdout), | 822 | &no_stdout), |
823 | 823 | ||
824 | GNUNET_GETOPT_OPTION_SET_ONE ('E', | 824 | GNUNET_GETOPT_option_flag ('E', |
825 | "no-stderr", | 825 | "no-stderr", |
826 | gettext_noop ("don't let gnunet-service-arm inherit standard error"), | 826 | gettext_noop ("don't let gnunet-service-arm inherit standard error"), |
827 | &no_stderr), | 827 | &no_stderr), |
diff --git a/src/ats-tests/gnunet-solver-eval.c b/src/ats-tests/gnunet-solver-eval.c index 1bb7fdee7..04508d1df 100644 --- a/src/ats-tests/gnunet-solver-eval.c +++ b/src/ats-tests/gnunet-solver-eval.c | |||
@@ -933,19 +933,19 @@ main (int argc, char *argv[]) | |||
933 | 933 | ||
934 | struct GNUNET_GETOPT_CommandLineOption options[] = | 934 | struct GNUNET_GETOPT_CommandLineOption options[] = |
935 | { | 935 | { |
936 | GNUNET_GETOPT_OPTION_STRING ('s', | 936 | GNUNET_GETOPT_option_string ('s', |
937 | "solver", | 937 | "solver", |
938 | NULL, | 938 | NULL, |
939 | gettext_noop ("solver to use"), | 939 | gettext_noop ("solver to use"), |
940 | &opt_solver), | 940 | &opt_solver), |
941 | 941 | ||
942 | GNUNET_GETOPT_OPTION_STRING ('e', | 942 | GNUNET_GETOPT_option_string ('e', |
943 | "experiment", | 943 | "experiment", |
944 | NULL, | 944 | NULL, |
945 | gettext_noop ("experiment to use"), | 945 | gettext_noop ("experiment to use"), |
946 | &opt_exp_file), | 946 | &opt_exp_file), |
947 | 947 | ||
948 | GNUNET_GETOPT_OPTION_SET_ONE ('e', | 948 | GNUNET_GETOPT_option_flag ('e', |
949 | "experiment", | 949 | "experiment", |
950 | gettext_noop ("experiment to use"), | 950 | gettext_noop ("experiment to use"), |
951 | &opt_verbose), | 951 | &opt_verbose), |
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c index f645ba56d..5ec7693b1 100644 --- a/src/ats-tool/gnunet-ats.c +++ b/src/ats-tool/gnunet-ats.c | |||
@@ -945,58 +945,58 @@ main (int argc, | |||
945 | opt_type_str = NULL; | 945 | opt_type_str = NULL; |
946 | 946 | ||
947 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 947 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
948 | GNUNET_GETOPT_OPTION_SET_ONE ('u', | 948 | GNUNET_GETOPT_option_flag ('u', |
949 | "used", | 949 | "used", |
950 | gettext_noop ("get list of active addresses currently used"), | 950 | gettext_noop ("get list of active addresses currently used"), |
951 | &opt_list_used), | 951 | &opt_list_used), |
952 | GNUNET_GETOPT_OPTION_SET_ONE ('a', | 952 | GNUNET_GETOPT_option_flag ('a', |
953 | "all", | 953 | "all", |
954 | gettext_noop ("get list of all active addresses"), | 954 | gettext_noop ("get list of all active addresses"), |
955 | &opt_list_all), | 955 | &opt_list_all), |
956 | 956 | ||
957 | GNUNET_GETOPT_OPTION_STRING ('C', | 957 | GNUNET_GETOPT_option_string ('C', |
958 | "connect", | 958 | "connect", |
959 | NULL, | 959 | NULL, |
960 | gettext_noop ("connect to PEER"), | 960 | gettext_noop ("connect to PEER"), |
961 | &cpid_str), | 961 | &cpid_str), |
962 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 962 | GNUNET_GETOPT_option_flag ('n', |
963 | "numeric", | 963 | "numeric", |
964 | gettext_noop ("do not resolve IP addresses to hostnames"), | 964 | gettext_noop ("do not resolve IP addresses to hostnames"), |
965 | &opt_resolve_addresses_numeric), | 965 | &opt_resolve_addresses_numeric), |
966 | 966 | ||
967 | GNUNET_GETOPT_OPTION_SET_ONE ('m', | 967 | GNUNET_GETOPT_option_flag ('m', |
968 | "monitor", | 968 | "monitor", |
969 | gettext_noop ("monitor mode"), | 969 | gettext_noop ("monitor mode"), |
970 | &opt_monitor), | 970 | &opt_monitor), |
971 | 971 | ||
972 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | 972 | GNUNET_GETOPT_option_flag ('p', |
973 | "preference", | 973 | "preference", |
974 | gettext_noop ("set preference for the given peer"), | 974 | gettext_noop ("set preference for the given peer"), |
975 | &opt_set_pref), | 975 | &opt_set_pref), |
976 | 976 | ||
977 | GNUNET_GETOPT_OPTION_SET_ONE ('q', | 977 | GNUNET_GETOPT_option_flag ('q', |
978 | "quotas", | 978 | "quotas", |
979 | gettext_noop ("print all configured quotas"), | 979 | gettext_noop ("print all configured quotas"), |
980 | &opt_print_quotas), | 980 | &opt_print_quotas), |
981 | GNUNET_GETOPT_OPTION_STRING ('i', | 981 | GNUNET_GETOPT_option_string ('i', |
982 | "id", | 982 | "id", |
983 | "TYPE", | 983 | "TYPE", |
984 | gettext_noop ("peer id"), | 984 | gettext_noop ("peer id"), |
985 | &opt_pid_str), | 985 | &opt_pid_str), |
986 | 986 | ||
987 | GNUNET_GETOPT_OPTION_STRING ('t', | 987 | GNUNET_GETOPT_option_string ('t', |
988 | "type", | 988 | "type", |
989 | "TYPE", | 989 | "TYPE", |
990 | gettext_noop ("preference type to set: latency | bandwidth"), | 990 | gettext_noop ("preference type to set: latency | bandwidth"), |
991 | &opt_type_str), | 991 | &opt_type_str), |
992 | 992 | ||
993 | GNUNET_GETOPT_OPTION_SET_UINT ('k', | 993 | GNUNET_GETOPT_option_uint ('k', |
994 | "value", | 994 | "value", |
995 | "VALUE", | 995 | "VALUE", |
996 | gettext_noop ("preference value"), | 996 | gettext_noop ("preference value"), |
997 | &opt_pref_value), | 997 | &opt_pref_value), |
998 | 998 | ||
999 | GNUNET_GETOPT_OPTION_SET_ONE ('V', | 999 | GNUNET_GETOPT_option_flag ('V', |
1000 | "verbose", | 1000 | "verbose", |
1001 | gettext_noop ("verbose output (include ATS address properties)"), | 1001 | gettext_noop ("verbose output (include ATS address properties)"), |
1002 | &opt_verbose), | 1002 | &opt_verbose), |
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c index 597285f5e..5af2fbce3 100644 --- a/src/ats/gnunet-ats-solver-eval.c +++ b/src/ats/gnunet-ats-solver-eval.c | |||
@@ -3289,29 +3289,29 @@ main (int argc, char *argv[]) | |||
3289 | 3289 | ||
3290 | static struct GNUNET_GETOPT_CommandLineOption options[] = | 3290 | static struct GNUNET_GETOPT_CommandLineOption options[] = |
3291 | { | 3291 | { |
3292 | GNUNET_GETOPT_OPTION_STRING ('s', | 3292 | GNUNET_GETOPT_option_string ('s', |
3293 | "solver", | 3293 | "solver", |
3294 | gettext_noop ("solver to use"), | 3294 | gettext_noop ("solver to use"), |
3295 | &opt_solver), | 3295 | &opt_solver), |
3296 | 3296 | ||
3297 | GNUNET_GETOPT_OPTION_STRING ('e', | 3297 | GNUNET_GETOPT_option_string ('e', |
3298 | "experiment" | 3298 | "experiment" |
3299 | gettext_noop ("experiment to use"), | 3299 | gettext_noop ("experiment to use"), |
3300 | &opt_exp_file), | 3300 | &opt_exp_file), |
3301 | 3301 | ||
3302 | GNUNET_GETOPT_OPTION_VERBOSE (&opt_verbose), | 3302 | GNUNET_GETOPT_option_verbose (&opt_verbose), |
3303 | 3303 | ||
3304 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | 3304 | GNUNET_GETOPT_option_flag ('p', |
3305 | "print", | 3305 | "print", |
3306 | gettext_noop ("print logging"), | 3306 | gettext_noop ("print logging"), |
3307 | &opt_print), | 3307 | &opt_print), |
3308 | 3308 | ||
3309 | GNUNET_GETOPT_OPTION_SET_ONE ('f', | 3309 | GNUNET_GETOPT_option_flag ('f', |
3310 | "file", | 3310 | "file", |
3311 | gettext_noop ("save logging to disk"), | 3311 | gettext_noop ("save logging to disk"), |
3312 | &opt_save), | 3312 | &opt_save), |
3313 | 3313 | ||
3314 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 3314 | GNUNET_GETOPT_option_flag ('d', |
3315 | "dn", | 3315 | "dn", |
3316 | gettext_noop ("disable normalization"), | 3316 | gettext_noop ("disable normalization"), |
3317 | &opt_disable_normalization), | 3317 | &opt_disable_normalization), |
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c index 855899b36..7fae3624f 100644 --- a/src/ats/perf_ats_solver.c +++ b/src/ats/perf_ats_solver.c | |||
@@ -1405,37 +1405,37 @@ main (int argc, char *argv[]) | |||
1405 | 1405 | ||
1406 | static struct GNUNET_GETOPT_CommandLineOption options[] = { | 1406 | static struct GNUNET_GETOPT_CommandLineOption options[] = { |
1407 | 1407 | ||
1408 | GNUNET_GETOPT_OPTION_SET_UINT ('a', | 1408 | GNUNET_GETOPT_option_uint ('a', |
1409 | "addresses", | 1409 | "addresses", |
1410 | gettext_noop ("addresses to use"), | 1410 | gettext_noop ("addresses to use"), |
1411 | &ph.N_address), | 1411 | &ph.N_address), |
1412 | 1412 | ||
1413 | GNUNET_GETOPT_OPTION_SET_UINT ('s', | 1413 | GNUNET_GETOPT_option_uint ('s', |
1414 | "start", | 1414 | "start", |
1415 | gettext_noop ("start with peer"), | 1415 | gettext_noop ("start with peer"), |
1416 | &ph.N_peers_start), | 1416 | &ph.N_peers_start), |
1417 | 1417 | ||
1418 | GNUNET_GETOPT_OPTION_SET_UINT ('e', | 1418 | GNUNET_GETOPT_option_uint ('e', |
1419 | "end", | 1419 | "end", |
1420 | gettext_noop ("end with peer"), | 1420 | gettext_noop ("end with peer"), |
1421 | &ph.N_peers_end), | 1421 | &ph.N_peers_end), |
1422 | 1422 | ||
1423 | GNUNET_GETOPT_OPTION_SET_UINT ('i', | 1423 | GNUNET_GETOPT_option_uint ('i', |
1424 | "iterations", | 1424 | "iterations", |
1425 | gettext_noop ("number of iterations used for averaging (default: 1)"), | 1425 | gettext_noop ("number of iterations used for averaging (default: 1)"), |
1426 | &ph.total_iterations), | 1426 | &ph.total_iterations), |
1427 | 1427 | ||
1428 | GNUNET_GETOPT_OPTION_SET_UINT ('p', | 1428 | GNUNET_GETOPT_option_uint ('p', |
1429 | "percentage", | 1429 | "percentage", |
1430 | gettext_noop ("update a fix percentage of addresses"), | 1430 | gettext_noop ("update a fix percentage of addresses"), |
1431 | &ph.opt_update_percent), | 1431 | &ph.opt_update_percent), |
1432 | 1432 | ||
1433 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 1433 | GNUNET_GETOPT_option_flag ('d', |
1434 | "data", | 1434 | "data", |
1435 | gettext_noop ("create data file"), | 1435 | gettext_noop ("create data file"), |
1436 | &ph.create_datafile), | 1436 | &ph.create_datafile), |
1437 | 1437 | ||
1438 | GNUNET_GETOPT_OPTION_SET_ONE ('u', | 1438 | GNUNET_GETOPT_option_flag ('u', |
1439 | "update", | 1439 | "update", |
1440 | gettext_noop ("measure updates"), | 1440 | gettext_noop ("measure updates"), |
1441 | &ph.measure_updates), | 1441 | &ph.measure_updates), |
diff --git a/src/auction/gnunet-auction-create.c b/src/auction/gnunet-auction-create.c index e6fcab097..9e6c23b88 100644 --- a/src/auction/gnunet-auction-create.c +++ b/src/auction/gnunet-auction-create.c | |||
@@ -157,30 +157,30 @@ main (int argc, char *const *argv) | |||
157 | { | 157 | { |
158 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 158 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
159 | 159 | ||
160 | GNUNET_GETOPT_OPTION_FILENAME ('d', | 160 | GNUNET_GETOPT_option_filename ('d', |
161 | "description", | 161 | "description", |
162 | "FILE", | 162 | "FILE", |
163 | gettext_noop ("description of the item to be sold"), | 163 | gettext_noop ("description of the item to be sold"), |
164 | &fndesc), | 164 | &fndesc), |
165 | 165 | ||
166 | GNUNET_GETOPT_OPTION_FILENAME ('p', | 166 | GNUNET_GETOPT_option_filename ('p', |
167 | "pricemap", | 167 | "pricemap", |
168 | "FILE", | 168 | "FILE", |
169 | gettext_noop ("mapping of possible prices"), | 169 | gettext_noop ("mapping of possible prices"), |
170 | &fnprices), | 170 | &fnprices), |
171 | 171 | ||
172 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('r', | 172 | GNUNET_GETOPT_option_relative_time ('r', |
173 | "roundtime", | 173 | "roundtime", |
174 | "DURATION", | 174 | "DURATION", |
175 | gettext_noop ("max duration per round"), | 175 | gettext_noop ("max duration per round"), |
176 | &dround), | 176 | &dround), |
177 | 177 | ||
178 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('s', | 178 | GNUNET_GETOPT_option_relative_time ('s', |
179 | "regtime", | 179 | "regtime", |
180 | "DURATION", | 180 | "DURATION", |
181 | gettext_noop ("duration until auction starts"), | 181 | gettext_noop ("duration until auction starts"), |
182 | &dstart), | 182 | &dstart), |
183 | GNUNET_GETOPT_OPTION_SET_UINT ('m', | 183 | GNUNET_GETOPT_option_uint ('m', |
184 | "m", | 184 | "m", |
185 | "NUMBER", | 185 | "NUMBER", |
186 | gettext_noop ("number of items to sell\n" | 186 | gettext_noop ("number of items to sell\n" |
@@ -188,12 +188,12 @@ main (int argc, char *const *argv) | |||
188 | ">0 for vickrey/M+1st price auction"), | 188 | ">0 for vickrey/M+1st price auction"), |
189 | &m), | 189 | &m), |
190 | 190 | ||
191 | GNUNET_GETOPT_OPTION_SET_ONE ('u', | 191 | GNUNET_GETOPT_option_flag ('u', |
192 | "public", | 192 | "public", |
193 | gettext_noop ("public auction outcome"), | 193 | gettext_noop ("public auction outcome"), |
194 | &outcome), | 194 | &outcome), |
195 | 195 | ||
196 | GNUNET_GETOPT_OPTION_SET_ONE ('i', | 196 | GNUNET_GETOPT_option_flag ('i', |
197 | "interactive", | 197 | "interactive", |
198 | gettext_noop ("keep running in foreground until auction completes"), | 198 | gettext_noop ("keep running in foreground until auction completes"), |
199 | &interactive), | 199 | &interactive), |
diff --git a/src/cadet/gnunet-cadet.c b/src/cadet/gnunet-cadet.c index 57eeac735..675e7faf0 100644 --- a/src/cadet/gnunet-cadet.c +++ b/src/cadet/gnunet-cadet.c | |||
@@ -922,49 +922,49 @@ main (int argc, | |||
922 | const char helpstr[] = "Create tunnels and retrieve info about CADET's status."; | 922 | const char helpstr[] = "Create tunnels and retrieve info about CADET's status."; |
923 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 923 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
924 | /* I would use the terminology 'circuit' here... --lynX */ | 924 | /* I would use the terminology 'circuit' here... --lynX */ |
925 | GNUNET_GETOPT_OPTION_STRING ('C', | 925 | GNUNET_GETOPT_option_string ('C', |
926 | "connection", | 926 | "connection", |
927 | "CONNECTION_ID", | 927 | "CONNECTION_ID", |
928 | gettext_noop ("Provide information about a particular connection"), | 928 | gettext_noop ("Provide information about a particular connection"), |
929 | &conn_id), | 929 | &conn_id), |
930 | 930 | ||
931 | GNUNET_GETOPT_OPTION_SET_ONE ('e', | 931 | GNUNET_GETOPT_option_flag ('e', |
932 | "echo", | 932 | "echo", |
933 | gettext_noop ("Activate echo mode"), | 933 | gettext_noop ("Activate echo mode"), |
934 | &echo), | 934 | &echo), |
935 | 935 | ||
936 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 936 | GNUNET_GETOPT_option_flag ('d', |
937 | "dump", | 937 | "dump", |
938 | gettext_noop ("Dump debug information to STDERR"), | 938 | gettext_noop ("Dump debug information to STDERR"), |
939 | &dump), | 939 | &dump), |
940 | 940 | ||
941 | GNUNET_GETOPT_OPTION_STRING ('o', | 941 | GNUNET_GETOPT_option_string ('o', |
942 | "open-port", | 942 | "open-port", |
943 | "SHARED_SECRET", | 943 | "SHARED_SECRET", |
944 | gettext_noop ("Listen for connections using a shared secret among sender and recipient"), | 944 | gettext_noop ("Listen for connections using a shared secret among sender and recipient"), |
945 | &listen_port), | 945 | &listen_port), |
946 | 946 | ||
947 | 947 | ||
948 | GNUNET_GETOPT_OPTION_STRING ('p', | 948 | GNUNET_GETOPT_option_string ('p', |
949 | "peer", | 949 | "peer", |
950 | "PEER_ID", | 950 | "PEER_ID", |
951 | gettext_noop ("Provide information about a patricular peer"), | 951 | gettext_noop ("Provide information about a patricular peer"), |
952 | &peer_id), | 952 | &peer_id), |
953 | 953 | ||
954 | 954 | ||
955 | GNUNET_GETOPT_OPTION_SET_ONE ('P', | 955 | GNUNET_GETOPT_option_flag ('P', |
956 | "peers", | 956 | "peers", |
957 | gettext_noop ("Provide information about all peers"), | 957 | gettext_noop ("Provide information about all peers"), |
958 | &request_peers), | 958 | &request_peers), |
959 | 959 | ||
960 | GNUNET_GETOPT_OPTION_STRING ('t', | 960 | GNUNET_GETOPT_option_string ('t', |
961 | "tunnel", | 961 | "tunnel", |
962 | "TUNNEL_ID", | 962 | "TUNNEL_ID", |
963 | gettext_noop ("Provide information about a particular tunnel"), | 963 | gettext_noop ("Provide information about a particular tunnel"), |
964 | &tunnel_id), | 964 | &tunnel_id), |
965 | 965 | ||
966 | 966 | ||
967 | GNUNET_GETOPT_OPTION_SET_ONE ('T', | 967 | GNUNET_GETOPT_option_flag ('T', |
968 | "tunnels", | 968 | "tunnels", |
969 | gettext_noop ("Provide information about all tunnels"), | 969 | gettext_noop ("Provide information about all tunnels"), |
970 | &request_tunnels), | 970 | &request_tunnels), |
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c index 8963d97c9..72df2203c 100644 --- a/src/cadet/test_cadet.c +++ b/src/cadet/test_cadet.c | |||
@@ -959,13 +959,13 @@ main (int argc, char *argv[]) | |||
959 | const char *config_file; | 959 | const char *config_file; |
960 | char port_id[] = "test port"; | 960 | char port_id[] = "test port"; |
961 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 961 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
962 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', | 962 | GNUNET_GETOPT_option_relative_time ('t', |
963 | "time", | 963 | "time", |
964 | "short_time", | 964 | "short_time", |
965 | gettext_noop ("set short timeout"), | 965 | gettext_noop ("set short timeout"), |
966 | &short_time), | 966 | &short_time), |
967 | 967 | ||
968 | GNUNET_GETOPT_OPTION_SET_UINT ('m', | 968 | GNUNET_GETOPT_option_uint ('m', |
969 | "messages", | 969 | "messages", |
970 | "NUM_MESSAGES", | 970 | "NUM_MESSAGES", |
971 | gettext_noop ("set number of messages to send"), | 971 | gettext_noop ("set number of messages to send"), |
diff --git a/src/consensus/gnunet-consensus-profiler.c b/src/consensus/gnunet-consensus-profiler.c index 8cc1b3512..68c2ad594 100644 --- a/src/consensus/gnunet-consensus-profiler.c +++ b/src/consensus/gnunet-consensus-profiler.c | |||
@@ -517,49 +517,49 @@ main (int argc, char **argv) | |||
517 | { | 517 | { |
518 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 518 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
519 | 519 | ||
520 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | 520 | GNUNET_GETOPT_option_uint ('n', |
521 | "num-peers", | 521 | "num-peers", |
522 | NULL, | 522 | NULL, |
523 | gettext_noop ("number of peers in consensus"), | 523 | gettext_noop ("number of peers in consensus"), |
524 | &num_peers), | 524 | &num_peers), |
525 | 525 | ||
526 | GNUNET_GETOPT_OPTION_SET_UINT ('k', | 526 | GNUNET_GETOPT_option_uint ('k', |
527 | "value-replication", | 527 | "value-replication", |
528 | NULL, | 528 | NULL, |
529 | gettext_noop ("how many peers (random selection without replacement) receive one value?"), | 529 | gettext_noop ("how many peers (random selection without replacement) receive one value?"), |
530 | &replication), | 530 | &replication), |
531 | 531 | ||
532 | GNUNET_GETOPT_OPTION_SET_UINT ('x', | 532 | GNUNET_GETOPT_option_uint ('x', |
533 | "num-values", | 533 | "num-values", |
534 | NULL, | 534 | NULL, |
535 | gettext_noop ("number of values"), | 535 | gettext_noop ("number of values"), |
536 | &num_values), | 536 | &num_values), |
537 | 537 | ||
538 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', | 538 | GNUNET_GETOPT_option_relative_time ('t', |
539 | "timeout", | 539 | "timeout", |
540 | NULL, | 540 | NULL, |
541 | gettext_noop ("consensus timeout"), | 541 | gettext_noop ("consensus timeout"), |
542 | &conclude_timeout), | 542 | &conclude_timeout), |
543 | 543 | ||
544 | 544 | ||
545 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d', | 545 | GNUNET_GETOPT_option_relative_time ('d', |
546 | "delay", | 546 | "delay", |
547 | NULL, | 547 | NULL, |
548 | gettext_noop ("delay until consensus starts"), | 548 | gettext_noop ("delay until consensus starts"), |
549 | &consensus_delay), | 549 | &consensus_delay), |
550 | 550 | ||
551 | GNUNET_GETOPT_OPTION_FILENAME ('s', | 551 | GNUNET_GETOPT_option_filename ('s', |
552 | "statistics", | 552 | "statistics", |
553 | "FILENAME", | 553 | "FILENAME", |
554 | gettext_noop ("write statistics to file"), | 554 | gettext_noop ("write statistics to file"), |
555 | &statistics_filename), | 555 | &statistics_filename), |
556 | 556 | ||
557 | GNUNET_GETOPT_OPTION_SET_ONE ('S', | 557 | GNUNET_GETOPT_option_flag ('S', |
558 | "dist-static", | 558 | "dist-static", |
559 | gettext_noop ("distribute elements to a static subset of good peers"), | 559 | gettext_noop ("distribute elements to a static subset of good peers"), |
560 | &dist_static), | 560 | &dist_static), |
561 | 561 | ||
562 | GNUNET_GETOPT_OPTION_SET_ONE ('V', | 562 | GNUNET_GETOPT_option_flag ('V', |
563 | "verbose", | 563 | "verbose", |
564 | gettext_noop ("be more verbose (print received values)"), | 564 | gettext_noop ("be more verbose (print received values)"), |
565 | &verbose), | 565 | &verbose), |
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c index c5275c0de..8f9ddec25 100644 --- a/src/conversation/gnunet-conversation.c +++ b/src/conversation/gnunet-conversation.c | |||
@@ -1267,13 +1267,13 @@ main (int argc, char *const *argv) | |||
1267 | { | 1267 | { |
1268 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 1268 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1269 | 1269 | ||
1270 | GNUNET_GETOPT_OPTION_STRING ('e', | 1270 | GNUNET_GETOPT_option_string ('e', |
1271 | "ego", | 1271 | "ego", |
1272 | "NAME", | 1272 | "NAME", |
1273 | gettext_noop ("sets the NAME of the ego to use for the phone (and name resolution)"), | 1273 | gettext_noop ("sets the NAME of the ego to use for the phone (and name resolution)"), |
1274 | &ego_name), | 1274 | &ego_name), |
1275 | 1275 | ||
1276 | GNUNET_GETOPT_OPTION_STRING ('p', | 1276 | GNUNET_GETOPT_option_string ('p', |
1277 | "phone", | 1277 | "phone", |
1278 | "LINE", | 1278 | "LINE", |
1279 | gettext_noop ("sets the LINE to use for the phone"), | 1279 | gettext_noop ("sets the LINE to use for the phone"), |
diff --git a/src/core/gnunet-core.c b/src/core/gnunet-core.c index ed89b1946..76b7e8ac4 100644 --- a/src/core/gnunet-core.c +++ b/src/core/gnunet-core.c | |||
@@ -172,7 +172,7 @@ main (int argc, | |||
172 | { | 172 | { |
173 | int res; | 173 | int res; |
174 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 174 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
175 | GNUNET_GETOPT_OPTION_SET_ONE ('m', | 175 | GNUNET_GETOPT_option_flag ('m', |
176 | "monitor", | 176 | "monitor", |
177 | gettext_noop ("provide information about all current connections (continuously)"), | 177 | gettext_noop ("provide information about all current connections (continuously)"), |
178 | &monitor_connections), | 178 | &monitor_connections), |
diff --git a/src/datastore/gnunet-datastore.c b/src/datastore/gnunet-datastore.c index 7caf5d175..9e0ee205e 100644 --- a/src/datastore/gnunet-datastore.c +++ b/src/datastore/gnunet-datastore.c | |||
@@ -250,7 +250,7 @@ int | |||
250 | main (int argc, char *const *argv) | 250 | main (int argc, char *const *argv) |
251 | { | 251 | { |
252 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 252 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
253 | GNUNET_GETOPT_OPTION_FILENAME ('s', | 253 | GNUNET_GETOPT_option_filename ('s', |
254 | "sourcecfg", | 254 | "sourcecfg", |
255 | "FILENAME", | 255 | "FILENAME", |
256 | gettext_noop ("specifies the configuration to use to access an alternative datastore; will merge that datastore into our current datastore"), | 256 | gettext_noop ("specifies the configuration to use to access an alternative datastore; will merge that datastore into our current datastore"), |
diff --git a/src/dht/gnunet-dht-get.c b/src/dht/gnunet-dht-get.c index 67f0ce76d..e361df336 100644 --- a/src/dht/gnunet-dht-get.c +++ b/src/dht/gnunet-dht-get.c | |||
@@ -239,37 +239,37 @@ main (int argc, char *const *argv) | |||
239 | 239 | ||
240 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 240 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
241 | 241 | ||
242 | GNUNET_GETOPT_OPTION_STRING ('k', | 242 | GNUNET_GETOPT_option_string ('k', |
243 | "key", | 243 | "key", |
244 | "KEY", | 244 | "KEY", |
245 | gettext_noop ("the query key"), | 245 | gettext_noop ("the query key"), |
246 | &query_key), | 246 | &query_key), |
247 | 247 | ||
248 | GNUNET_GETOPT_OPTION_SET_UINT ('r', | 248 | GNUNET_GETOPT_option_uint ('r', |
249 | "replication", | 249 | "replication", |
250 | "LEVEL", | 250 | "LEVEL", |
251 | gettext_noop ("how many parallel requests (replicas) to create"), | 251 | gettext_noop ("how many parallel requests (replicas) to create"), |
252 | &replication), | 252 | &replication), |
253 | 253 | ||
254 | 254 | ||
255 | GNUNET_GETOPT_OPTION_SET_UINT ('t', | 255 | GNUNET_GETOPT_option_uint ('t', |
256 | "type", | 256 | "type", |
257 | "TYPE", | 257 | "TYPE", |
258 | gettext_noop ("the type of data to look for"), | 258 | gettext_noop ("the type of data to look for"), |
259 | &query_type), | 259 | &query_type), |
260 | 260 | ||
261 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', | 261 | GNUNET_GETOPT_option_relative_time ('T', |
262 | "timeout", | 262 | "timeout", |
263 | "TIMEOUT", | 263 | "TIMEOUT", |
264 | gettext_noop ("how long to execute this query before giving up?"), | 264 | gettext_noop ("how long to execute this query before giving up?"), |
265 | &timeout_request), | 265 | &timeout_request), |
266 | 266 | ||
267 | GNUNET_GETOPT_OPTION_SET_ONE ('x', | 267 | GNUNET_GETOPT_option_flag ('x', |
268 | "demultiplex", | 268 | "demultiplex", |
269 | gettext_noop ("use DHT's demultiplex everywhere option"), | 269 | gettext_noop ("use DHT's demultiplex everywhere option"), |
270 | &demultixplex_everywhere), | 270 | &demultixplex_everywhere), |
271 | 271 | ||
272 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 272 | GNUNET_GETOPT_option_verbose (&verbose), |
273 | GNUNET_GETOPT_OPTION_END | 273 | GNUNET_GETOPT_OPTION_END |
274 | }; | 274 | }; |
275 | 275 | ||
diff --git a/src/dht/gnunet-dht-monitor.c b/src/dht/gnunet-dht-monitor.c index e4e8c46a1..b7360bbab 100644 --- a/src/dht/gnunet-dht-monitor.c +++ b/src/dht/gnunet-dht-monitor.c | |||
@@ -292,25 +292,25 @@ main (int argc, char *const *argv) | |||
292 | { | 292 | { |
293 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 293 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
294 | 294 | ||
295 | GNUNET_GETOPT_OPTION_STRING ('k', | 295 | GNUNET_GETOPT_option_string ('k', |
296 | "key", | 296 | "key", |
297 | "KEY", | 297 | "KEY", |
298 | gettext_noop ("the query key"), | 298 | gettext_noop ("the query key"), |
299 | &query_key), | 299 | &query_key), |
300 | 300 | ||
301 | GNUNET_GETOPT_OPTION_SET_UINT ('t', | 301 | GNUNET_GETOPT_option_uint ('t', |
302 | "type", | 302 | "type", |
303 | "TYPE", | 303 | "TYPE", |
304 | gettext_noop ("the type of data to look for"), | 304 | gettext_noop ("the type of data to look for"), |
305 | &block_type), | 305 | &block_type), |
306 | 306 | ||
307 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', | 307 | GNUNET_GETOPT_option_relative_time ('T', |
308 | "timeout", | 308 | "timeout", |
309 | "TIMEOUT", | 309 | "TIMEOUT", |
310 | gettext_noop ("how long should the monitor command run"), | 310 | gettext_noop ("how long should the monitor command run"), |
311 | &timeout_request), | 311 | &timeout_request), |
312 | 312 | ||
313 | GNUNET_GETOPT_OPTION_SET_ONE ('V', | 313 | GNUNET_GETOPT_option_flag ('V', |
314 | "verbose", | 314 | "verbose", |
315 | gettext_noop ("be verbose (print progress information)"), | 315 | gettext_noop ("be verbose (print progress information)"), |
316 | &verbose), | 316 | &verbose), |
diff --git a/src/dht/gnunet-dht-put.c b/src/dht/gnunet-dht-put.c index bf88e5ded..f183fe588 100644 --- a/src/dht/gnunet-dht-put.c +++ b/src/dht/gnunet-dht-put.c | |||
@@ -204,47 +204,47 @@ main (int argc, char *const *argv) | |||
204 | 204 | ||
205 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 205 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
206 | 206 | ||
207 | GNUNET_GETOPT_OPTION_STRING ('d', | 207 | GNUNET_GETOPT_option_string ('d', |
208 | "data", | 208 | "data", |
209 | "DATA", | 209 | "DATA", |
210 | gettext_noop ("the data to insert under the key"), | 210 | gettext_noop ("the data to insert under the key"), |
211 | &data), | 211 | &data), |
212 | 212 | ||
213 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('e', | 213 | GNUNET_GETOPT_option_relative_time ('e', |
214 | "expiration", | 214 | "expiration", |
215 | "EXPIRATION", | 215 | "EXPIRATION", |
216 | gettext_noop ("how long to store this entry in the dht (in seconds)"), | 216 | gettext_noop ("how long to store this entry in the dht (in seconds)"), |
217 | &expiration), | 217 | &expiration), |
218 | 218 | ||
219 | GNUNET_GETOPT_OPTION_STRING ('k', | 219 | GNUNET_GETOPT_option_string ('k', |
220 | "key", | 220 | "key", |
221 | "KEY", | 221 | "KEY", |
222 | gettext_noop ("the query key"), | 222 | gettext_noop ("the query key"), |
223 | &query_key), | 223 | &query_key), |
224 | 224 | ||
225 | GNUNET_GETOPT_OPTION_SET_ONE ('x', | 225 | GNUNET_GETOPT_option_flag ('x', |
226 | "demultiplex", | 226 | "demultiplex", |
227 | gettext_noop ("use DHT's demultiplex everywhere option"), | 227 | gettext_noop ("use DHT's demultiplex everywhere option"), |
228 | &demultixplex_everywhere), | 228 | &demultixplex_everywhere), |
229 | 229 | ||
230 | GNUNET_GETOPT_OPTION_SET_UINT ('r', | 230 | GNUNET_GETOPT_option_uint ('r', |
231 | "replication", | 231 | "replication", |
232 | "LEVEL", | 232 | "LEVEL", |
233 | gettext_noop ("how many replicas to create"), | 233 | gettext_noop ("how many replicas to create"), |
234 | &replication), | 234 | &replication), |
235 | 235 | ||
236 | GNUNET_GETOPT_OPTION_SET_ONE ('R', | 236 | GNUNET_GETOPT_option_flag ('R', |
237 | "record", | 237 | "record", |
238 | gettext_noop ("use DHT's record route option"), | 238 | gettext_noop ("use DHT's record route option"), |
239 | &record_route), | 239 | &record_route), |
240 | 240 | ||
241 | GNUNET_GETOPT_OPTION_SET_UINT ('t', | 241 | GNUNET_GETOPT_option_uint ('t', |
242 | "type", | 242 | "type", |
243 | "TYPE", | 243 | "TYPE", |
244 | gettext_noop ("the type to insert data as"), | 244 | gettext_noop ("the type to insert data as"), |
245 | &query_type), | 245 | &query_type), |
246 | 246 | ||
247 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 247 | GNUNET_GETOPT_option_verbose (&verbose), |
248 | 248 | ||
249 | GNUNET_GETOPT_OPTION_END | 249 | GNUNET_GETOPT_OPTION_END |
250 | }; | 250 | }; |
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c index f65141640..a8807bea8 100644 --- a/src/dht/gnunet_dht_profiler.c +++ b/src/dht/gnunet_dht_profiler.c | |||
@@ -1182,49 +1182,49 @@ main (int argc, char *const *argv) | |||
1182 | int rc; | 1182 | int rc; |
1183 | 1183 | ||
1184 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 1184 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1185 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | 1185 | GNUNET_GETOPT_option_uint ('n', |
1186 | "peers", | 1186 | "peers", |
1187 | "COUNT", | 1187 | "COUNT", |
1188 | gettext_noop ("number of peers to start"), | 1188 | gettext_noop ("number of peers to start"), |
1189 | &num_peers), | 1189 | &num_peers), |
1190 | 1190 | ||
1191 | GNUNET_GETOPT_OPTION_SET_UINT ('s', | 1191 | GNUNET_GETOPT_option_uint ('s', |
1192 | "searches", | 1192 | "searches", |
1193 | "COUNT", | 1193 | "COUNT", |
1194 | gettext_noop ("maximum number of times we try to search for successor circle formation (0 for R5N)"), | 1194 | gettext_noop ("maximum number of times we try to search for successor circle formation (0 for R5N)"), |
1195 | &max_searches), | 1195 | &max_searches), |
1196 | 1196 | ||
1197 | GNUNET_GETOPT_OPTION_STRING ('H', | 1197 | GNUNET_GETOPT_option_string ('H', |
1198 | "hosts", | 1198 | "hosts", |
1199 | "FILENAME", | 1199 | "FILENAME", |
1200 | gettext_noop ("name of the file with the login information for the testbed"), | 1200 | gettext_noop ("name of the file with the login information for the testbed"), |
1201 | &hosts_file), | 1201 | &hosts_file), |
1202 | 1202 | ||
1203 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D', | 1203 | GNUNET_GETOPT_option_relative_time ('D', |
1204 | "delay", | 1204 | "delay", |
1205 | "DELAY", | 1205 | "DELAY", |
1206 | gettext_noop ("delay between rounds for collecting statistics (default: 30 sec)"), | 1206 | gettext_noop ("delay between rounds for collecting statistics (default: 30 sec)"), |
1207 | &delay_stats), | 1207 | &delay_stats), |
1208 | 1208 | ||
1209 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('P', | 1209 | GNUNET_GETOPT_option_relative_time ('P', |
1210 | "PUT-delay", | 1210 | "PUT-delay", |
1211 | "DELAY", | 1211 | "DELAY", |
1212 | gettext_noop ("delay to start doing PUTs (default: 1 sec)"), | 1212 | gettext_noop ("delay to start doing PUTs (default: 1 sec)"), |
1213 | &delay_put), | 1213 | &delay_put), |
1214 | 1214 | ||
1215 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('G', | 1215 | GNUNET_GETOPT_option_relative_time ('G', |
1216 | "GET-delay", | 1216 | "GET-delay", |
1217 | "DELAY", | 1217 | "DELAY", |
1218 | gettext_noop ("delay to start doing GETs (default: 5 min)"), | 1218 | gettext_noop ("delay to start doing GETs (default: 5 min)"), |
1219 | &delay_get), | 1219 | &delay_get), |
1220 | GNUNET_GETOPT_OPTION_SET_UINT ('r', | 1220 | GNUNET_GETOPT_option_uint ('r', |
1221 | "replication", | 1221 | "replication", |
1222 | "DEGREE", | 1222 | "DEGREE", |
1223 | gettext_noop ("replication degree for DHT PUTs"), | 1223 | gettext_noop ("replication degree for DHT PUTs"), |
1224 | &replication), | 1224 | &replication), |
1225 | 1225 | ||
1226 | 1226 | ||
1227 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', | 1227 | GNUNET_GETOPT_option_relative_time ('t', |
1228 | "timeout", | 1228 | "timeout", |
1229 | "TIMEOUT", | 1229 | "TIMEOUT", |
1230 | gettext_noop ("timeout for DHT PUT and GET requests (default: 1 min)"), | 1230 | gettext_noop ("timeout for DHT PUT and GET requests (default: 1 min)"), |
diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c index 2436931fb..fb5c768ac 100644 --- a/src/dns/gnunet-dns-monitor.c +++ b/src/dns/gnunet-dns-monitor.c | |||
@@ -348,17 +348,17 @@ main (int argc, char *const *argv) | |||
348 | { | 348 | { |
349 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 349 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
350 | 350 | ||
351 | GNUNET_GETOPT_OPTION_SET_ONE ('i', | 351 | GNUNET_GETOPT_option_flag ('i', |
352 | "inbound-only", | 352 | "inbound-only", |
353 | gettext_noop ("only monitor DNS queries"), | 353 | gettext_noop ("only monitor DNS queries"), |
354 | &inbound_only), | 354 | &inbound_only), |
355 | 355 | ||
356 | GNUNET_GETOPT_OPTION_SET_ONE ('o', | 356 | GNUNET_GETOPT_option_flag ('o', |
357 | "outbound-only", | 357 | "outbound-only", |
358 | gettext_noop ("only monitor DNS queries"), | 358 | gettext_noop ("only monitor DNS queries"), |
359 | &outbound_only), | 359 | &outbound_only), |
360 | 360 | ||
361 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 361 | GNUNET_GETOPT_option_verbose (&verbosity), |
362 | GNUNET_GETOPT_OPTION_END | 362 | GNUNET_GETOPT_OPTION_END |
363 | }; | 363 | }; |
364 | 364 | ||
diff --git a/src/dns/gnunet-dns-redirector.c b/src/dns/gnunet-dns-redirector.c index 0469af732..44d3d0b6c 100644 --- a/src/dns/gnunet-dns-redirector.c +++ b/src/dns/gnunet-dns-redirector.c | |||
@@ -231,19 +231,19 @@ int | |||
231 | main (int argc, char *const *argv) | 231 | main (int argc, char *const *argv) |
232 | { | 232 | { |
233 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 233 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
234 | GNUNET_GETOPT_OPTION_STRING ('4', | 234 | GNUNET_GETOPT_option_string ('4', |
235 | "ipv4", | 235 | "ipv4", |
236 | "IPV4", | 236 | "IPV4", |
237 | gettext_noop ("set A records"), | 237 | gettext_noop ("set A records"), |
238 | &n4), | 238 | &n4), |
239 | 239 | ||
240 | GNUNET_GETOPT_OPTION_STRING ('6', | 240 | GNUNET_GETOPT_option_string ('6', |
241 | "ipv4", | 241 | "ipv4", |
242 | "IPV6", | 242 | "IPV6", |
243 | gettext_noop ("set AAAA records"), | 243 | gettext_noop ("set AAAA records"), |
244 | &n6), | 244 | &n6), |
245 | 245 | ||
246 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 246 | GNUNET_GETOPT_option_verbose (&verbosity), |
247 | GNUNET_GETOPT_OPTION_END | 247 | GNUNET_GETOPT_OPTION_END |
248 | }; | 248 | }; |
249 | 249 | ||
diff --git a/src/dv/gnunet-dv.c b/src/dv/gnunet-dv.c index cb40bb6d2..d99097a15 100644 --- a/src/dv/gnunet-dv.c +++ b/src/dv/gnunet-dv.c | |||
@@ -163,7 +163,7 @@ main (int argc, char *const *argv) | |||
163 | 163 | ||
164 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 164 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
165 | 165 | ||
166 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 166 | GNUNET_GETOPT_option_verbose (&verbose), |
167 | 167 | ||
168 | GNUNET_GETOPT_OPTION_END | 168 | GNUNET_GETOPT_OPTION_END |
169 | }; | 169 | }; |
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c index 2f980520a..0976b37e4 100644 --- a/src/fs/gnunet-auto-share.c +++ b/src/fs/gnunet-auto-share.c | |||
@@ -761,35 +761,35 @@ main (int argc, char *const *argv) | |||
761 | { | 761 | { |
762 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 762 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
763 | 763 | ||
764 | GNUNET_GETOPT_OPTION_SET_UINT ('a', | 764 | GNUNET_GETOPT_option_uint ('a', |
765 | "anonymity", | 765 | "anonymity", |
766 | "LEVEL", | 766 | "LEVEL", |
767 | gettext_noop ("set the desired LEVEL of sender-anonymity"), | 767 | gettext_noop ("set the desired LEVEL of sender-anonymity"), |
768 | &anonymity_level), | 768 | &anonymity_level), |
769 | 769 | ||
770 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 770 | GNUNET_GETOPT_option_flag ('d', |
771 | "disable-creation-time", | 771 | "disable-creation-time", |
772 | gettext_noop ("disable adding the creation time to the metadata of the uploaded file"), | 772 | gettext_noop ("disable adding the creation time to the metadata of the uploaded file"), |
773 | &do_disable_creation_time), | 773 | &do_disable_creation_time), |
774 | 774 | ||
775 | GNUNET_GETOPT_OPTION_SET_ONE ('D', | 775 | GNUNET_GETOPT_option_flag ('D', |
776 | "disable-extractor", | 776 | "disable-extractor", |
777 | gettext_noop ("do not use libextractor to add keywords or metadata"), | 777 | gettext_noop ("do not use libextractor to add keywords or metadata"), |
778 | &disable_extractor), | 778 | &disable_extractor), |
779 | 779 | ||
780 | GNUNET_GETOPT_OPTION_SET_UINT ('p', | 780 | GNUNET_GETOPT_option_uint ('p', |
781 | "priority", | 781 | "priority", |
782 | "PRIORITY", | 782 | "PRIORITY", |
783 | gettext_noop ("specify the priority of the content"), | 783 | gettext_noop ("specify the priority of the content"), |
784 | &content_priority), | 784 | &content_priority), |
785 | 785 | ||
786 | GNUNET_GETOPT_OPTION_SET_UINT ('r', | 786 | GNUNET_GETOPT_option_uint ('r', |
787 | "replication", | 787 | "replication", |
788 | "LEVEL", | 788 | "LEVEL", |
789 | gettext_noop ("set the desired replication LEVEL"), | 789 | gettext_noop ("set the desired replication LEVEL"), |
790 | &replication_level), | 790 | &replication_level), |
791 | 791 | ||
792 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 792 | GNUNET_GETOPT_option_verbose (&verbose), |
793 | 793 | ||
794 | GNUNET_GETOPT_OPTION_END | 794 | GNUNET_GETOPT_OPTION_END |
795 | }; | 795 | }; |
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index 4d6f30587..83c1eb505 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c | |||
@@ -300,46 +300,46 @@ int | |||
300 | main (int argc, char *const *argv) | 300 | main (int argc, char *const *argv) |
301 | { | 301 | { |
302 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 302 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
303 | GNUNET_GETOPT_OPTION_SET_UINT ('a', | 303 | GNUNET_GETOPT_option_uint ('a', |
304 | "anonymity", | 304 | "anonymity", |
305 | "LEVEL", | 305 | "LEVEL", |
306 | gettext_noop ("set the desired LEVEL of receiver-anonymity"), | 306 | gettext_noop ("set the desired LEVEL of receiver-anonymity"), |
307 | &anonymity), | 307 | &anonymity), |
308 | 308 | ||
309 | GNUNET_GETOPT_OPTION_SET_ONE ('D', | 309 | GNUNET_GETOPT_option_flag ('D', |
310 | "delete-incomplete", | 310 | "delete-incomplete", |
311 | gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"), | 311 | gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"), |
312 | &delete_incomplete), | 312 | &delete_incomplete), |
313 | 313 | ||
314 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 314 | GNUNET_GETOPT_option_flag ('n', |
315 | "no-network", | 315 | "no-network", |
316 | gettext_noop ("only search the local peer (no P2P network search)"), | 316 | gettext_noop ("only search the local peer (no P2P network search)"), |
317 | &local_only), | 317 | &local_only), |
318 | 318 | ||
319 | GNUNET_GETOPT_OPTION_STRING ('o', | 319 | GNUNET_GETOPT_option_string ('o', |
320 | "output", | 320 | "output", |
321 | "FILENAME", | 321 | "FILENAME", |
322 | gettext_noop ("write the file to FILENAME"), | 322 | gettext_noop ("write the file to FILENAME"), |
323 | &filename), | 323 | &filename), |
324 | 324 | ||
325 | GNUNET_GETOPT_OPTION_SET_UINT ('p', | 325 | GNUNET_GETOPT_option_uint ('p', |
326 | "parallelism", | 326 | "parallelism", |
327 | "DOWNLOADS", | 327 | "DOWNLOADS", |
328 | gettext_noop ("set the maximum number of parallel downloads that is allowed"), | 328 | gettext_noop ("set the maximum number of parallel downloads that is allowed"), |
329 | ¶llelism), | 329 | ¶llelism), |
330 | 330 | ||
331 | GNUNET_GETOPT_OPTION_SET_UINT ('r', | 331 | GNUNET_GETOPT_option_uint ('r', |
332 | "request-parallelism", | 332 | "request-parallelism", |
333 | "REQUESTS", | 333 | "REQUESTS", |
334 | gettext_noop ("set the maximum number of parallel requests for blocks that is allowed"), | 334 | gettext_noop ("set the maximum number of parallel requests for blocks that is allowed"), |
335 | &request_parallelism), | 335 | &request_parallelism), |
336 | 336 | ||
337 | GNUNET_GETOPT_OPTION_SET_ONE ('R', | 337 | GNUNET_GETOPT_option_flag ('R', |
338 | "recursive", | 338 | "recursive", |
339 | gettext_noop ("download a GNUnet directory recursively"), | 339 | gettext_noop ("download a GNUnet directory recursively"), |
340 | &do_recursive), | 340 | &do_recursive), |
341 | 341 | ||
342 | GNUNET_GETOPT_OPTION_INCREMENT_VALUE ('V', | 342 | GNUNET_GETOPT_option_increment_uint ('V', |
343 | "verbose", | 343 | "verbose", |
344 | gettext_noop ("be verbose (print progress information)"), | 344 | gettext_noop ("be verbose (print progress information)"), |
345 | &verbose), | 345 | &verbose), |
diff --git a/src/fs/gnunet-fs-profiler.c b/src/fs/gnunet-fs-profiler.c index fb99d8f90..ac9f6777f 100644 --- a/src/fs/gnunet-fs-profiler.c +++ b/src/fs/gnunet-fs-profiler.c | |||
@@ -205,19 +205,19 @@ main (int argc, char *const *argv) | |||
205 | { | 205 | { |
206 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 206 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
207 | 207 | ||
208 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | 208 | GNUNET_GETOPT_option_uint ('n', |
209 | "num-peers", | 209 | "num-peers", |
210 | "COUNT", | 210 | "COUNT", |
211 | gettext_noop ("run the experiment with COUNT peers"), | 211 | gettext_noop ("run the experiment with COUNT peers"), |
212 | &num_peers), | 212 | &num_peers), |
213 | 213 | ||
214 | GNUNET_GETOPT_OPTION_STRING ('H', | 214 | GNUNET_GETOPT_option_string ('H', |
215 | "hosts", | 215 | "hosts", |
216 | "HOSTFILE", | 216 | "HOSTFILE", |
217 | gettext_noop ("specifies name of a file with the HOSTS the testbed should use"), | 217 | gettext_noop ("specifies name of a file with the HOSTS the testbed should use"), |
218 | &host_filename), | 218 | &host_filename), |
219 | 219 | ||
220 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', | 220 | GNUNET_GETOPT_option_relative_time ('t', |
221 | "timeout", | 221 | "timeout", |
222 | "DELAY", | 222 | "DELAY", |
223 | gettext_noop ("automatically terminate experiment after DELAY"), | 223 | gettext_noop ("automatically terminate experiment after DELAY"), |
diff --git a/src/fs/gnunet-fs.c b/src/fs/gnunet-fs.c index 2b24b7124..ad8f223ff 100644 --- a/src/fs/gnunet-fs.c +++ b/src/fs/gnunet-fs.c | |||
@@ -114,12 +114,12 @@ main (int argc, char *const *argv) | |||
114 | { | 114 | { |
115 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 115 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
116 | 116 | ||
117 | GNUNET_GETOPT_OPTION_SET_ONE ('i', | 117 | GNUNET_GETOPT_option_flag ('i', |
118 | "list-indexed", | 118 | "list-indexed", |
119 | gettext_noop ("print a list of all indexed files"), | 119 | gettext_noop ("print a list of all indexed files"), |
120 | &list_indexed_files), | 120 | &list_indexed_files), |
121 | 121 | ||
122 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 122 | GNUNET_GETOPT_option_verbose (&verbose), |
123 | GNUNET_GETOPT_OPTION_END | 123 | GNUNET_GETOPT_OPTION_END |
124 | }; | 124 | }; |
125 | 125 | ||
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c index 2229e45e7..395aad7db 100644 --- a/src/fs/gnunet-publish.c +++ b/src/fs/gnunet-publish.c | |||
@@ -894,24 +894,24 @@ int | |||
894 | main (int argc, char *const *argv) | 894 | main (int argc, char *const *argv) |
895 | { | 895 | { |
896 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 896 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
897 | GNUNET_GETOPT_OPTION_SET_UINT ('a', | 897 | GNUNET_GETOPT_option_uint ('a', |
898 | "anonymity", | 898 | "anonymity", |
899 | "LEVEL", | 899 | "LEVEL", |
900 | gettext_noop ("set the desired LEVEL of sender-anonymity"), | 900 | gettext_noop ("set the desired LEVEL of sender-anonymity"), |
901 | &bo.anonymity_level), | 901 | &bo.anonymity_level), |
902 | 902 | ||
903 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 903 | GNUNET_GETOPT_option_flag ('d', |
904 | "disable-creation-time", | 904 | "disable-creation-time", |
905 | gettext_noop ("disable adding the creation time to the " | 905 | gettext_noop ("disable adding the creation time to the " |
906 | "metadata of the uploaded file"), | 906 | "metadata of the uploaded file"), |
907 | &do_disable_creation_time), | 907 | &do_disable_creation_time), |
908 | 908 | ||
909 | GNUNET_GETOPT_OPTION_SET_ONE ('D', | 909 | GNUNET_GETOPT_option_flag ('D', |
910 | "disable-extractor", | 910 | "disable-extractor", |
911 | gettext_noop ("do not use libextractor to add keywords or metadata"), | 911 | gettext_noop ("do not use libextractor to add keywords or metadata"), |
912 | &disable_extractor), | 912 | &disable_extractor), |
913 | 913 | ||
914 | GNUNET_GETOPT_OPTION_SET_ONE ('e', | 914 | GNUNET_GETOPT_option_flag ('e', |
915 | "extract", | 915 | "extract", |
916 | gettext_noop ("print list of extracted keywords that would " | 916 | gettext_noop ("print list of extracted keywords that would " |
917 | "be used, but do not perform upload"), | 917 | "be used, but do not perform upload"), |
@@ -930,60 +930,60 @@ main (int argc, char *const *argv) | |||
930 | gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), | 930 | gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), |
931 | &meta), | 931 | &meta), |
932 | 932 | ||
933 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 933 | GNUNET_GETOPT_option_flag ('n', |
934 | "noindex", | 934 | "noindex", |
935 | gettext_noop ("do not index, perform full insertion (stores " | 935 | gettext_noop ("do not index, perform full insertion (stores " |
936 | "entire file in encrypted form in GNUnet database)"), | 936 | "entire file in encrypted form in GNUnet database)"), |
937 | &do_insert), | 937 | &do_insert), |
938 | 938 | ||
939 | GNUNET_GETOPT_OPTION_STRING ('N', | 939 | GNUNET_GETOPT_option_string ('N', |
940 | "next", | 940 | "next", |
941 | "ID", | 941 | "ID", |
942 | gettext_noop ("specify ID of an updated version to be " | 942 | gettext_noop ("specify ID of an updated version to be " |
943 | "published in the future (for namespace insertions only)"), | 943 | "published in the future (for namespace insertions only)"), |
944 | &next_id), | 944 | &next_id), |
945 | 945 | ||
946 | GNUNET_GETOPT_OPTION_SET_UINT ('p', | 946 | GNUNET_GETOPT_option_uint ('p', |
947 | "priority", | 947 | "priority", |
948 | "PRIORITY", | 948 | "PRIORITY", |
949 | gettext_noop ("specify the priority of the content"), | 949 | gettext_noop ("specify the priority of the content"), |
950 | &bo.content_priority), | 950 | &bo.content_priority), |
951 | 951 | ||
952 | GNUNET_GETOPT_OPTION_STRING ('P', | 952 | GNUNET_GETOPT_option_string ('P', |
953 | "pseudonym", | 953 | "pseudonym", |
954 | "NAME", | 954 | "NAME", |
955 | gettext_noop ("publish the files under the pseudonym " | 955 | gettext_noop ("publish the files under the pseudonym " |
956 | "NAME (place file into namespace)"), | 956 | "NAME (place file into namespace)"), |
957 | &pseudonym), | 957 | &pseudonym), |
958 | 958 | ||
959 | GNUNET_GETOPT_OPTION_SET_UINT ('r', | 959 | GNUNET_GETOPT_option_uint ('r', |
960 | "replication", | 960 | "replication", |
961 | "LEVEL", | 961 | "LEVEL", |
962 | gettext_noop ("set the desired replication LEVEL"), | 962 | gettext_noop ("set the desired replication LEVEL"), |
963 | &bo.replication_level), | 963 | &bo.replication_level), |
964 | 964 | ||
965 | 965 | ||
966 | GNUNET_GETOPT_OPTION_SET_ONE ('s', | 966 | GNUNET_GETOPT_option_flag ('s', |
967 | "simulate-only", | 967 | "simulate-only", |
968 | gettext_noop ("only simulate the process but do not do " | 968 | gettext_noop ("only simulate the process but do not do " |
969 | "any actual publishing (useful to compute URIs)"), | 969 | "any actual publishing (useful to compute URIs)"), |
970 | &do_simulate), | 970 | &do_simulate), |
971 | 971 | ||
972 | GNUNET_GETOPT_OPTION_STRING ('t', | 972 | GNUNET_GETOPT_option_string ('t', |
973 | "this", | 973 | "this", |
974 | "ID", | 974 | "ID", |
975 | gettext_noop ("set the ID of this version of the publication " | 975 | gettext_noop ("set the ID of this version of the publication " |
976 | "(for namespace insertions only)"), | 976 | "(for namespace insertions only)"), |
977 | &this_id), | 977 | &this_id), |
978 | 978 | ||
979 | GNUNET_GETOPT_OPTION_STRING ('u', | 979 | GNUNET_GETOPT_option_string ('u', |
980 | "uri", | 980 | "uri", |
981 | "URI", | 981 | "URI", |
982 | gettext_noop ("URI to be published (can be used instead of passing a " | 982 | gettext_noop ("URI to be published (can be used instead of passing a " |
983 | "file to add keywords to the file with the respective URI)"), | 983 | "file to add keywords to the file with the respective URI)"), |
984 | &uri_string), | 984 | &uri_string), |
985 | 985 | ||
986 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 986 | GNUNET_GETOPT_option_verbose (&verbose), |
987 | 987 | ||
988 | GNUNET_GETOPT_OPTION_END | 988 | GNUNET_GETOPT_OPTION_END |
989 | }; | 989 | }; |
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c index 22e790cf3..ef1743436 100644 --- a/src/fs/gnunet-search.c +++ b/src/fs/gnunet-search.c | |||
@@ -307,34 +307,34 @@ main (int argc, char *const *argv) | |||
307 | { | 307 | { |
308 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 308 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
309 | 309 | ||
310 | GNUNET_GETOPT_OPTION_SET_UINT ('a', | 310 | GNUNET_GETOPT_option_uint ('a', |
311 | "anonymity", | 311 | "anonymity", |
312 | "LEVEL", | 312 | "LEVEL", |
313 | gettext_noop ("set the desired LEVEL of receiver-anonymity"), | 313 | gettext_noop ("set the desired LEVEL of receiver-anonymity"), |
314 | &anonymity), | 314 | &anonymity), |
315 | 315 | ||
316 | 316 | ||
317 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 317 | GNUNET_GETOPT_option_flag ('n', |
318 | "no-network", | 318 | "no-network", |
319 | gettext_noop ("only search the local peer (no P2P network search)"), | 319 | gettext_noop ("only search the local peer (no P2P network search)"), |
320 | &local_only), | 320 | &local_only), |
321 | 321 | ||
322 | GNUNET_GETOPT_OPTION_STRING ('o', | 322 | GNUNET_GETOPT_option_string ('o', |
323 | "output", | 323 | "output", |
324 | "PREFIX", | 324 | "PREFIX", |
325 | gettext_noop ("write search results to file starting with PREFIX"), | 325 | gettext_noop ("write search results to file starting with PREFIX"), |
326 | &output_filename), | 326 | &output_filename), |
327 | 327 | ||
328 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', | 328 | GNUNET_GETOPT_option_relative_time ('t', |
329 | "timeout", | 329 | "timeout", |
330 | "DELAY", | 330 | "DELAY", |
331 | gettext_noop ("automatically terminate search after DELAY"), | 331 | gettext_noop ("automatically terminate search after DELAY"), |
332 | &timeout), | 332 | &timeout), |
333 | 333 | ||
334 | 334 | ||
335 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 335 | GNUNET_GETOPT_option_verbose (&verbose), |
336 | 336 | ||
337 | GNUNET_GETOPT_OPTION_SET_UINT ('N', | 337 | GNUNET_GETOPT_option_uint ('N', |
338 | "results", | 338 | "results", |
339 | "VALUE", | 339 | "VALUE", |
340 | gettext_noop ("automatically terminate search " | 340 | gettext_noop ("automatically terminate search " |
diff --git a/src/fs/gnunet-unindex.c b/src/fs/gnunet-unindex.c index c53a85fb4..213d2b332 100644 --- a/src/fs/gnunet-unindex.c +++ b/src/fs/gnunet-unindex.c | |||
@@ -164,7 +164,7 @@ main (int argc, char *const *argv) | |||
164 | { | 164 | { |
165 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 165 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
166 | 166 | ||
167 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 167 | GNUNET_GETOPT_option_verbose (&verbose), |
168 | 168 | ||
169 | GNUNET_GETOPT_OPTION_END | 169 | GNUNET_GETOPT_OPTION_END |
170 | }; | 170 | }; |
diff --git a/src/gns/gnunet-bcd.c b/src/gns/gnunet-bcd.c index fb7ac10c1..0746d5c57 100644 --- a/src/gns/gnunet-bcd.c +++ b/src/gns/gnunet-bcd.c | |||
@@ -516,7 +516,7 @@ main (int argc, char *const *argv) | |||
516 | { | 516 | { |
517 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 517 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
518 | 518 | ||
519 | GNUNET_GETOPT_OPTION_SET_UINT ('p', | 519 | GNUNET_GETOPT_option_uint ('p', |
520 | "port", | 520 | "port", |
521 | "PORT", | 521 | "PORT", |
522 | gettext_noop ("Run HTTP serve on port PORT (default is 8888)"), | 522 | gettext_noop ("Run HTTP serve on port PORT (default is 8888)"), |
diff --git a/src/gns/gnunet-dns2gns.c b/src/gns/gnunet-dns2gns.c index c9b4bde9c..424677d14 100644 --- a/src/gns/gnunet-dns2gns.c +++ b/src/gns/gnunet-dns2gns.c | |||
@@ -778,31 +778,31 @@ main (int argc, | |||
778 | { | 778 | { |
779 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 779 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
780 | 780 | ||
781 | GNUNET_GETOPT_OPTION_STRING ('d', | 781 | GNUNET_GETOPT_option_string ('d', |
782 | "dns", | 782 | "dns", |
783 | "IP", | 783 | "IP", |
784 | gettext_noop ("IP of recursive DNS resolver to use (required)"), | 784 | gettext_noop ("IP of recursive DNS resolver to use (required)"), |
785 | &dns_ip), | 785 | &dns_ip), |
786 | 786 | ||
787 | GNUNET_GETOPT_OPTION_STRING ('f', | 787 | GNUNET_GETOPT_option_string ('f', |
788 | "fcfs", | 788 | "fcfs", |
789 | "NAME", | 789 | "NAME", |
790 | gettext_noop ("Authoritative FCFS suffix to use (optional); default: fcfs.zkey.eu"), | 790 | gettext_noop ("Authoritative FCFS suffix to use (optional); default: fcfs.zkey.eu"), |
791 | &fcfs_suffix), | 791 | &fcfs_suffix), |
792 | 792 | ||
793 | GNUNET_GETOPT_OPTION_STRING ('s', | 793 | GNUNET_GETOPT_option_string ('s', |
794 | "suffix", | 794 | "suffix", |
795 | "SUFFIX", | 795 | "SUFFIX", |
796 | gettext_noop ("Authoritative DNS suffix to use (optional); default: zkey.eu"), | 796 | gettext_noop ("Authoritative DNS suffix to use (optional); default: zkey.eu"), |
797 | &dns_suffix), | 797 | &dns_suffix), |
798 | 798 | ||
799 | GNUNET_GETOPT_OPTION_SET_UINT ('p', | 799 | GNUNET_GETOPT_option_uint ('p', |
800 | "port", | 800 | "port", |
801 | "UDPPORT", | 801 | "UDPPORT", |
802 | gettext_noop ("UDP port to listen on for inbound DNS requests; default: 2853"), | 802 | gettext_noop ("UDP port to listen on for inbound DNS requests; default: 2853"), |
803 | &listen_port), | 803 | &listen_port), |
804 | 804 | ||
805 | GNUNET_GETOPT_OPTION_STRING ('z', | 805 | GNUNET_GETOPT_option_string ('z', |
806 | "zone", | 806 | "zone", |
807 | "PUBLICKEY", | 807 | "PUBLICKEY", |
808 | gettext_noop ("Public key of the GNS zone to use (overrides default)"), | 808 | gettext_noop ("Public key of the GNS zone to use (overrides default)"), |
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 35f42cdec..2a6de1c30 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c | |||
@@ -3263,13 +3263,13 @@ main (int argc, char *const *argv) | |||
3263 | { | 3263 | { |
3264 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 3264 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
3265 | 3265 | ||
3266 | GNUNET_GETOPT_OPTION_SET_ULONG ('p', | 3266 | GNUNET_GETOPT_option_ulong ('p', |
3267 | "port", | 3267 | "port", |
3268 | NULL, | 3268 | NULL, |
3269 | gettext_noop ("listen on specified port (default: 7777)"), | 3269 | gettext_noop ("listen on specified port (default: 7777)"), |
3270 | &port), | 3270 | &port), |
3271 | 3271 | ||
3272 | GNUNET_GETOPT_OPTION_STRING ('a', | 3272 | GNUNET_GETOPT_option_string ('a', |
3273 | "authority", | 3273 | "authority", |
3274 | NULL, | 3274 | NULL, |
3275 | gettext_noop ("pem file to use as CA"), | 3275 | gettext_noop ("pem file to use as CA"), |
diff --git a/src/gns/gnunet-gns.c b/src/gns/gnunet-gns.c index c85ddfe81..c0de0f30c 100644 --- a/src/gns/gnunet-gns.c +++ b/src/gns/gnunet-gns.c | |||
@@ -422,36 +422,36 @@ main (int argc, | |||
422 | { | 422 | { |
423 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 423 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
424 | 424 | ||
425 | GNUNET_GETOPT_OPTION_STRING ('u', | 425 | GNUNET_GETOPT_option_string ('u', |
426 | "lookup", | 426 | "lookup", |
427 | "NAME", | 427 | "NAME", |
428 | gettext_noop ("Lookup a record for the given name"), | 428 | gettext_noop ("Lookup a record for the given name"), |
429 | &lookup_name), | 429 | &lookup_name), |
430 | 430 | ||
431 | GNUNET_GETOPT_OPTION_STRING ('t', | 431 | GNUNET_GETOPT_option_string ('t', |
432 | "type", | 432 | "type", |
433 | "TYPE", | 433 | "TYPE", |
434 | gettext_noop ("Specify the type of the record to lookup"), | 434 | gettext_noop ("Specify the type of the record to lookup"), |
435 | &lookup_type), | 435 | &lookup_type), |
436 | 436 | ||
437 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', | 437 | GNUNET_GETOPT_option_relative_time ('T', |
438 | "timeout", | 438 | "timeout", |
439 | "DELAY", | 439 | "DELAY", |
440 | gettext_noop ("Specify timeout for the lookup"), | 440 | gettext_noop ("Specify timeout for the lookup"), |
441 | &timeout), | 441 | &timeout), |
442 | 442 | ||
443 | GNUNET_GETOPT_OPTION_SET_ONE ('r', | 443 | GNUNET_GETOPT_option_flag ('r', |
444 | "raw", | 444 | "raw", |
445 | gettext_noop ("No unneeded output"), | 445 | gettext_noop ("No unneeded output"), |
446 | &raw), | 446 | &raw), |
447 | 447 | ||
448 | GNUNET_GETOPT_OPTION_STRING ('p', | 448 | GNUNET_GETOPT_option_string ('p', |
449 | "public-key", | 449 | "public-key", |
450 | "PKEY", | 450 | "PKEY", |
451 | gettext_noop ("Specify the public key of the zone to lookup the record in"), | 451 | gettext_noop ("Specify the public key of the zone to lookup the record in"), |
452 | &public_key), | 452 | &public_key), |
453 | 453 | ||
454 | GNUNET_GETOPT_OPTION_STRING ('z', | 454 | GNUNET_GETOPT_option_string ('z', |
455 | "zone", | 455 | "zone", |
456 | "NAME", | 456 | "NAME", |
457 | gettext_noop ("Specify the name of the ego of the zone to lookup the record in"), | 457 | gettext_noop ("Specify the name of the ego of the zone to lookup the record in"), |
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c index 9b4790c32..854340d3d 100644 --- a/src/hostlist/gnunet-daemon-hostlist.c +++ b/src/hostlist/gnunet-daemon-hostlist.c | |||
@@ -371,21 +371,21 @@ main (int argc, char *const *argv) | |||
371 | { | 371 | { |
372 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 372 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
373 | #if HAVE_MHD | 373 | #if HAVE_MHD |
374 | GNUNET_GETOPT_OPTION_SET_ONE ('a', | 374 | GNUNET_GETOPT_option_flag ('a', |
375 | "advertise", | 375 | "advertise", |
376 | gettext_noop ("advertise our hostlist to other peers"), | 376 | gettext_noop ("advertise our hostlist to other peers"), |
377 | &advertising), | 377 | &advertising), |
378 | #endif | 378 | #endif |
379 | GNUNET_GETOPT_OPTION_SET_ONE ('b', | 379 | GNUNET_GETOPT_option_flag ('b', |
380 | "bootstrap", | 380 | "bootstrap", |
381 | gettext_noop ("bootstrap using hostlists (it is highly recommended that you always use this option)"), | 381 | gettext_noop ("bootstrap using hostlists (it is highly recommended that you always use this option)"), |
382 | &bootstrapping), | 382 | &bootstrapping), |
383 | GNUNET_GETOPT_OPTION_SET_ONE ('e', | 383 | GNUNET_GETOPT_option_flag ('e', |
384 | "enable-learning", | 384 | "enable-learning", |
385 | gettext_noop ("enable learning about hostlist servers from other peers"), | 385 | gettext_noop ("enable learning about hostlist servers from other peers"), |
386 | &learning), | 386 | &learning), |
387 | #if HAVE_MHD | 387 | #if HAVE_MHD |
388 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | 388 | GNUNET_GETOPT_option_flag ('p', |
389 | "provide-hostlist", | 389 | "provide-hostlist", |
390 | gettext_noop ("provide a hostlist server"), | 390 | gettext_noop ("provide a hostlist server"), |
391 | &provide_hostlist), | 391 | &provide_hostlist), |
diff --git a/src/identity-provider/gnunet-identity-token.c b/src/identity-provider/gnunet-identity-token.c index 906899ea7..30b63bfc4 100644 --- a/src/identity-provider/gnunet-identity-token.c +++ b/src/identity-provider/gnunet-identity-token.c | |||
@@ -160,13 +160,13 @@ main(int argc, char *const argv[]) | |||
160 | { | 160 | { |
161 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 161 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
162 | 162 | ||
163 | GNUNET_GETOPT_OPTION_STRING ('t', | 163 | GNUNET_GETOPT_option_string ('t', |
164 | "token", | 164 | "token", |
165 | NULL, | 165 | NULL, |
166 | gettext_noop ("GNUid token"), | 166 | gettext_noop ("GNUid token"), |
167 | &token), | 167 | &token), |
168 | 168 | ||
169 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | 169 | GNUNET_GETOPT_option_flag ('p', |
170 | "print", | 170 | "print", |
171 | gettext_noop ("Print token contents"), | 171 | gettext_noop ("Print token contents"), |
172 | &print_token), | 172 | &print_token), |
diff --git a/src/identity/gnunet-identity.c b/src/identity/gnunet-identity.c index 5c457ef5d..9b66a1bc7 100644 --- a/src/identity/gnunet-identity.c +++ b/src/identity/gnunet-identity.c | |||
@@ -350,35 +350,35 @@ int | |||
350 | main (int argc, char *const *argv) | 350 | main (int argc, char *const *argv) |
351 | { | 351 | { |
352 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 352 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
353 | GNUNET_GETOPT_OPTION_STRING ('C', | 353 | GNUNET_GETOPT_option_string ('C', |
354 | "create", | 354 | "create", |
355 | "NAME", | 355 | "NAME", |
356 | gettext_noop ("create ego NAME"), | 356 | gettext_noop ("create ego NAME"), |
357 | &create_ego), | 357 | &create_ego), |
358 | 358 | ||
359 | GNUNET_GETOPT_OPTION_STRING ('D', | 359 | GNUNET_GETOPT_option_string ('D', |
360 | "delete", | 360 | "delete", |
361 | "NAME", | 361 | "NAME", |
362 | gettext_noop ("delete ego NAME "), | 362 | gettext_noop ("delete ego NAME "), |
363 | &delete_ego), | 363 | &delete_ego), |
364 | 364 | ||
365 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 365 | GNUNET_GETOPT_option_flag ('d', |
366 | "display", | 366 | "display", |
367 | gettext_noop ("display all egos"), | 367 | gettext_noop ("display all egos"), |
368 | &list), | 368 | &list), |
369 | 369 | ||
370 | GNUNET_GETOPT_OPTION_STRING ('e', | 370 | GNUNET_GETOPT_option_string ('e', |
371 | "ego", | 371 | "ego", |
372 | "NAME", | 372 | "NAME", |
373 | gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -s)"), | 373 | gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -s)"), |
374 | &set_ego), | 374 | &set_ego), |
375 | 375 | ||
376 | GNUNET_GETOPT_OPTION_SET_ONE ('m', | 376 | GNUNET_GETOPT_option_flag ('m', |
377 | "monitor", | 377 | "monitor", |
378 | gettext_noop ("run in monitor mode egos"), | 378 | gettext_noop ("run in monitor mode egos"), |
379 | &monitor), | 379 | &monitor), |
380 | 380 | ||
381 | GNUNET_GETOPT_OPTION_STRING ('s', | 381 | GNUNET_GETOPT_option_string ('s', |
382 | "set", | 382 | "set", |
383 | "SUBSYSTEM", | 383 | "SUBSYSTEM", |
384 | gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -e)"), | 384 | gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -e)"), |
diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h index c2bd72340..f707bb091 100644 --- a/src/include/gnunet_getopt_lib.h +++ b/src/include/gnunet_getopt_lib.h | |||
@@ -161,7 +161,7 @@ struct GNUNET_GETOPT_CommandLineOption | |||
161 | * @param about string with brief description of the application | 161 | * @param about string with brief description of the application |
162 | */ | 162 | */ |
163 | struct GNUNET_GETOPT_CommandLineOption | 163 | struct GNUNET_GETOPT_CommandLineOption |
164 | GNUNET_GETOPT_OPTION_HELP (const char *about); | 164 | GNUNET_GETOPT_option_help (const char *about); |
165 | 165 | ||
166 | 166 | ||
167 | /** | 167 | /** |
@@ -171,7 +171,7 @@ GNUNET_GETOPT_OPTION_HELP (const char *about); | |||
171 | * @param version string with the version number | 171 | * @param version string with the version number |
172 | */ | 172 | */ |
173 | struct GNUNET_GETOPT_CommandLineOption | 173 | struct GNUNET_GETOPT_CommandLineOption |
174 | GNUNET_GETOPT_OPTION_VERSION (const char *version); | 174 | GNUNET_GETOPT_option_version (const char *version); |
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
@@ -181,7 +181,7 @@ GNUNET_GETOPT_OPTION_VERSION (const char *version); | |||
181 | * @param[out] logfn set to the name of the logfile | 181 | * @param[out] logfn set to the name of the logfile |
182 | */ | 182 | */ |
183 | struct GNUNET_GETOPT_CommandLineOption | 183 | struct GNUNET_GETOPT_CommandLineOption |
184 | GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); | 184 | GNUNET_GETOPT_option_logfile (char **logfn); |
185 | 185 | ||
186 | 186 | ||
187 | /** | 187 | /** |
@@ -194,7 +194,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); | |||
194 | * @param[out] str set to the string | 194 | * @param[out] str set to the string |
195 | */ | 195 | */ |
196 | struct GNUNET_GETOPT_CommandLineOption | 196 | struct GNUNET_GETOPT_CommandLineOption |
197 | GNUNET_GETOPT_OPTION_STRING (char shortName, | 197 | GNUNET_GETOPT_option_string (char shortName, |
198 | const char *name, | 198 | const char *name, |
199 | const char *argumentHelp, | 199 | const char *argumentHelp, |
200 | const char *description, | 200 | const char *description, |
@@ -210,7 +210,7 @@ GNUNET_GETOPT_OPTION_STRING (char shortName, | |||
210 | * @param[out] str set to the string | 210 | * @param[out] str set to the string |
211 | */ | 211 | */ |
212 | struct GNUNET_GETOPT_CommandLineOption | 212 | struct GNUNET_GETOPT_CommandLineOption |
213 | GNUNET_GETOPT_OPTION_FILENAME (char shortName, | 213 | GNUNET_GETOPT_option_filename (char shortName, |
214 | const char *name, | 214 | const char *name, |
215 | const char *argumentHelp, | 215 | const char *argumentHelp, |
216 | const char *description, | 216 | const char *description, |
@@ -229,7 +229,7 @@ GNUNET_GETOPT_OPTION_FILENAME (char shortName, | |||
229 | * @param val_size size of @a val in bytes | 229 | * @param val_size size of @a val in bytes |
230 | */ | 230 | */ |
231 | struct GNUNET_GETOPT_CommandLineOption | 231 | struct GNUNET_GETOPT_CommandLineOption |
232 | GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, | 232 | GNUNET_GETOPT_option_base32_fixed_size (char shortName, |
233 | const char *name, | 233 | const char *name, |
234 | const char *argumentHelp, | 234 | const char *argumentHelp, |
235 | const char *description, | 235 | const char *description, |
@@ -249,8 +249,8 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, | |||
249 | * @param[out] val binary value decoded from Crockford Base32-encoded argument; | 249 | * @param[out] val binary value decoded from Crockford Base32-encoded argument; |
250 | * size is determined by type (sizeof (*val)). | 250 | * size is determined by type (sizeof (*val)). |
251 | */ | 251 | */ |
252 | #define GNUNET_GETOPT_OPTION_SET_BASE32_AUTO(shortName,name,argumentHelp,description,val) \ | 252 | #define GNUNET_GETOPT_option_base32_auto(shortName,name,argumentHelp,description,val) \ |
253 | GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE(shortName,name,argumentHelp,description,val,sizeof(*val)) | 253 | GNUNET_GETOPT_option_base32_fixed_size(shortName,name,argumentHelp,description,val,sizeof(*val)) |
254 | 254 | ||
255 | 255 | ||
256 | /** | 256 | /** |
@@ -263,7 +263,7 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, | |||
263 | * @param[out] val set to 1 if the option is present | 263 | * @param[out] val set to 1 if the option is present |
264 | */ | 264 | */ |
265 | struct GNUNET_GETOPT_CommandLineOption | 265 | struct GNUNET_GETOPT_CommandLineOption |
266 | GNUNET_GETOPT_OPTION_SET_ONE (char shortName, | 266 | GNUNET_GETOPT_option_flag (char shortName, |
267 | const char *name, | 267 | const char *name, |
268 | const char *description, | 268 | const char *description, |
269 | int *val); | 269 | int *val); |
@@ -279,7 +279,7 @@ GNUNET_GETOPT_OPTION_SET_ONE (char shortName, | |||
279 | * @param[out] val set to the value specified at the command line | 279 | * @param[out] val set to the value specified at the command line |
280 | */ | 280 | */ |
281 | struct GNUNET_GETOPT_CommandLineOption | 281 | struct GNUNET_GETOPT_CommandLineOption |
282 | GNUNET_GETOPT_OPTION_SET_UINT (char shortName, | 282 | GNUNET_GETOPT_option_uint (char shortName, |
283 | const char *name, | 283 | const char *name, |
284 | const char *argumentHelp, | 284 | const char *argumentHelp, |
285 | const char *description, | 285 | const char *description, |
@@ -296,7 +296,7 @@ GNUNET_GETOPT_OPTION_SET_UINT (char shortName, | |||
296 | * @param[out] val set to the value specified at the command line | 296 | * @param[out] val set to the value specified at the command line |
297 | */ | 297 | */ |
298 | struct GNUNET_GETOPT_CommandLineOption | 298 | struct GNUNET_GETOPT_CommandLineOption |
299 | GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, | 299 | GNUNET_GETOPT_option_ulong (char shortName, |
300 | const char *name, | 300 | const char *name, |
301 | const char *argumentHelp, | 301 | const char *argumentHelp, |
302 | const char *description, | 302 | const char *description, |
@@ -314,7 +314,7 @@ GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, | |||
314 | * @param[out] val set to the time specified at the command line | 314 | * @param[out] val set to the time specified at the command line |
315 | */ | 315 | */ |
316 | struct GNUNET_GETOPT_CommandLineOption | 316 | struct GNUNET_GETOPT_CommandLineOption |
317 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, | 317 | GNUNET_GETOPT_option_relative_time (char shortName, |
318 | const char *name, | 318 | const char *name, |
319 | const char *argumentHelp, | 319 | const char *argumentHelp, |
320 | const char *description, | 320 | const char *description, |
@@ -332,7 +332,7 @@ GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, | |||
332 | * @param[out] val set to the time specified at the command line | 332 | * @param[out] val set to the time specified at the command line |
333 | */ | 333 | */ |
334 | struct GNUNET_GETOPT_CommandLineOption | 334 | struct GNUNET_GETOPT_CommandLineOption |
335 | GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, | 335 | GNUNET_GETOPT_option_absolute_time (char shortName, |
336 | const char *name, | 336 | const char *name, |
337 | const char *argumentHelp, | 337 | const char *argumentHelp, |
338 | const char *description, | 338 | const char *description, |
@@ -349,7 +349,7 @@ GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, | |||
349 | * @param[out] val set to 1 if the option is present | 349 | * @param[out] val set to 1 if the option is present |
350 | */ | 350 | */ |
351 | struct GNUNET_GETOPT_CommandLineOption | 351 | struct GNUNET_GETOPT_CommandLineOption |
352 | GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, | 352 | GNUNET_GETOPT_option_increment_uint (char shortName, |
353 | const char *name, | 353 | const char *name, |
354 | const char *description, | 354 | const char *description, |
355 | unsigned int *val); | 355 | unsigned int *val); |
@@ -362,7 +362,7 @@ GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, | |||
362 | * @param[out] level set to the log level | 362 | * @param[out] level set to the log level |
363 | */ | 363 | */ |
364 | struct GNUNET_GETOPT_CommandLineOption | 364 | struct GNUNET_GETOPT_CommandLineOption |
365 | GNUNET_GETOPT_OPTION_LOGLEVEL (char **level); | 365 | GNUNET_GETOPT_option_loglevel (char **level); |
366 | 366 | ||
367 | 367 | ||
368 | /** | 368 | /** |
@@ -372,7 +372,7 @@ GNUNET_GETOPT_OPTION_LOGLEVEL (char **level); | |||
372 | * @param[out] level set to the verbosity level | 372 | * @param[out] level set to the verbosity level |
373 | */ | 373 | */ |
374 | struct GNUNET_GETOPT_CommandLineOption | 374 | struct GNUNET_GETOPT_CommandLineOption |
375 | GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level); | 375 | GNUNET_GETOPT_option_verbose (unsigned int *level); |
376 | 376 | ||
377 | 377 | ||
378 | /** | 378 | /** |
@@ -381,7 +381,7 @@ GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level); | |||
381 | * @param[out] logfn set to the name of the logfile | 381 | * @param[out] logfn set to the name of the logfile |
382 | */ | 382 | */ |
383 | struct GNUNET_GETOPT_CommandLineOption | 383 | struct GNUNET_GETOPT_CommandLineOption |
384 | GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); | 384 | GNUNET_GETOPT_option_logfile (char **logfn); |
385 | 385 | ||
386 | 386 | ||
387 | /** | 387 | /** |
@@ -390,7 +390,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); | |||
390 | * @param[out] fn set to the name of the configuration file | 390 | * @param[out] fn set to the name of the configuration file |
391 | */ | 391 | */ |
392 | struct GNUNET_GETOPT_CommandLineOption | 392 | struct GNUNET_GETOPT_CommandLineOption |
393 | GNUNET_GETOPT_OPTION_CFG_FILE (char **fn); | 393 | GNUNET_GETOPT_option_cfgfile (char **fn); |
394 | 394 | ||
395 | 395 | ||
396 | /** | 396 | /** |
@@ -400,7 +400,7 @@ GNUNET_GETOPT_OPTION_CFG_FILE (char **fn); | |||
400 | * @return @a opt with the mandatory flag set. | 400 | * @return @a opt with the mandatory flag set. |
401 | */ | 401 | */ |
402 | struct GNUNET_GETOPT_CommandLineOption | 402 | struct GNUNET_GETOPT_CommandLineOption |
403 | GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt); | 403 | GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt); |
404 | 404 | ||
405 | 405 | ||
406 | /** | 406 | /** |
diff --git a/src/namecache/gnunet-namecache.c b/src/namecache/gnunet-namecache.c index 2410c9b3c..d867138e4 100644 --- a/src/namecache/gnunet-namecache.c +++ b/src/namecache/gnunet-namecache.c | |||
@@ -226,13 +226,13 @@ int | |||
226 | main (int argc, char *const *argv) | 226 | main (int argc, char *const *argv) |
227 | { | 227 | { |
228 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 228 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
229 | GNUNET_GETOPT_OPTION_STRING ('n', | 229 | GNUNET_GETOPT_option_string ('n', |
230 | "name", | 230 | "name", |
231 | "NAME", | 231 | "NAME", |
232 | gettext_noop ("name of the record to add/delete/display"), | 232 | gettext_noop ("name of the record to add/delete/display"), |
233 | &name), | 233 | &name), |
234 | 234 | ||
235 | GNUNET_GETOPT_OPTION_STRING ('z', | 235 | GNUNET_GETOPT_option_string ('z', |
236 | "zone", | 236 | "zone", |
237 | "PKEY", | 237 | "PKEY", |
238 | gettext_noop ("spezifies the public key of the zone to look in"), | 238 | gettext_noop ("spezifies the public key of the zone to look in"), |
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c index 2ce3741f8..dcb9dd678 100644 --- a/src/namestore/gnunet-namestore.c +++ b/src/namestore/gnunet-namestore.c | |||
@@ -1132,45 +1132,45 @@ main (int argc, | |||
1132 | 1132 | ||
1133 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 1133 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1134 | 1134 | ||
1135 | GNUNET_GETOPT_OPTION_SET_ONE ('a', | 1135 | GNUNET_GETOPT_option_flag ('a', |
1136 | "add", | 1136 | "add", |
1137 | gettext_noop ("add record"), | 1137 | gettext_noop ("add record"), |
1138 | &add), | 1138 | &add), |
1139 | 1139 | ||
1140 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 1140 | GNUNET_GETOPT_option_flag ('d', |
1141 | "delete", | 1141 | "delete", |
1142 | gettext_noop ("delete record"), | 1142 | gettext_noop ("delete record"), |
1143 | &del), | 1143 | &del), |
1144 | 1144 | ||
1145 | GNUNET_GETOPT_OPTION_SET_ONE ('D', | 1145 | GNUNET_GETOPT_option_flag ('D', |
1146 | "display", | 1146 | "display", |
1147 | gettext_noop ("display records"), | 1147 | gettext_noop ("display records"), |
1148 | &list), | 1148 | &list), |
1149 | 1149 | ||
1150 | GNUNET_GETOPT_OPTION_STRING ('e', | 1150 | GNUNET_GETOPT_option_string ('e', |
1151 | "expiration", | 1151 | "expiration", |
1152 | "TIME", | 1152 | "TIME", |
1153 | gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), | 1153 | gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), |
1154 | &expirationstring), | 1154 | &expirationstring), |
1155 | 1155 | ||
1156 | GNUNET_GETOPT_OPTION_STRING ('i', | 1156 | GNUNET_GETOPT_option_string ('i', |
1157 | "nick", | 1157 | "nick", |
1158 | "NICKNAME", | 1158 | "NICKNAME", |
1159 | gettext_noop ("set the desired nick name for the zone"), | 1159 | gettext_noop ("set the desired nick name for the zone"), |
1160 | &nickstring), | 1160 | &nickstring), |
1161 | 1161 | ||
1162 | GNUNET_GETOPT_OPTION_SET_ONE ('m', | 1162 | GNUNET_GETOPT_option_flag ('m', |
1163 | "monitor", | 1163 | "monitor", |
1164 | gettext_noop ("monitor changes in the namestore"), | 1164 | gettext_noop ("monitor changes in the namestore"), |
1165 | &monitor), | 1165 | &monitor), |
1166 | 1166 | ||
1167 | GNUNET_GETOPT_OPTION_STRING ('n', | 1167 | GNUNET_GETOPT_option_string ('n', |
1168 | "name", | 1168 | "name", |
1169 | "NAME", | 1169 | "NAME", |
1170 | gettext_noop ("name of the record to add/delete/display"), | 1170 | gettext_noop ("name of the record to add/delete/display"), |
1171 | &name), | 1171 | &name), |
1172 | 1172 | ||
1173 | GNUNET_GETOPT_OPTION_STRING ('r', | 1173 | GNUNET_GETOPT_option_string ('r', |
1174 | "reverse", | 1174 | "reverse", |
1175 | "PKEY", | 1175 | "PKEY", |
1176 | gettext_noop ("determine our name for the given PKEY"), | 1176 | gettext_noop ("determine our name for the given PKEY"), |
@@ -1178,35 +1178,35 @@ main (int argc, | |||
1178 | 1178 | ||
1179 | 1179 | ||
1180 | 1180 | ||
1181 | GNUNET_GETOPT_OPTION_STRING ('t', | 1181 | GNUNET_GETOPT_option_string ('t', |
1182 | "type", | 1182 | "type", |
1183 | "TYPE", | 1183 | "TYPE", |
1184 | gettext_noop ("type of the record to add/delete/display"), | 1184 | gettext_noop ("type of the record to add/delete/display"), |
1185 | &typestring), | 1185 | &typestring), |
1186 | 1186 | ||
1187 | GNUNET_GETOPT_OPTION_STRING ('u', | 1187 | GNUNET_GETOPT_option_string ('u', |
1188 | "uri", | 1188 | "uri", |
1189 | "URI", | 1189 | "URI", |
1190 | gettext_noop ("URI to import into our zone"), | 1190 | gettext_noop ("URI to import into our zone"), |
1191 | &uri), | 1191 | &uri), |
1192 | 1192 | ||
1193 | GNUNET_GETOPT_OPTION_STRING ('V', | 1193 | GNUNET_GETOPT_option_string ('V', |
1194 | "value", | 1194 | "value", |
1195 | "VALUE", | 1195 | "VALUE", |
1196 | gettext_noop ("value of the record to add/delete"), | 1196 | gettext_noop ("value of the record to add/delete"), |
1197 | &value), | 1197 | &value), |
1198 | 1198 | ||
1199 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | 1199 | GNUNET_GETOPT_option_flag ('p', |
1200 | "public", | 1200 | "public", |
1201 | gettext_noop ("create or list public record"), | 1201 | gettext_noop ("create or list public record"), |
1202 | &is_public), | 1202 | &is_public), |
1203 | 1203 | ||
1204 | GNUNET_GETOPT_OPTION_SET_ONE ('s', | 1204 | GNUNET_GETOPT_option_flag ('s', |
1205 | "shadow", | 1205 | "shadow", |
1206 | gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), | 1206 | gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), |
1207 | &is_shadow), | 1207 | &is_shadow), |
1208 | 1208 | ||
1209 | GNUNET_GETOPT_OPTION_STRING ('z', | 1209 | GNUNET_GETOPT_option_string ('z', |
1210 | "zone", | 1210 | "zone", |
1211 | "EGO", | 1211 | "EGO", |
1212 | gettext_noop ("name of the ego controlling the zone"), | 1212 | gettext_noop ("name of the ego controlling the zone"), |
diff --git a/src/nat-auto/gnunet-nat-auto.c b/src/nat-auto/gnunet-nat-auto.c index 8b281d1ab..7d09253b8 100644 --- a/src/nat-auto/gnunet-nat-auto.c +++ b/src/nat-auto/gnunet-nat-auto.c | |||
@@ -340,28 +340,28 @@ main (int argc, | |||
340 | char *const argv[]) | 340 | char *const argv[]) |
341 | { | 341 | { |
342 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 342 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
343 | GNUNET_GETOPT_OPTION_SET_ONE ('a', | 343 | GNUNET_GETOPT_option_flag ('a', |
344 | "auto", | 344 | "auto", |
345 | gettext_noop ("run autoconfiguration"), | 345 | gettext_noop ("run autoconfiguration"), |
346 | &do_auto), | 346 | &do_auto), |
347 | 347 | ||
348 | GNUNET_GETOPT_OPTION_STRING ('S', | 348 | GNUNET_GETOPT_option_string ('S', |
349 | "section", | 349 | "section", |
350 | "NAME", | 350 | "NAME", |
351 | gettext_noop ("section name providing the configuration for the adapter"), | 351 | gettext_noop ("section name providing the configuration for the adapter"), |
352 | §ion_name), | 352 | §ion_name), |
353 | 353 | ||
354 | GNUNET_GETOPT_OPTION_SET_ONE ('t', | 354 | GNUNET_GETOPT_option_flag ('t', |
355 | "tcp", | 355 | "tcp", |
356 | gettext_noop ("use TCP"), | 356 | gettext_noop ("use TCP"), |
357 | &use_tcp), | 357 | &use_tcp), |
358 | 358 | ||
359 | GNUNET_GETOPT_OPTION_SET_ONE ('u', | 359 | GNUNET_GETOPT_option_flag ('u', |
360 | "udp", | 360 | "udp", |
361 | gettext_noop ("use UDP"), | 361 | gettext_noop ("use UDP"), |
362 | &use_udp), | 362 | &use_udp), |
363 | 363 | ||
364 | GNUNET_GETOPT_OPTION_SET_ONE ('w', | 364 | GNUNET_GETOPT_option_flag ('w', |
365 | "write", | 365 | "write", |
366 | gettext_noop ("write configuration file (for autoconfiguration)"), | 366 | gettext_noop ("write configuration file (for autoconfiguration)"), |
367 | &write_cfg), | 367 | &write_cfg), |
diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c index 50e0dff0f..b3cf2e946 100644 --- a/src/nat/gnunet-nat.c +++ b/src/nat/gnunet-nat.c | |||
@@ -419,40 +419,40 @@ main (int argc, | |||
419 | { | 419 | { |
420 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 420 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
421 | 421 | ||
422 | GNUNET_GETOPT_OPTION_STRING ('i', | 422 | GNUNET_GETOPT_option_string ('i', |
423 | "in", | 423 | "in", |
424 | "ADDRESS", | 424 | "ADDRESS", |
425 | gettext_noop ("which IP and port are we locally using to bind/listen to"), | 425 | gettext_noop ("which IP and port are we locally using to bind/listen to"), |
426 | &local_addr), | 426 | &local_addr), |
427 | 427 | ||
428 | GNUNET_GETOPT_OPTION_STRING ('r', | 428 | GNUNET_GETOPT_option_string ('r', |
429 | "remote", | 429 | "remote", |
430 | "ADDRESS", | 430 | "ADDRESS", |
431 | gettext_noop ("which remote IP and port should be asked for connection reversal"), | 431 | gettext_noop ("which remote IP and port should be asked for connection reversal"), |
432 | &remote_addr), | 432 | &remote_addr), |
433 | 433 | ||
434 | GNUNET_GETOPT_OPTION_STRING ('S', | 434 | GNUNET_GETOPT_option_string ('S', |
435 | "section", | 435 | "section", |
436 | NULL, | 436 | NULL, |
437 | gettext_noop ("name of configuration section to find additional options, such as manual host punching data"), | 437 | gettext_noop ("name of configuration section to find additional options, such as manual host punching data"), |
438 | §ion_name), | 438 | §ion_name), |
439 | 439 | ||
440 | GNUNET_GETOPT_OPTION_SET_ONE ('s', | 440 | GNUNET_GETOPT_option_flag ('s', |
441 | "stun", | 441 | "stun", |
442 | gettext_noop ("enable STUN processing"), | 442 | gettext_noop ("enable STUN processing"), |
443 | &do_stun), | 443 | &do_stun), |
444 | 444 | ||
445 | GNUNET_GETOPT_OPTION_SET_ONE ('t', | 445 | GNUNET_GETOPT_option_flag ('t', |
446 | "tcp", | 446 | "tcp", |
447 | gettext_noop ("use TCP"), | 447 | gettext_noop ("use TCP"), |
448 | &use_tcp), | 448 | &use_tcp), |
449 | 449 | ||
450 | GNUNET_GETOPT_OPTION_SET_ONE ('u', | 450 | GNUNET_GETOPT_option_flag ('u', |
451 | "udp", | 451 | "udp", |
452 | gettext_noop ("use UDP"), | 452 | gettext_noop ("use UDP"), |
453 | &use_udp), | 453 | &use_udp), |
454 | 454 | ||
455 | GNUNET_GETOPT_OPTION_SET_ONE ('W', | 455 | GNUNET_GETOPT_option_flag ('W', |
456 | "watch", | 456 | "watch", |
457 | gettext_noop ("watch for connection reversal requests"), | 457 | gettext_noop ("watch for connection reversal requests"), |
458 | &listen_reversal), | 458 | &listen_reversal), |
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c index ea28bf610..4a10022e3 100644 --- a/src/nse/gnunet-nse-profiler.c +++ b/src/nse/gnunet-nse-profiler.c | |||
@@ -836,42 +836,42 @@ int | |||
836 | main (int argc, char *const *argv) | 836 | main (int argc, char *const *argv) |
837 | { | 837 | { |
838 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 838 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
839 | GNUNET_GETOPT_OPTION_SET_UINT ('C', | 839 | GNUNET_GETOPT_option_uint ('C', |
840 | "connections", | 840 | "connections", |
841 | "COUNT", | 841 | "COUNT", |
842 | gettext_noop ("limit to the number of connections to NSE services, 0 for none"), | 842 | gettext_noop ("limit to the number of connections to NSE services, 0 for none"), |
843 | &connection_limit), | 843 | &connection_limit), |
844 | GNUNET_GETOPT_OPTION_STRING ('d', | 844 | GNUNET_GETOPT_option_string ('d', |
845 | "details", | 845 | "details", |
846 | "FILENAME", | 846 | "FILENAME", |
847 | gettext_noop ("name of the file for writing connection information and statistics"), | 847 | gettext_noop ("name of the file for writing connection information and statistics"), |
848 | &data_filename), | 848 | &data_filename), |
849 | 849 | ||
850 | GNUNET_GETOPT_OPTION_STRING ('H', | 850 | GNUNET_GETOPT_option_string ('H', |
851 | "hosts", | 851 | "hosts", |
852 | "FILENAME", | 852 | "FILENAME", |
853 | gettext_noop ("name of the file with the login information for the testbed"), | 853 | gettext_noop ("name of the file with the login information for the testbed"), |
854 | &hosts_file), | 854 | &hosts_file), |
855 | 855 | ||
856 | GNUNET_GETOPT_OPTION_STRING ('o', | 856 | GNUNET_GETOPT_option_string ('o', |
857 | "output", | 857 | "output", |
858 | "FILENAME", | 858 | "FILENAME", |
859 | gettext_noop ("name of the file for writing the main results"), | 859 | gettext_noop ("name of the file for writing the main results"), |
860 | &output_filename), | 860 | &output_filename), |
861 | 861 | ||
862 | 862 | ||
863 | GNUNET_GETOPT_OPTION_STRING ('p', | 863 | GNUNET_GETOPT_option_string ('p', |
864 | "peers", | 864 | "peers", |
865 | "NETWORKSIZESPEC", | 865 | "NETWORKSIZESPEC", |
866 | gettext_noop ("Number of peers to run in each round, separated by commas"), | 866 | gettext_noop ("Number of peers to run in each round, separated by commas"), |
867 | &num_peer_spec), | 867 | &num_peer_spec), |
868 | 868 | ||
869 | GNUNET_GETOPT_OPTION_INCREMENT_VALUE ('V', | 869 | GNUNET_GETOPT_option_increment_uint ('V', |
870 | "verbose", | 870 | "verbose", |
871 | gettext_noop ("be verbose (print progress information)"), | 871 | gettext_noop ("be verbose (print progress information)"), |
872 | &verbose), | 872 | &verbose), |
873 | 873 | ||
874 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('w', | 874 | GNUNET_GETOPT_option_relative_time ('w', |
875 | "wait", | 875 | "wait", |
876 | "DELAY", | 876 | "DELAY", |
877 | gettext_noop ("delay between rounds"), | 877 | gettext_noop ("delay between rounds"), |
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c index 59ffe2efd..de7dcd6fa 100644 --- a/src/peerinfo-tool/gnunet-peerinfo.c +++ b/src/peerinfo-tool/gnunet-peerinfo.c | |||
@@ -838,42 +838,42 @@ int | |||
838 | main (int argc, char *const *argv) | 838 | main (int argc, char *const *argv) |
839 | { | 839 | { |
840 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 840 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
841 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 841 | GNUNET_GETOPT_option_flag ('n', |
842 | "numeric", | 842 | "numeric", |
843 | gettext_noop ("don't resolve host names"), | 843 | gettext_noop ("don't resolve host names"), |
844 | &no_resolve), | 844 | &no_resolve), |
845 | 845 | ||
846 | GNUNET_GETOPT_OPTION_SET_ONE ('q', | 846 | GNUNET_GETOPT_option_flag ('q', |
847 | "quiet", | 847 | "quiet", |
848 | gettext_noop ("output only the identity strings"), | 848 | gettext_noop ("output only the identity strings"), |
849 | &be_quiet), | 849 | &be_quiet), |
850 | GNUNET_GETOPT_OPTION_SET_ONE ('f', | 850 | GNUNET_GETOPT_option_flag ('f', |
851 | "friends", | 851 | "friends", |
852 | gettext_noop ("include friend-only information"), | 852 | gettext_noop ("include friend-only information"), |
853 | &include_friend_only), | 853 | &include_friend_only), |
854 | 854 | ||
855 | GNUNET_GETOPT_OPTION_SET_ONE ('s', | 855 | GNUNET_GETOPT_option_flag ('s', |
856 | "self", | 856 | "self", |
857 | gettext_noop ("output our own identity only"), | 857 | gettext_noop ("output our own identity only"), |
858 | &get_self), | 858 | &get_self), |
859 | 859 | ||
860 | GNUNET_GETOPT_OPTION_SET_ONE ('i', | 860 | GNUNET_GETOPT_option_flag ('i', |
861 | "info", | 861 | "info", |
862 | gettext_noop ("list all known peers"), | 862 | gettext_noop ("list all known peers"), |
863 | &get_info), | 863 | &get_info), |
864 | 864 | ||
865 | GNUNET_GETOPT_OPTION_STRING ('d', | 865 | GNUNET_GETOPT_option_string ('d', |
866 | "dump-hello", | 866 | "dump-hello", |
867 | NULL, | 867 | NULL, |
868 | gettext_noop ("dump hello to file"), | 868 | gettext_noop ("dump hello to file"), |
869 | &dump_hello), | 869 | &dump_hello), |
870 | 870 | ||
871 | GNUNET_GETOPT_OPTION_SET_ONE ('g', | 871 | GNUNET_GETOPT_option_flag ('g', |
872 | "get-hello", | 872 | "get-hello", |
873 | gettext_noop ("also output HELLO uri(s)"), | 873 | gettext_noop ("also output HELLO uri(s)"), |
874 | &get_uri), | 874 | &get_uri), |
875 | 875 | ||
876 | GNUNET_GETOPT_OPTION_STRING ('p', | 876 | GNUNET_GETOPT_option_string ('p', |
877 | "put-hello", | 877 | "put-hello", |
878 | "HELLO", | 878 | "HELLO", |
879 | gettext_noop ("add given HELLO uri to the database"), | 879 | gettext_noop ("add given HELLO uri to the database"), |
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c index 71f3580f8..7d907fec6 100644 --- a/src/regex/gnunet-regex-profiler.c +++ b/src/regex/gnunet-regex-profiler.c | |||
@@ -1479,32 +1479,32 @@ main (int argc, char *const *argv) | |||
1479 | { | 1479 | { |
1480 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 1480 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1481 | 1481 | ||
1482 | GNUNET_GETOPT_OPTION_FILENAME ('o', | 1482 | GNUNET_GETOPT_option_filename ('o', |
1483 | "output-file", | 1483 | "output-file", |
1484 | "FILENAME", | 1484 | "FILENAME", |
1485 | gettext_noop ("name of the file for writing statistics"), | 1485 | gettext_noop ("name of the file for writing statistics"), |
1486 | &data_filename), | 1486 | &data_filename), |
1487 | 1487 | ||
1488 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', | 1488 | GNUNET_GETOPT_option_relative_time ('t', |
1489 | "matching-timeout", | 1489 | "matching-timeout", |
1490 | "TIMEOUT", | 1490 | "TIMEOUT", |
1491 | gettext_noop ("wait TIMEOUT before ending the experiment"), | 1491 | gettext_noop ("wait TIMEOUT before ending the experiment"), |
1492 | &search_timeout_time), | 1492 | &search_timeout_time), |
1493 | 1493 | ||
1494 | GNUNET_GETOPT_OPTION_FILENAME ('p', | 1494 | GNUNET_GETOPT_option_filename ('p', |
1495 | "policy-dir", | 1495 | "policy-dir", |
1496 | "DIRECTORY", | 1496 | "DIRECTORY", |
1497 | gettext_noop ("directory with policy files"), | 1497 | gettext_noop ("directory with policy files"), |
1498 | &policy_dir), | 1498 | &policy_dir), |
1499 | 1499 | ||
1500 | 1500 | ||
1501 | GNUNET_GETOPT_OPTION_FILENAME ('s', | 1501 | GNUNET_GETOPT_option_filename ('s', |
1502 | "strings-file", | 1502 | "strings-file", |
1503 | "FILENAME", | 1503 | "FILENAME", |
1504 | gettext_noop ("name of file with input strings"), | 1504 | gettext_noop ("name of file with input strings"), |
1505 | &strings_file), | 1505 | &strings_file), |
1506 | 1506 | ||
1507 | GNUNET_GETOPT_OPTION_FILENAME ('H', | 1507 | GNUNET_GETOPT_option_filename ('H', |
1508 | "hosts-file", | 1508 | "hosts-file", |
1509 | "FILENAME", | 1509 | "FILENAME", |
1510 | gettext_noop ("name of file with hosts' names"), | 1510 | gettext_noop ("name of file with hosts' names"), |
diff --git a/src/regex/gnunet-regex-simulation-profiler.c b/src/regex/gnunet-regex-simulation-profiler.c index 422e45565..67c2ecfff 100644 --- a/src/regex/gnunet-regex-simulation-profiler.c +++ b/src/regex/gnunet-regex-simulation-profiler.c | |||
@@ -693,13 +693,13 @@ main (int argc, char *const *argv) | |||
693 | { | 693 | { |
694 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 694 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
695 | 695 | ||
696 | GNUNET_GETOPT_OPTION_STRING ('t', | 696 | GNUNET_GETOPT_option_string ('t', |
697 | "table", | 697 | "table", |
698 | "TABLENAME", | 698 | "TABLENAME", |
699 | gettext_noop ("name of the table to write DFAs"), | 699 | gettext_noop ("name of the table to write DFAs"), |
700 | &table_name), | 700 | &table_name), |
701 | 701 | ||
702 | GNUNET_GETOPT_OPTION_SET_UINT ('p', | 702 | GNUNET_GETOPT_option_uint ('p', |
703 | "max-path-compression", | 703 | "max-path-compression", |
704 | "MAX_PATH_COMPRESSION", | 704 | "MAX_PATH_COMPRESSION", |
705 | gettext_noop ("maximum path compression length"), | 705 | gettext_noop ("maximum path compression length"), |
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c index 0b6c18267..5b92c6c43 100644 --- a/src/rest/gnunet-rest-server.c +++ b/src/rest/gnunet-rest-server.c | |||
@@ -784,7 +784,7 @@ int | |||
784 | main (int argc, char *const *argv) | 784 | main (int argc, char *const *argv) |
785 | { | 785 | { |
786 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 786 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
787 | GNUNET_GETOPT_OPTION_SET_ULONG ('p', | 787 | GNUNET_GETOPT_option_ulong ('p', |
788 | "port", | 788 | "port", |
789 | "PORT", | 789 | "PORT", |
790 | gettext_noop ("listen on specified port (default: 7776)"), | 790 | gettext_noop ("listen on specified port (default: 7776)"), |
diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c index 7b40c83d7..13e6b23a5 100644 --- a/src/revocation/gnunet-revocation.c +++ b/src/revocation/gnunet-revocation.c | |||
@@ -529,24 +529,24 @@ main (int argc, char *const *argv) | |||
529 | { | 529 | { |
530 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 530 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
531 | 531 | ||
532 | GNUNET_GETOPT_OPTION_STRING ('f', | 532 | GNUNET_GETOPT_option_string ('f', |
533 | "filename", | 533 | "filename", |
534 | "NAME", | 534 | "NAME", |
535 | gettext_noop ("use NAME for the name of the revocation file"), | 535 | gettext_noop ("use NAME for the name of the revocation file"), |
536 | &filename), | 536 | &filename), |
537 | 537 | ||
538 | GNUNET_GETOPT_OPTION_STRING ('R', | 538 | GNUNET_GETOPT_option_string ('R', |
539 | "revoke", | 539 | "revoke", |
540 | "NAME", | 540 | "NAME", |
541 | gettext_noop ("revoke the private key associated for the the private key associated with the ego NAME "), | 541 | gettext_noop ("revoke the private key associated for the the private key associated with the ego NAME "), |
542 | &revoke_ego), | 542 | &revoke_ego), |
543 | 543 | ||
544 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | 544 | GNUNET_GETOPT_option_flag ('p', |
545 | "perform", | 545 | "perform", |
546 | gettext_noop ("actually perform revocation, otherwise we just do the precomputation"), | 546 | gettext_noop ("actually perform revocation, otherwise we just do the precomputation"), |
547 | &perform), | 547 | &perform), |
548 | 548 | ||
549 | GNUNET_GETOPT_OPTION_STRING ('t', | 549 | GNUNET_GETOPT_option_string ('t', |
550 | "test", | 550 | "test", |
551 | "KEY", | 551 | "KEY", |
552 | gettext_noop ("test if the public key KEY has been revoked"), | 552 | gettext_noop ("test if the public key KEY has been revoked"), |
diff --git a/src/rps/gnunet-rps.c b/src/rps/gnunet-rps.c index e36e547fa..bbac0d634 100644 --- a/src/rps/gnunet-rps.c +++ b/src/rps/gnunet-rps.c | |||
@@ -140,7 +140,7 @@ main (int argc, char *const *argv) | |||
140 | const char helpstr[] = | 140 | const char helpstr[] = |
141 | "Get random GNUnet peers. If none is specified a single is requested."; | 141 | "Get random GNUnet peers. If none is specified a single is requested."; |
142 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 142 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
143 | GNUNET_GETOPT_OPTION_SET_BASE32_AUTO ('s', | 143 | GNUNET_GETOPT_option_base32_auto ('s', |
144 | "seed", | 144 | "seed", |
145 | "PEER_ID", | 145 | "PEER_ID", |
146 | gettext_noop ("Seed a PeerID"), | 146 | gettext_noop ("Seed a PeerID"), |
diff --git a/src/scalarproduct/gnunet-scalarproduct.c b/src/scalarproduct/gnunet-scalarproduct.c index 5d0fce2b1..4a152e09e 100644 --- a/src/scalarproduct/gnunet-scalarproduct.c +++ b/src/scalarproduct/gnunet-scalarproduct.c | |||
@@ -345,25 +345,25 @@ main (int argc, char *const *argv) | |||
345 | { | 345 | { |
346 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 346 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
347 | 347 | ||
348 | GNUNET_GETOPT_OPTION_STRING ('e', | 348 | GNUNET_GETOPT_option_string ('e', |
349 | "elements", | 349 | "elements", |
350 | "\"key1,val1;key2,val2;...,keyn,valn;\"", | 350 | "\"key1,val1;key2,val2;...,keyn,valn;\"", |
351 | gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."), | 351 | gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."), |
352 | &input_elements), | 352 | &input_elements), |
353 | 353 | ||
354 | GNUNET_GETOPT_OPTION_STRING ('e', | 354 | GNUNET_GETOPT_option_string ('e', |
355 | "elements", | 355 | "elements", |
356 | "\"key1,val1;key2,val2;...,keyn,valn;\"", | 356 | "\"key1,val1;key2,val2;...,keyn,valn;\"", |
357 | gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."), | 357 | gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."), |
358 | &input_elements), | 358 | &input_elements), |
359 | 359 | ||
360 | GNUNET_GETOPT_OPTION_STRING ('p', | 360 | GNUNET_GETOPT_option_string ('p', |
361 | "peer", | 361 | "peer", |
362 | "PEERID", | 362 | "PEERID", |
363 | gettext_noop ("[Optional] peer to calculate our scalarproduct with. If this parameter is not given, the service will wait for a remote peer to compute the request."), | 363 | gettext_noop ("[Optional] peer to calculate our scalarproduct with. If this parameter is not given, the service will wait for a remote peer to compute the request."), |
364 | &input_peer_id), | 364 | &input_peer_id), |
365 | 365 | ||
366 | GNUNET_GETOPT_OPTION_STRING ('k', | 366 | GNUNET_GETOPT_option_string ('k', |
367 | "key", | 367 | "key", |
368 | "TRANSACTION_ID", | 368 | "TRANSACTION_ID", |
369 | gettext_noop ("Transaction ID shared with peer."), | 369 | gettext_noop ("Transaction ID shared with peer."), |
diff --git a/src/secretsharing/gnunet-secretsharing-profiler.c b/src/secretsharing/gnunet-secretsharing-profiler.c index e66019dc6..a83dcd92a 100644 --- a/src/secretsharing/gnunet-secretsharing-profiler.c +++ b/src/secretsharing/gnunet-secretsharing-profiler.c | |||
@@ -604,37 +604,37 @@ main (int argc, char **argv) | |||
604 | { | 604 | { |
605 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 605 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
606 | 606 | ||
607 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | 607 | GNUNET_GETOPT_option_uint ('n', |
608 | "num-peers", | 608 | "num-peers", |
609 | NULL, | 609 | NULL, |
610 | gettext_noop ("number of peers in consensus"), | 610 | gettext_noop ("number of peers in consensus"), |
611 | &num_peers), | 611 | &num_peers), |
612 | 612 | ||
613 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D', | 613 | GNUNET_GETOPT_option_relative_time ('D', |
614 | "delay", | 614 | "delay", |
615 | NULL, | 615 | NULL, |
616 | gettext_noop ("dkg start delay"), | 616 | gettext_noop ("dkg start delay"), |
617 | &delay), | 617 | &delay), |
618 | 618 | ||
619 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', | 619 | GNUNET_GETOPT_option_relative_time ('t', |
620 | "timeout", | 620 | "timeout", |
621 | NULL, | 621 | NULL, |
622 | gettext_noop ("dkg timeout"), | 622 | gettext_noop ("dkg timeout"), |
623 | &timeout), | 623 | &timeout), |
624 | 624 | ||
625 | GNUNET_GETOPT_OPTION_SET_UINT ('k', | 625 | GNUNET_GETOPT_option_uint ('k', |
626 | "threshold", | 626 | "threshold", |
627 | NULL, | 627 | NULL, |
628 | gettext_noop ("threshold"), | 628 | gettext_noop ("threshold"), |
629 | &threshold), | 629 | &threshold), |
630 | 630 | ||
631 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 631 | GNUNET_GETOPT_option_flag ('d', |
632 | "descrypt", | 632 | "descrypt", |
633 | gettext_noop ("also profile decryption"), | 633 | gettext_noop ("also profile decryption"), |
634 | &decrypt), | 634 | &decrypt), |
635 | 635 | ||
636 | 636 | ||
637 | GNUNET_GETOPT_OPTION_VERBOSE (&verbose), | 637 | GNUNET_GETOPT_option_verbose (&verbose), |
638 | 638 | ||
639 | GNUNET_GETOPT_OPTION_END | 639 | GNUNET_GETOPT_OPTION_END |
640 | }; | 640 | }; |
diff --git a/src/set/gnunet-set-ibf-profiler.c b/src/set/gnunet-set-ibf-profiler.c index ac86a900d..70fafa1e1 100644 --- a/src/set/gnunet-set-ibf-profiler.c +++ b/src/set/gnunet-set-ibf-profiler.c | |||
@@ -246,31 +246,31 @@ main (int argc, char **argv) | |||
246 | { | 246 | { |
247 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 247 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
248 | 248 | ||
249 | GNUNET_GETOPT_OPTION_SET_UINT ('A', | 249 | GNUNET_GETOPT_option_uint ('A', |
250 | "asize", | 250 | "asize", |
251 | NULL, | 251 | NULL, |
252 | gettext_noop ("number of element in set A-B"), | 252 | gettext_noop ("number of element in set A-B"), |
253 | &asize), | 253 | &asize), |
254 | 254 | ||
255 | GNUNET_GETOPT_OPTION_SET_UINT ('B', | 255 | GNUNET_GETOPT_option_uint ('B', |
256 | "bsize", | 256 | "bsize", |
257 | NULL, | 257 | NULL, |
258 | gettext_noop ("number of element in set B-A"), | 258 | gettext_noop ("number of element in set B-A"), |
259 | &bsize), | 259 | &bsize), |
260 | 260 | ||
261 | GNUNET_GETOPT_OPTION_SET_UINT ('C', | 261 | GNUNET_GETOPT_option_uint ('C', |
262 | "csize", | 262 | "csize", |
263 | NULL, | 263 | NULL, |
264 | gettext_noop ("number of common elements in A and B"), | 264 | gettext_noop ("number of common elements in A and B"), |
265 | &csize), | 265 | &csize), |
266 | 266 | ||
267 | GNUNET_GETOPT_OPTION_SET_UINT ('k', | 267 | GNUNET_GETOPT_option_uint ('k', |
268 | "hash-num", | 268 | "hash-num", |
269 | NULL, | 269 | NULL, |
270 | gettext_noop ("hash num"), | 270 | gettext_noop ("hash num"), |
271 | &hash_num), | 271 | &hash_num), |
272 | 272 | ||
273 | GNUNET_GETOPT_OPTION_SET_UINT ('s', | 273 | GNUNET_GETOPT_option_uint ('s', |
274 | "ibf-size", | 274 | "ibf-size", |
275 | NULL, | 275 | NULL, |
276 | gettext_noop ("ibf size"), | 276 | gettext_noop ("ibf size"), |
diff --git a/src/set/gnunet-set-profiler.c b/src/set/gnunet-set-profiler.c index 349bce6ea..68f7be690 100644 --- a/src/set/gnunet-set-profiler.c +++ b/src/set/gnunet-set-profiler.c | |||
@@ -427,54 +427,54 @@ int | |||
427 | main (int argc, char **argv) | 427 | main (int argc, char **argv) |
428 | { | 428 | { |
429 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 429 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
430 | GNUNET_GETOPT_OPTION_SET_UINT ('A', | 430 | GNUNET_GETOPT_option_uint ('A', |
431 | "num-first", | 431 | "num-first", |
432 | NULL, | 432 | NULL, |
433 | gettext_noop ("number of values"), | 433 | gettext_noop ("number of values"), |
434 | &num_a), | 434 | &num_a), |
435 | 435 | ||
436 | GNUNET_GETOPT_OPTION_SET_UINT ('B', | 436 | GNUNET_GETOPT_option_uint ('B', |
437 | "num-second", | 437 | "num-second", |
438 | NULL, | 438 | NULL, |
439 | gettext_noop ("number of values"), | 439 | gettext_noop ("number of values"), |
440 | &num_b), | 440 | &num_b), |
441 | 441 | ||
442 | GNUNET_GETOPT_OPTION_SET_ONE ('b', | 442 | GNUNET_GETOPT_option_flag ('b', |
443 | "byzantine", | 443 | "byzantine", |
444 | gettext_noop ("use byzantine mode"), | 444 | gettext_noop ("use byzantine mode"), |
445 | &byzantine), | 445 | &byzantine), |
446 | 446 | ||
447 | GNUNET_GETOPT_OPTION_SET_UINT ('f', | 447 | GNUNET_GETOPT_option_uint ('f', |
448 | "force-full", | 448 | "force-full", |
449 | NULL, | 449 | NULL, |
450 | gettext_noop ("force sending full set"), | 450 | gettext_noop ("force sending full set"), |
451 | &force_full), | 451 | &force_full), |
452 | 452 | ||
453 | GNUNET_GETOPT_OPTION_SET_UINT ('d', | 453 | GNUNET_GETOPT_option_uint ('d', |
454 | "force-delta", | 454 | "force-delta", |
455 | NULL, | 455 | NULL, |
456 | gettext_noop ("number delta operation"), | 456 | gettext_noop ("number delta operation"), |
457 | &force_delta), | 457 | &force_delta), |
458 | 458 | ||
459 | GNUNET_GETOPT_OPTION_SET_UINT ('C', | 459 | GNUNET_GETOPT_option_uint ('C', |
460 | "num-common", | 460 | "num-common", |
461 | NULL, | 461 | NULL, |
462 | gettext_noop ("number of values"), | 462 | gettext_noop ("number of values"), |
463 | &num_c), | 463 | &num_c), |
464 | 464 | ||
465 | GNUNET_GETOPT_OPTION_STRING ('x', | 465 | GNUNET_GETOPT_option_string ('x', |
466 | "operation", | 466 | "operation", |
467 | NULL, | 467 | NULL, |
468 | gettext_noop ("operation to execute"), | 468 | gettext_noop ("operation to execute"), |
469 | &op_str), | 469 | &op_str), |
470 | 470 | ||
471 | GNUNET_GETOPT_OPTION_SET_UINT ('w', | 471 | GNUNET_GETOPT_option_uint ('w', |
472 | "element-size", | 472 | "element-size", |
473 | NULL, | 473 | NULL, |
474 | gettext_noop ("element size"), | 474 | gettext_noop ("element size"), |
475 | &element_size), | 475 | &element_size), |
476 | 476 | ||
477 | GNUNET_GETOPT_OPTION_FILENAME ('s', | 477 | GNUNET_GETOPT_option_filename ('s', |
478 | "statistics", | 478 | "statistics", |
479 | "FILENAME", | 479 | "FILENAME", |
480 | gettext_noop ("write statistics to file"), | 480 | gettext_noop ("write statistics to file"), |
diff --git a/src/social/gnunet-social.c b/src/social/gnunet-social.c index 4a46fdc99..228d69d58 100644 --- a/src/social/gnunet-social.c +++ b/src/social/gnunet-social.c | |||
@@ -1212,78 +1212,78 @@ main (int argc, char *const *argv) | |||
1212 | 1212 | ||
1213 | /* operations */ | 1213 | /* operations */ |
1214 | 1214 | ||
1215 | GNUNET_GETOPT_OPTION_SET_ONE ('A', | 1215 | GNUNET_GETOPT_option_flag ('A', |
1216 | "host-assign", | 1216 | "host-assign", |
1217 | gettext_noop ("assign --name in state to --data"), | 1217 | gettext_noop ("assign --name in state to --data"), |
1218 | &op_host_assign), | 1218 | &op_host_assign), |
1219 | 1219 | ||
1220 | GNUNET_GETOPT_OPTION_SET_ONE ('B', | 1220 | GNUNET_GETOPT_option_flag ('B', |
1221 | "guest-leave", | 1221 | "guest-leave", |
1222 | gettext_noop ("say good-bye and leave somebody else's place"), | 1222 | gettext_noop ("say good-bye and leave somebody else's place"), |
1223 | &op_guest_leave), | 1223 | &op_guest_leave), |
1224 | 1224 | ||
1225 | GNUNET_GETOPT_OPTION_SET_ONE ('C', | 1225 | GNUNET_GETOPT_option_flag ('C', |
1226 | "host-enter", | 1226 | "host-enter", |
1227 | gettext_noop ("create a place"), | 1227 | gettext_noop ("create a place"), |
1228 | &op_host_enter), | 1228 | &op_host_enter), |
1229 | 1229 | ||
1230 | GNUNET_GETOPT_OPTION_SET_ONE ('C', | 1230 | GNUNET_GETOPT_option_flag ('C', |
1231 | "host-enter", | 1231 | "host-enter", |
1232 | gettext_noop ("create a place"), | 1232 | gettext_noop ("create a place"), |
1233 | &op_host_enter), | 1233 | &op_host_enter), |
1234 | 1234 | ||
1235 | GNUNET_GETOPT_OPTION_SET_ONE ('D', | 1235 | GNUNET_GETOPT_option_flag ('D', |
1236 | "host-leave", | 1236 | "host-leave", |
1237 | gettext_noop ("destroy a place we were hosting"), | 1237 | gettext_noop ("destroy a place we were hosting"), |
1238 | &op_host_leave), | 1238 | &op_host_leave), |
1239 | 1239 | ||
1240 | GNUNET_GETOPT_OPTION_SET_ONE ('E', | 1240 | GNUNET_GETOPT_option_flag ('E', |
1241 | "guest-enter", | 1241 | "guest-enter", |
1242 | gettext_noop ("enter somebody else's place"), | 1242 | gettext_noop ("enter somebody else's place"), |
1243 | &op_guest_enter), | 1243 | &op_guest_enter), |
1244 | 1244 | ||
1245 | 1245 | ||
1246 | GNUNET_GETOPT_OPTION_SET_ONE ('F', | 1246 | GNUNET_GETOPT_option_flag ('F', |
1247 | "look-for", | 1247 | "look-for", |
1248 | gettext_noop ("find state matching name prefix"), | 1248 | gettext_noop ("find state matching name prefix"), |
1249 | &op_look_for), | 1249 | &op_look_for), |
1250 | 1250 | ||
1251 | GNUNET_GETOPT_OPTION_SET_ONE ('H', | 1251 | GNUNET_GETOPT_option_flag ('H', |
1252 | "replay-latest", | 1252 | "replay-latest", |
1253 | gettext_noop ("replay history of messages up to the given --limit"), | 1253 | gettext_noop ("replay history of messages up to the given --limit"), |
1254 | &op_replay_latest), | 1254 | &op_replay_latest), |
1255 | 1255 | ||
1256 | GNUNET_GETOPT_OPTION_SET_ONE ('N', | 1256 | GNUNET_GETOPT_option_flag ('N', |
1257 | "host-reconnect", | 1257 | "host-reconnect", |
1258 | gettext_noop ("reconnect to a previously created place"), | 1258 | gettext_noop ("reconnect to a previously created place"), |
1259 | &op_host_reconnect), | 1259 | &op_host_reconnect), |
1260 | 1260 | ||
1261 | GNUNET_GETOPT_OPTION_SET_ONE ('P', | 1261 | GNUNET_GETOPT_option_flag ('P', |
1262 | "host-announce", | 1262 | "host-announce", |
1263 | gettext_noop ("publish something to a place we are hosting"), | 1263 | gettext_noop ("publish something to a place we are hosting"), |
1264 | &op_host_announce), | 1264 | &op_host_announce), |
1265 | 1265 | ||
1266 | GNUNET_GETOPT_OPTION_SET_ONE ('R', | 1266 | GNUNET_GETOPT_option_flag ('R', |
1267 | "guest-reconnect", | 1267 | "guest-reconnect", |
1268 | gettext_noop ("reconnect to a previously entered place"), | 1268 | gettext_noop ("reconnect to a previously entered place"), |
1269 | &op_guest_reconnect), | 1269 | &op_guest_reconnect), |
1270 | 1270 | ||
1271 | GNUNET_GETOPT_OPTION_SET_ONE ('S', | 1271 | GNUNET_GETOPT_option_flag ('S', |
1272 | "look-at", | 1272 | "look-at", |
1273 | gettext_noop ("search for state matching exact name"), | 1273 | gettext_noop ("search for state matching exact name"), |
1274 | &op_look_at), | 1274 | &op_look_at), |
1275 | 1275 | ||
1276 | GNUNET_GETOPT_OPTION_SET_ONE ('T', | 1276 | GNUNET_GETOPT_option_flag ('T', |
1277 | "guest-talk", | 1277 | "guest-talk", |
1278 | gettext_noop ("submit something to somebody's place"), | 1278 | gettext_noop ("submit something to somebody's place"), |
1279 | &op_guest_talk), | 1279 | &op_guest_talk), |
1280 | 1280 | ||
1281 | GNUNET_GETOPT_OPTION_SET_ONE ('U', | 1281 | GNUNET_GETOPT_option_flag ('U', |
1282 | "status", | 1282 | "status", |
1283 | gettext_noop ("list of egos and subscribed places"), | 1283 | gettext_noop ("list of egos and subscribed places"), |
1284 | &op_status), | 1284 | &op_status), |
1285 | 1285 | ||
1286 | GNUNET_GETOPT_OPTION_SET_ONE ('X', | 1286 | GNUNET_GETOPT_option_flag ('X', |
1287 | "replay", | 1287 | "replay", |
1288 | gettext_noop ("extract and replay history between message IDs --start and --until"), | 1288 | gettext_noop ("extract and replay history between message IDs --start and --until"), |
1289 | &op_replay), | 1289 | &op_replay), |
@@ -1291,83 +1291,83 @@ main (int argc, char *const *argv) | |||
1291 | 1291 | ||
1292 | /* options */ | 1292 | /* options */ |
1293 | 1293 | ||
1294 | GNUNET_GETOPT_OPTION_STRING ('a', | 1294 | GNUNET_GETOPT_option_string ('a', |
1295 | "app", | 1295 | "app", |
1296 | "APPLICATION_ID", | 1296 | "APPLICATION_ID", |
1297 | gettext_noop ("application ID to use when connecting"), | 1297 | gettext_noop ("application ID to use when connecting"), |
1298 | &opt_app), | 1298 | &opt_app), |
1299 | 1299 | ||
1300 | GNUNET_GETOPT_OPTION_STRING ('d', | 1300 | GNUNET_GETOPT_option_string ('d', |
1301 | "data", | 1301 | "data", |
1302 | "DATA", | 1302 | "DATA", |
1303 | gettext_noop ("message body or state value"), | 1303 | gettext_noop ("message body or state value"), |
1304 | &opt_data), | 1304 | &opt_data), |
1305 | 1305 | ||
1306 | GNUNET_GETOPT_OPTION_STRING ('e', | 1306 | GNUNET_GETOPT_option_string ('e', |
1307 | "ego", | 1307 | "ego", |
1308 | "NAME|PUBKEY", | 1308 | "NAME|PUBKEY", |
1309 | gettext_noop ("name or public key of ego"), | 1309 | gettext_noop ("name or public key of ego"), |
1310 | &opt_ego), | 1310 | &opt_ego), |
1311 | 1311 | ||
1312 | GNUNET_GETOPT_OPTION_SET_ONE ('f', | 1312 | GNUNET_GETOPT_option_flag ('f', |
1313 | "follow", | 1313 | "follow", |
1314 | gettext_noop ("wait for incoming messages"), | 1314 | gettext_noop ("wait for incoming messages"), |
1315 | &opt_follow), | 1315 | &opt_follow), |
1316 | 1316 | ||
1317 | GNUNET_GETOPT_OPTION_STRING ('g', | 1317 | GNUNET_GETOPT_option_string ('g', |
1318 | "gns", | 1318 | "gns", |
1319 | "GNS_NAME", | 1319 | "GNS_NAME", |
1320 | gettext_noop ("GNS name"), | 1320 | gettext_noop ("GNS name"), |
1321 | &opt_gns), | 1321 | &opt_gns), |
1322 | 1322 | ||
1323 | GNUNET_GETOPT_OPTION_STRING ('i', | 1323 | GNUNET_GETOPT_option_string ('i', |
1324 | "peer", | 1324 | "peer", |
1325 | "PEER_ID", | 1325 | "PEER_ID", |
1326 | gettext_noop ("peer ID for --guest-enter"), | 1326 | gettext_noop ("peer ID for --guest-enter"), |
1327 | &opt_peer), | 1327 | &opt_peer), |
1328 | 1328 | ||
1329 | GNUNET_GETOPT_OPTION_STRING ('k', | 1329 | GNUNET_GETOPT_option_string ('k', |
1330 | "name", | 1330 | "name", |
1331 | "VAR_NAME", | 1331 | "VAR_NAME", |
1332 | gettext_noop ("name (key) to query from state"), | 1332 | gettext_noop ("name (key) to query from state"), |
1333 | &opt_name), | 1333 | &opt_name), |
1334 | 1334 | ||
1335 | GNUNET_GETOPT_OPTION_STRING ('m', | 1335 | GNUNET_GETOPT_option_string ('m', |
1336 | "method", | 1336 | "method", |
1337 | "METHOD_NAME", | 1337 | "METHOD_NAME", |
1338 | gettext_noop ("method name"), | 1338 | gettext_noop ("method name"), |
1339 | &opt_method), | 1339 | &opt_method), |
1340 | 1340 | ||
1341 | GNUNET_GETOPT_OPTION_SET_ULONG ('n', | 1341 | GNUNET_GETOPT_option_ulong ('n', |
1342 | "limit", | 1342 | "limit", |
1343 | NULL, | 1343 | NULL, |
1344 | gettext_noop ("number of messages to replay from history"), | 1344 | gettext_noop ("number of messages to replay from history"), |
1345 | &opt_limit), | 1345 | &opt_limit), |
1346 | 1346 | ||
1347 | GNUNET_GETOPT_OPTION_STRING ('p', | 1347 | GNUNET_GETOPT_option_string ('p', |
1348 | "place", | 1348 | "place", |
1349 | "PUBKEY", | 1349 | "PUBKEY", |
1350 | gettext_noop ("key address of place"), | 1350 | gettext_noop ("key address of place"), |
1351 | &opt_place), | 1351 | &opt_place), |
1352 | 1352 | ||
1353 | GNUNET_GETOPT_OPTION_SET_ULONG ('s', | 1353 | GNUNET_GETOPT_option_ulong ('s', |
1354 | "start", | 1354 | "start", |
1355 | NULL, | 1355 | NULL, |
1356 | gettext_noop ("start message ID for history replay"), | 1356 | gettext_noop ("start message ID for history replay"), |
1357 | &opt_start), | 1357 | &opt_start), |
1358 | 1358 | ||
1359 | GNUNET_GETOPT_OPTION_SET_ONE ('w', | 1359 | GNUNET_GETOPT_option_flag ('w', |
1360 | "welcome", | 1360 | "welcome", |
1361 | gettext_noop ("respond to entry requests by admitting all guests"), | 1361 | gettext_noop ("respond to entry requests by admitting all guests"), |
1362 | &opt_welcome), | 1362 | &opt_welcome), |
1363 | 1363 | ||
1364 | GNUNET_GETOPT_OPTION_SET_ULONG ('u', | 1364 | GNUNET_GETOPT_option_ulong ('u', |
1365 | "until", | 1365 | "until", |
1366 | NULL, | 1366 | NULL, |
1367 | gettext_noop ("end message ID for history replay"), | 1367 | gettext_noop ("end message ID for history replay"), |
1368 | &opt_until), | 1368 | &opt_until), |
1369 | 1369 | ||
1370 | GNUNET_GETOPT_OPTION_SET_ONE ('y', | 1370 | GNUNET_GETOPT_option_flag ('y', |
1371 | "deny", | 1371 | "deny", |
1372 | gettext_noop ("respond to entry requests by refusing all guests"), | 1372 | gettext_noop ("respond to entry requests by refusing all guests"), |
1373 | &opt_deny), | 1373 | &opt_deny), |
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index 6cfc56171..159afda53 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c | |||
@@ -379,39 +379,39 @@ int | |||
379 | main (int argc, char *const *argv) | 379 | main (int argc, char *const *argv) |
380 | { | 380 | { |
381 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 381 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
382 | GNUNET_GETOPT_OPTION_STRING ('n', | 382 | GNUNET_GETOPT_option_string ('n', |
383 | "name", | 383 | "name", |
384 | "NAME", | 384 | "NAME", |
385 | gettext_noop ("limit output to statistics for the given NAME"), | 385 | gettext_noop ("limit output to statistics for the given NAME"), |
386 | &name), | 386 | &name), |
387 | 387 | ||
388 | GNUNET_GETOPT_OPTION_SET_ONE ('p', | 388 | GNUNET_GETOPT_option_flag ('p', |
389 | "persistent", | 389 | "persistent", |
390 | gettext_noop ("make the value being set persistent"), | 390 | gettext_noop ("make the value being set persistent"), |
391 | &persistent), | 391 | &persistent), |
392 | 392 | ||
393 | GNUNET_GETOPT_OPTION_STRING ('s', | 393 | GNUNET_GETOPT_option_string ('s', |
394 | "subsystem", | 394 | "subsystem", |
395 | "SUBSYSTEM", | 395 | "SUBSYSTEM", |
396 | gettext_noop ("limit output to the given SUBSYSTEM"), | 396 | gettext_noop ("limit output to the given SUBSYSTEM"), |
397 | &subsystem), | 397 | &subsystem), |
398 | 398 | ||
399 | GNUNET_GETOPT_OPTION_SET_ONE ('q', | 399 | GNUNET_GETOPT_option_flag ('q', |
400 | "quiet", | 400 | "quiet", |
401 | gettext_noop ("just print the statistics value"), | 401 | gettext_noop ("just print the statistics value"), |
402 | &quiet), | 402 | &quiet), |
403 | 403 | ||
404 | GNUNET_GETOPT_OPTION_SET_ONE ('w', | 404 | GNUNET_GETOPT_option_flag ('w', |
405 | "watch", | 405 | "watch", |
406 | gettext_noop ("watch value continuously"), | 406 | gettext_noop ("watch value continuously"), |
407 | &watch), | 407 | &watch), |
408 | 408 | ||
409 | GNUNET_GETOPT_OPTION_STRING ('r', | 409 | GNUNET_GETOPT_option_string ('r', |
410 | "remote", | 410 | "remote", |
411 | "REMOTE", | 411 | "REMOTE", |
412 | gettext_noop ("connect to remote host"), | 412 | gettext_noop ("connect to remote host"), |
413 | &remote_host), | 413 | &remote_host), |
414 | GNUNET_GETOPT_OPTION_SET_ULONG ('o', | 414 | GNUNET_GETOPT_option_ulong ('o', |
415 | "port", | 415 | "port", |
416 | "PORT", | 416 | "PORT", |
417 | gettext_noop ("port for remote host"), | 417 | gettext_noop ("port for remote host"), |
diff --git a/src/testbed/generate-underlay-topology.c b/src/testbed/generate-underlay-topology.c index ab7d81c8b..2e78c60be 100644 --- a/src/testbed/generate-underlay-topology.c +++ b/src/testbed/generate-underlay-topology.c | |||
@@ -336,7 +336,7 @@ main (int argc, char *const argv[]) | |||
336 | { | 336 | { |
337 | struct GNUNET_GETOPT_CommandLineOption option[] = { | 337 | struct GNUNET_GETOPT_CommandLineOption option[] = { |
338 | 338 | ||
339 | GNUNET_GETOPT_OPTION_SET_UINT ('p', | 339 | GNUNET_GETOPT_option_uint ('p', |
340 | "num-peers", | 340 | "num-peers", |
341 | "COUNT", | 341 | "COUNT", |
342 | gettext_noop ("create COUNT number of peers"), | 342 | gettext_noop ("create COUNT number of peers"), |
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index 29f77193d..9829bbf0d 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -278,19 +278,19 @@ main (int argc, char *const *argv) | |||
278 | { | 278 | { |
279 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 279 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
280 | 280 | ||
281 | GNUNET_GETOPT_OPTION_SET_UINT ('p', | 281 | GNUNET_GETOPT_option_uint ('p', |
282 | "num-peers", | 282 | "num-peers", |
283 | "COUNT", | 283 | "COUNT", |
284 | gettext_noop ("create COUNT number of peers"), | 284 | gettext_noop ("create COUNT number of peers"), |
285 | &num_peers), | 285 | &num_peers), |
286 | 286 | ||
287 | GNUNET_GETOPT_OPTION_SET_UINT ('e', | 287 | GNUNET_GETOPT_option_uint ('e', |
288 | "num-errors", | 288 | "num-errors", |
289 | "COUNT", | 289 | "COUNT", |
290 | gettext_noop ("tolerate COUNT number of continious timeout failures"), | 290 | gettext_noop ("tolerate COUNT number of continious timeout failures"), |
291 | &num_cont_fails), | 291 | &num_cont_fails), |
292 | 292 | ||
293 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 293 | GNUNET_GETOPT_option_flag ('n', |
294 | "non-interactive", | 294 | "non-interactive", |
295 | gettext_noop ("run profiler in non-interactive mode where upon " | 295 | gettext_noop ("run profiler in non-interactive mode where upon " |
296 | "testbed setup the profiler does not wait for a " | 296 | "testbed setup the profiler does not wait for a " |
@@ -299,7 +299,7 @@ main (int argc, char *const *argv) | |||
299 | &noninteractive), | 299 | &noninteractive), |
300 | 300 | ||
301 | #if !ENABLE_SUPERMUC | 301 | #if !ENABLE_SUPERMUC |
302 | GNUNET_GETOPT_OPTION_STRING ('H', | 302 | GNUNET_GETOPT_option_string ('H', |
303 | "hosts", | 303 | "hosts", |
304 | "FILENAME", | 304 | "FILENAME", |
305 | gettext_noop ("name of the file with the login information for the testbed"), | 305 | gettext_noop ("name of the file with the login information for the testbed"), |
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c index 686b38192..3dbe65883 100644 --- a/src/testing/gnunet-testing.c +++ b/src/testing/gnunet-testing.c | |||
@@ -349,30 +349,30 @@ int | |||
349 | main (int argc, char *const *argv) | 349 | main (int argc, char *const *argv) |
350 | { | 350 | { |
351 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 351 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
352 | GNUNET_GETOPT_OPTION_SET_ONE ('C', | 352 | GNUNET_GETOPT_option_flag ('C', |
353 | "cfg", | 353 | "cfg", |
354 | gettext_noop ("create unique configuration files"), | 354 | gettext_noop ("create unique configuration files"), |
355 | &create_cfg), | 355 | &create_cfg), |
356 | GNUNET_GETOPT_OPTION_STRING ('k', | 356 | GNUNET_GETOPT_option_string ('k', |
357 | "key", | 357 | "key", |
358 | "FILENAME", | 358 | "FILENAME", |
359 | gettext_noop ("extract hostkey file from pre-computed hostkey list"), | 359 | gettext_noop ("extract hostkey file from pre-computed hostkey list"), |
360 | &create_hostkey), | 360 | &create_hostkey), |
361 | 361 | ||
362 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | 362 | GNUNET_GETOPT_option_uint ('n', |
363 | "number", | 363 | "number", |
364 | "NUMBER", | 364 | "NUMBER", |
365 | gettext_noop ("number of unique configuration files to create, or number of the hostkey to extract"), | 365 | gettext_noop ("number of unique configuration files to create, or number of the hostkey to extract"), |
366 | &create_no), | 366 | &create_no), |
367 | 367 | ||
368 | 368 | ||
369 | GNUNET_GETOPT_OPTION_STRING ('t', | 369 | GNUNET_GETOPT_option_string ('t', |
370 | "template", | 370 | "template", |
371 | "FILENAME", | 371 | "FILENAME", |
372 | gettext_noop ("configuration template"), | 372 | gettext_noop ("configuration template"), |
373 | &create_cfg_template), | 373 | &create_cfg_template), |
374 | 374 | ||
375 | GNUNET_GETOPT_OPTION_STRING ('r', | 375 | GNUNET_GETOPT_option_string ('r', |
376 | "run", | 376 | "run", |
377 | "SERVICE", | 377 | "SERVICE", |
378 | gettext_noop ("run the given service, wait on stdin for 'r' (restart) or 'q' (quit)"), | 378 | gettext_noop ("run the given service, wait on stdin for 'r' (restart) or 'q' (quit)"), |
diff --git a/src/testing/list-keys.c b/src/testing/list-keys.c index cfb49460a..9210486d3 100644 --- a/src/testing/list-keys.c +++ b/src/testing/list-keys.c | |||
@@ -83,7 +83,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
83 | int main (int argc, char *argv[]) | 83 | int main (int argc, char *argv[]) |
84 | { | 84 | { |
85 | struct GNUNET_GETOPT_CommandLineOption option[] = { | 85 | struct GNUNET_GETOPT_CommandLineOption option[] = { |
86 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | 86 | GNUNET_GETOPT_option_uint ('n', |
87 | "num-keys", | 87 | "num-keys", |
88 | "COUNT", | 88 | "COUNT", |
89 | gettext_noop ("list COUNT number of keys"), | 89 | gettext_noop ("list COUNT number of keys"), |
diff --git a/src/transport/gnunet-transport-profiler.c b/src/transport/gnunet-transport-profiler.c index 9292c42d4..d580fce08 100644 --- a/src/transport/gnunet-transport-profiler.c +++ b/src/transport/gnunet-transport-profiler.c | |||
@@ -612,35 +612,35 @@ main (int argc, char * const *argv) | |||
612 | 612 | ||
613 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 613 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
614 | 614 | ||
615 | GNUNET_GETOPT_OPTION_SET_ONE ('s', | 615 | GNUNET_GETOPT_option_flag ('s', |
616 | "send", | 616 | "send", |
617 | gettext_noop ("send data to peer"), | 617 | gettext_noop ("send data to peer"), |
618 | &benchmark_send), | 618 | &benchmark_send), |
619 | GNUNET_GETOPT_OPTION_SET_ONE ('r', | 619 | GNUNET_GETOPT_option_flag ('r', |
620 | "receive", | 620 | "receive", |
621 | gettext_noop ("receive data from peer"), | 621 | gettext_noop ("receive data from peer"), |
622 | &benchmark_receive), | 622 | &benchmark_receive), |
623 | GNUNET_GETOPT_OPTION_SET_UINT ('i', | 623 | GNUNET_GETOPT_option_uint ('i', |
624 | "iterations", | 624 | "iterations", |
625 | NULL, | 625 | NULL, |
626 | gettext_noop ("iterations"), | 626 | gettext_noop ("iterations"), |
627 | &benchmark_iterations), | 627 | &benchmark_iterations), |
628 | GNUNET_GETOPT_OPTION_SET_UINT ('n', | 628 | GNUNET_GETOPT_option_uint ('n', |
629 | "number", | 629 | "number", |
630 | NULL, | 630 | NULL, |
631 | gettext_noop ("number of messages to send"), | 631 | gettext_noop ("number of messages to send"), |
632 | &benchmark_count), | 632 | &benchmark_count), |
633 | GNUNET_GETOPT_OPTION_SET_UINT ('m', | 633 | GNUNET_GETOPT_option_uint ('m', |
634 | "messagesize", | 634 | "messagesize", |
635 | NULL, | 635 | NULL, |
636 | gettext_noop ("message size to use"), | 636 | gettext_noop ("message size to use"), |
637 | &benchmark_size), | 637 | &benchmark_size), |
638 | GNUNET_GETOPT_OPTION_STRING ('p', | 638 | GNUNET_GETOPT_option_string ('p', |
639 | "peer", | 639 | "peer", |
640 | "PEER", | 640 | "PEER", |
641 | gettext_noop ("peer identity"), | 641 | gettext_noop ("peer identity"), |
642 | &cpid), | 642 | &cpid), |
643 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 643 | GNUNET_GETOPT_option_verbose (&verbosity), |
644 | GNUNET_GETOPT_OPTION_END | 644 | GNUNET_GETOPT_OPTION_END |
645 | }; | 645 | }; |
646 | 646 | ||
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c index 8624b09b4..96d0a6a3a 100644 --- a/src/transport/gnunet-transport.c +++ b/src/transport/gnunet-transport.c | |||
@@ -1428,49 +1428,49 @@ main (int argc, | |||
1428 | { | 1428 | { |
1429 | int res; | 1429 | int res; |
1430 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 1430 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
1431 | GNUNET_GETOPT_OPTION_SET_ONE ('a', | 1431 | GNUNET_GETOPT_option_flag ('a', |
1432 | "all", | 1432 | "all", |
1433 | gettext_noop ("print information for all peers (instead of only connected peers)"), | 1433 | gettext_noop ("print information for all peers (instead of only connected peers)"), |
1434 | &iterate_all), | 1434 | &iterate_all), |
1435 | GNUNET_GETOPT_OPTION_SET_ONE ('b', | 1435 | GNUNET_GETOPT_option_flag ('b', |
1436 | "benchmark", | 1436 | "benchmark", |
1437 | gettext_noop ("measure how fast we are receiving data from all peers (until CTRL-C)"), | 1437 | gettext_noop ("measure how fast we are receiving data from all peers (until CTRL-C)"), |
1438 | &benchmark_receive), | 1438 | &benchmark_receive), |
1439 | GNUNET_GETOPT_OPTION_SET_ONE ('D', | 1439 | GNUNET_GETOPT_option_flag ('D', |
1440 | "disconnect", | 1440 | "disconnect", |
1441 | gettext_noop ("disconnect from a peer"), | 1441 | gettext_noop ("disconnect from a peer"), |
1442 | &do_disconnect), | 1442 | &do_disconnect), |
1443 | GNUNET_GETOPT_OPTION_SET_ONE ('i', | 1443 | GNUNET_GETOPT_option_flag ('i', |
1444 | "information", | 1444 | "information", |
1445 | gettext_noop ("provide information about all current connections (once)"), | 1445 | gettext_noop ("provide information about all current connections (once)"), |
1446 | &iterate_connections), | 1446 | &iterate_connections), |
1447 | GNUNET_GETOPT_OPTION_SET_ONE ('m', | 1447 | GNUNET_GETOPT_option_flag ('m', |
1448 | "monitor", | 1448 | "monitor", |
1449 | gettext_noop ("provide information about all current connections (continuously)"), | 1449 | gettext_noop ("provide information about all current connections (continuously)"), |
1450 | &monitor_connections), | 1450 | &monitor_connections), |
1451 | GNUNET_GETOPT_OPTION_SET_ONE ('e', | 1451 | GNUNET_GETOPT_option_flag ('e', |
1452 | "events", | 1452 | "events", |
1453 | gettext_noop ("provide information about all connects and disconnect events (continuously)"), | 1453 | gettext_noop ("provide information about all connects and disconnect events (continuously)"), |
1454 | &monitor_connects), | 1454 | &monitor_connects), |
1455 | GNUNET_GETOPT_OPTION_SET_ONE ('n', | 1455 | GNUNET_GETOPT_option_flag ('n', |
1456 | "numeric", | 1456 | "numeric", |
1457 | gettext_noop ("do not resolve hostnames"), | 1457 | gettext_noop ("do not resolve hostnames"), |
1458 | &numeric), | 1458 | &numeric), |
1459 | GNUNET_GETOPT_OPTION_SET_BASE32_AUTO ('p', | 1459 | GNUNET_GETOPT_option_base32_auto ('p', |
1460 | "peer", | 1460 | "peer", |
1461 | "PEER", | 1461 | "PEER", |
1462 | gettext_noop ("peer identity"), | 1462 | gettext_noop ("peer identity"), |
1463 | &pid), | 1463 | &pid), |
1464 | GNUNET_GETOPT_OPTION_SET_ONE ('P', | 1464 | GNUNET_GETOPT_option_flag ('P', |
1465 | "plugins", | 1465 | "plugins", |
1466 | gettext_noop ("monitor plugin sessions"), | 1466 | gettext_noop ("monitor plugin sessions"), |
1467 | &monitor_plugins), | 1467 | &monitor_plugins), |
1468 | GNUNET_GETOPT_OPTION_SET_ONE ('s', | 1468 | GNUNET_GETOPT_option_flag ('s', |
1469 | "send", | 1469 | "send", |
1470 | gettext_noop | 1470 | gettext_noop |
1471 | ("send data for benchmarking to the other peer (until CTRL-C)"), | 1471 | ("send data for benchmarking to the other peer (until CTRL-C)"), |
1472 | &benchmark_send), | 1472 | &benchmark_send), |
1473 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 1473 | GNUNET_GETOPT_option_verbose (&verbosity), |
1474 | GNUNET_GETOPT_OPTION_END | 1474 | GNUNET_GETOPT_OPTION_END |
1475 | }; | 1475 | }; |
1476 | 1476 | ||
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c index 7c2d3e55a..1f1f6c063 100644 --- a/src/transport/tcp_service_legacy.c +++ b/src/transport/tcp_service_legacy.c | |||
@@ -1392,15 +1392,15 @@ LEGACY_SERVICE_run (int argc, char *const *argv, | |||
1392 | const char *xdg; | 1392 | const char *xdg; |
1393 | 1393 | ||
1394 | struct GNUNET_GETOPT_CommandLineOption service_options[] = { | 1394 | struct GNUNET_GETOPT_CommandLineOption service_options[] = { |
1395 | GNUNET_GETOPT_OPTION_CFG_FILE (&opt_cfg_fn), | 1395 | GNUNET_GETOPT_option_cfgfile (&opt_cfg_fn), |
1396 | GNUNET_GETOPT_OPTION_SET_ONE ('d', | 1396 | GNUNET_GETOPT_option_flag ('d', |
1397 | "daemonize", | 1397 | "daemonize", |
1398 | gettext_noop ("do daemonize (detach from terminal)"), | 1398 | gettext_noop ("do daemonize (detach from terminal)"), |
1399 | &do_daemonize), | 1399 | &do_daemonize), |
1400 | GNUNET_GETOPT_OPTION_HELP (NULL), | 1400 | GNUNET_GETOPT_option_help (NULL), |
1401 | GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev), | 1401 | GNUNET_GETOPT_option_loglevel (&loglev), |
1402 | GNUNET_GETOPT_OPTION_LOGFILE (&logfile), | 1402 | GNUNET_GETOPT_option_logfile (&logfile), |
1403 | GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION), | 1403 | GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION), |
1404 | GNUNET_GETOPT_OPTION_END | 1404 | GNUNET_GETOPT_OPTION_END |
1405 | }; | 1405 | }; |
1406 | err = 1; | 1406 | err = 1; |
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), |
diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c index 0adbd5c96..34c545339 100644 --- a/src/vpn/gnunet-vpn.c +++ b/src/vpn/gnunet-vpn.c | |||
@@ -287,51 +287,51 @@ int | |||
287 | main (int argc, char *const *argv) | 287 | main (int argc, char *const *argv) |
288 | { | 288 | { |
289 | struct GNUNET_GETOPT_CommandLineOption options[] = { | 289 | struct GNUNET_GETOPT_CommandLineOption options[] = { |
290 | GNUNET_GETOPT_OPTION_SET_ONE ('4', | 290 | GNUNET_GETOPT_option_flag ('4', |
291 | "ipv4", | 291 | "ipv4", |
292 | gettext_noop ("request that result should be an IPv4 address"), | 292 | gettext_noop ("request that result should be an IPv4 address"), |
293 | &ipv4), | 293 | &ipv4), |
294 | 294 | ||
295 | GNUNET_GETOPT_OPTION_SET_ONE ('6', | 295 | GNUNET_GETOPT_option_flag ('6', |
296 | "ipv6", | 296 | "ipv6", |
297 | gettext_noop ("request that result should be an IPv6 address"), | 297 | gettext_noop ("request that result should be an IPv6 address"), |
298 | &ipv6), | 298 | &ipv6), |
299 | 299 | ||
300 | GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d', | 300 | GNUNET_GETOPT_option_relative_time ('d', |
301 | "duration", | 301 | "duration", |
302 | "TIME", | 302 | "TIME", |
303 | gettext_noop ("how long should the mapping be valid for new tunnels?"), | 303 | gettext_noop ("how long should the mapping be valid for new tunnels?"), |
304 | &duration), | 304 | &duration), |
305 | 305 | ||
306 | GNUNET_GETOPT_OPTION_STRING ('i', | 306 | GNUNET_GETOPT_option_string ('i', |
307 | "ip", | 307 | "ip", |
308 | "IP", | 308 | "IP", |
309 | gettext_noop ("destination IP for the tunnel"), | 309 | gettext_noop ("destination IP for the tunnel"), |
310 | &target_ip), | 310 | &target_ip), |
311 | 311 | ||
312 | GNUNET_GETOPT_OPTION_STRING ('p', | 312 | GNUNET_GETOPT_option_string ('p', |
313 | "peer", | 313 | "peer", |
314 | "PEERID", | 314 | "PEERID", |
315 | gettext_noop ("peer offering the service we would like to access"), | 315 | gettext_noop ("peer offering the service we would like to access"), |
316 | &peer_id), | 316 | &peer_id), |
317 | 317 | ||
318 | GNUNET_GETOPT_OPTION_STRING ('s', | 318 | GNUNET_GETOPT_option_string ('s', |
319 | "service", | 319 | "service", |
320 | "NAME", | 320 | "NAME", |
321 | gettext_noop ("name of the service we would like to access"), | 321 | gettext_noop ("name of the service we would like to access"), |
322 | &service_name), | 322 | &service_name), |
323 | 323 | ||
324 | GNUNET_GETOPT_OPTION_SET_ONE ('t', | 324 | GNUNET_GETOPT_option_flag ('t', |
325 | "tcp", | 325 | "tcp", |
326 | gettext_noop ("service is offered via TCP"), | 326 | gettext_noop ("service is offered via TCP"), |
327 | &tcp), | 327 | &tcp), |
328 | 328 | ||
329 | GNUNET_GETOPT_OPTION_SET_ONE ('u', | 329 | GNUNET_GETOPT_option_flag ('u', |
330 | "udp", | 330 | "udp", |
331 | gettext_noop ("service is offered via UDP"), | 331 | gettext_noop ("service is offered via UDP"), |
332 | &udp), | 332 | &udp), |
333 | 333 | ||
334 | GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), | 334 | GNUNET_GETOPT_option_verbose (&verbosity), |
335 | 335 | ||
336 | GNUNET_GETOPT_OPTION_END | 336 | GNUNET_GETOPT_OPTION_END |
337 | }; | 337 | }; |