From 5a7cef0202631204485cbcb1e36671e4321a936f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 25 Mar 2017 21:25:44 +0100 Subject: rename GNUNET_GETOPT functions to achieve better consistency --- src/arm/gnunet-arm.c | 24 +++++----- src/ats-tests/gnunet-solver-eval.c | 6 +-- src/ats-tool/gnunet-ats.c | 22 ++++----- src/ats/gnunet-ats-solver-eval.c | 12 ++--- src/ats/perf_ats_solver.c | 14 +++--- src/auction/gnunet-auction-create.c | 14 +++--- src/cadet/gnunet-cadet.c | 16 +++---- src/cadet/test_cadet.c | 4 +- src/consensus/gnunet-consensus-profiler.c | 16 +++---- src/conversation/gnunet-conversation.c | 4 +- src/core/gnunet-core.c | 2 +- src/datastore/gnunet-datastore.c | 2 +- src/dht/gnunet-dht-get.c | 12 ++--- src/dht/gnunet-dht-monitor.c | 8 ++-- src/dht/gnunet-dht-put.c | 16 +++---- src/dht/gnunet_dht_profiler.c | 16 +++---- src/dns/gnunet-dns-monitor.c | 6 +-- src/dns/gnunet-dns-redirector.c | 6 +-- src/dv/gnunet-dv.c | 2 +- src/fs/gnunet-auto-share.c | 12 ++--- src/fs/gnunet-download.c | 16 +++---- src/fs/gnunet-fs-profiler.c | 6 +-- src/fs/gnunet-fs.c | 4 +- src/fs/gnunet-publish.c | 26 +++++----- src/fs/gnunet-search.c | 12 ++--- src/fs/gnunet-unindex.c | 2 +- src/gns/gnunet-bcd.c | 2 +- src/gns/gnunet-dns2gns.c | 10 ++-- src/gns/gnunet-gns-proxy.c | 4 +- src/gns/gnunet-gns.c | 12 ++--- src/hostlist/gnunet-daemon-hostlist.c | 8 ++-- src/identity-provider/gnunet-identity-token.c | 4 +- src/identity/gnunet-identity.c | 12 ++--- src/include/gnunet_getopt_lib.h | 38 +++++++-------- src/namecache/gnunet-namecache.c | 4 +- src/namestore/gnunet-namestore.c | 28 +++++------ src/nat-auto/gnunet-nat-auto.c | 10 ++-- src/nat/gnunet-nat.c | 14 +++--- src/nse/gnunet-nse-profiler.c | 14 +++--- src/peerinfo-tool/gnunet-peerinfo.c | 16 +++---- src/regex/gnunet-regex-profiler.c | 10 ++-- src/regex/gnunet-regex-simulation-profiler.c | 4 +- src/rest/gnunet-rest-server.c | 2 +- src/revocation/gnunet-revocation.c | 8 ++-- src/rps/gnunet-rps.c | 2 +- src/scalarproduct/gnunet-scalarproduct.c | 8 ++-- src/secretsharing/gnunet-secretsharing-profiler.c | 12 ++--- src/set/gnunet-set-ibf-profiler.c | 10 ++-- src/set/gnunet-set-profiler.c | 18 +++---- src/social/gnunet-social.c | 58 +++++++++++------------ src/statistics/gnunet-statistics.c | 14 +++--- src/testbed/generate-underlay-topology.c | 2 +- src/testbed/gnunet-testbed-profiler.c | 8 ++-- src/testing/gnunet-testing.c | 10 ++-- src/testing/list-keys.c | 2 +- src/transport/gnunet-transport-profiler.c | 14 +++--- src/transport/gnunet-transport.c | 22 ++++----- src/transport/tcp_service_legacy.c | 12 ++--- src/util/getopt_helpers.c | 34 ++++++------- src/util/gnunet-config.c | 12 ++--- src/util/gnunet-ecc.c | 10 ++-- src/util/gnunet-resolver.c | 2 +- src/util/gnunet-scrypt.c | 8 ++-- src/util/program.c | 10 ++-- src/util/service.c | 12 ++--- src/util/test_getopt.c | 16 +++---- src/util/test_program.c | 14 +++--- src/vpn/gnunet-vpn.c | 18 +++---- 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('e', + GNUNET_GETOPT_option_flag ('e', "end", gettext_noop ("stop all GNUnet services"), &end), - GNUNET_GETOPT_OPTION_STRING ('i', + GNUNET_GETOPT_option_string ('i', "init", "SERVICE", gettext_noop ("start a particular service"), &init), - GNUNET_GETOPT_OPTION_STRING ('k', + GNUNET_GETOPT_option_string ('k', "kill", "SERVICE", gettext_noop ("stop a particular service"), &term), - GNUNET_GETOPT_OPTION_SET_ONE ('s', + GNUNET_GETOPT_option_flag ('s', "start", gettext_noop ("start all GNUnet default services"), &start), - GNUNET_GETOPT_OPTION_SET_ONE ('r', + GNUNET_GETOPT_option_flag ('r', "restart", gettext_noop ("stop and start all GNUnet default services"), &restart), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_flag ('d', "delete", gettext_noop ("delete config file and directory on exit"), &delete), - GNUNET_GETOPT_OPTION_SET_ONE ('m', + GNUNET_GETOPT_option_flag ('m', "monitor", gettext_noop ("monitor ARM activities"), &monitor), - GNUNET_GETOPT_OPTION_SET_ONE ('q', + GNUNET_GETOPT_option_flag ('q', "quiet", gettext_noop ("don't print status messages"), &quiet), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', + GNUNET_GETOPT_option_relative_time ('T', "timeout", "DELAY", gettext_noop ("exit with error status if operation does not finish after DELAY"), &timeout), - GNUNET_GETOPT_OPTION_SET_ONE ('I', + GNUNET_GETOPT_option_flag ('I', "info", gettext_noop ("list currently running services"), &list), - GNUNET_GETOPT_OPTION_SET_ONE ('O', + GNUNET_GETOPT_option_flag ('O', "no-stdout", gettext_noop ("don't let gnunet-service-arm inherit standard output"), &no_stdout), - GNUNET_GETOPT_OPTION_SET_ONE ('E', + GNUNET_GETOPT_option_flag ('E', "no-stderr", gettext_noop ("don't let gnunet-service-arm inherit standard error"), &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[]) struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('s', + GNUNET_GETOPT_option_string ('s', "solver", NULL, gettext_noop ("solver to use"), &opt_solver), - GNUNET_GETOPT_OPTION_STRING ('e', + GNUNET_GETOPT_option_string ('e', "experiment", NULL, gettext_noop ("experiment to use"), &opt_exp_file), - GNUNET_GETOPT_OPTION_SET_ONE ('e', + GNUNET_GETOPT_option_flag ('e', "experiment", gettext_noop ("experiment to use"), &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, opt_type_str = NULL; struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('u', + GNUNET_GETOPT_option_flag ('u', "used", gettext_noop ("get list of active addresses currently used"), &opt_list_used), - GNUNET_GETOPT_OPTION_SET_ONE ('a', + GNUNET_GETOPT_option_flag ('a', "all", gettext_noop ("get list of all active addresses"), &opt_list_all), - GNUNET_GETOPT_OPTION_STRING ('C', + GNUNET_GETOPT_option_string ('C', "connect", NULL, gettext_noop ("connect to PEER"), &cpid_str), - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "numeric", gettext_noop ("do not resolve IP addresses to hostnames"), &opt_resolve_addresses_numeric), - GNUNET_GETOPT_OPTION_SET_ONE ('m', + GNUNET_GETOPT_option_flag ('m', "monitor", gettext_noop ("monitor mode"), &opt_monitor), - GNUNET_GETOPT_OPTION_SET_ONE ('p', + GNUNET_GETOPT_option_flag ('p', "preference", gettext_noop ("set preference for the given peer"), &opt_set_pref), - GNUNET_GETOPT_OPTION_SET_ONE ('q', + GNUNET_GETOPT_option_flag ('q', "quotas", gettext_noop ("print all configured quotas"), &opt_print_quotas), - GNUNET_GETOPT_OPTION_STRING ('i', + GNUNET_GETOPT_option_string ('i', "id", "TYPE", gettext_noop ("peer id"), &opt_pid_str), - GNUNET_GETOPT_OPTION_STRING ('t', + GNUNET_GETOPT_option_string ('t', "type", "TYPE", gettext_noop ("preference type to set: latency | bandwidth"), &opt_type_str), - GNUNET_GETOPT_OPTION_SET_UINT ('k', + GNUNET_GETOPT_option_uint ('k', "value", "VALUE", gettext_noop ("preference value"), &opt_pref_value), - GNUNET_GETOPT_OPTION_SET_ONE ('V', + GNUNET_GETOPT_option_flag ('V', "verbose", gettext_noop ("verbose output (include ATS address properties)"), &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[]) static struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('s', + GNUNET_GETOPT_option_string ('s', "solver", gettext_noop ("solver to use"), &opt_solver), - GNUNET_GETOPT_OPTION_STRING ('e', + GNUNET_GETOPT_option_string ('e', "experiment" gettext_noop ("experiment to use"), &opt_exp_file), - GNUNET_GETOPT_OPTION_VERBOSE (&opt_verbose), + GNUNET_GETOPT_option_verbose (&opt_verbose), - GNUNET_GETOPT_OPTION_SET_ONE ('p', + GNUNET_GETOPT_option_flag ('p', "print", gettext_noop ("print logging"), &opt_print), - GNUNET_GETOPT_OPTION_SET_ONE ('f', + GNUNET_GETOPT_option_flag ('f', "file", gettext_noop ("save logging to disk"), &opt_save), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_flag ('d', "dn", gettext_noop ("disable normalization"), &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[]) static struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('a', + GNUNET_GETOPT_option_uint ('a', "addresses", gettext_noop ("addresses to use"), &ph.N_address), - GNUNET_GETOPT_OPTION_SET_UINT ('s', + GNUNET_GETOPT_option_uint ('s', "start", gettext_noop ("start with peer"), &ph.N_peers_start), - GNUNET_GETOPT_OPTION_SET_UINT ('e', + GNUNET_GETOPT_option_uint ('e', "end", gettext_noop ("end with peer"), &ph.N_peers_end), - GNUNET_GETOPT_OPTION_SET_UINT ('i', + GNUNET_GETOPT_option_uint ('i', "iterations", gettext_noop ("number of iterations used for averaging (default: 1)"), &ph.total_iterations), - GNUNET_GETOPT_OPTION_SET_UINT ('p', + GNUNET_GETOPT_option_uint ('p', "percentage", gettext_noop ("update a fix percentage of addresses"), &ph.opt_update_percent), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_flag ('d', "data", gettext_noop ("create data file"), &ph.create_datafile), - GNUNET_GETOPT_OPTION_SET_ONE ('u', + GNUNET_GETOPT_option_flag ('u', "update", gettext_noop ("measure updates"), &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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_FILENAME ('d', + GNUNET_GETOPT_option_filename ('d', "description", "FILE", gettext_noop ("description of the item to be sold"), &fndesc), - GNUNET_GETOPT_OPTION_FILENAME ('p', + GNUNET_GETOPT_option_filename ('p', "pricemap", "FILE", gettext_noop ("mapping of possible prices"), &fnprices), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('r', + GNUNET_GETOPT_option_relative_time ('r', "roundtime", "DURATION", gettext_noop ("max duration per round"), &dround), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('s', + GNUNET_GETOPT_option_relative_time ('s', "regtime", "DURATION", gettext_noop ("duration until auction starts"), &dstart), - GNUNET_GETOPT_OPTION_SET_UINT ('m', + GNUNET_GETOPT_option_uint ('m', "m", "NUMBER", gettext_noop ("number of items to sell\n" @@ -188,12 +188,12 @@ main (int argc, char *const *argv) ">0 for vickrey/M+1st price auction"), &m), - GNUNET_GETOPT_OPTION_SET_ONE ('u', + GNUNET_GETOPT_option_flag ('u', "public", gettext_noop ("public auction outcome"), &outcome), - GNUNET_GETOPT_OPTION_SET_ONE ('i', + GNUNET_GETOPT_option_flag ('i', "interactive", gettext_noop ("keep running in foreground until auction completes"), &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, const char helpstr[] = "Create tunnels and retrieve info about CADET's status."; struct GNUNET_GETOPT_CommandLineOption options[] = { /* I would use the terminology 'circuit' here... --lynX */ - GNUNET_GETOPT_OPTION_STRING ('C', + GNUNET_GETOPT_option_string ('C', "connection", "CONNECTION_ID", gettext_noop ("Provide information about a particular connection"), &conn_id), - GNUNET_GETOPT_OPTION_SET_ONE ('e', + GNUNET_GETOPT_option_flag ('e', "echo", gettext_noop ("Activate echo mode"), &echo), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_flag ('d', "dump", gettext_noop ("Dump debug information to STDERR"), &dump), - GNUNET_GETOPT_OPTION_STRING ('o', + GNUNET_GETOPT_option_string ('o', "open-port", "SHARED_SECRET", gettext_noop ("Listen for connections using a shared secret among sender and recipient"), &listen_port), - GNUNET_GETOPT_OPTION_STRING ('p', + GNUNET_GETOPT_option_string ('p', "peer", "PEER_ID", gettext_noop ("Provide information about a patricular peer"), &peer_id), - GNUNET_GETOPT_OPTION_SET_ONE ('P', + GNUNET_GETOPT_option_flag ('P', "peers", gettext_noop ("Provide information about all peers"), &request_peers), - GNUNET_GETOPT_OPTION_STRING ('t', + GNUNET_GETOPT_option_string ('t', "tunnel", "TUNNEL_ID", gettext_noop ("Provide information about a particular tunnel"), &tunnel_id), - GNUNET_GETOPT_OPTION_SET_ONE ('T', + GNUNET_GETOPT_option_flag ('T', "tunnels", gettext_noop ("Provide information about all tunnels"), &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[]) const char *config_file; char port_id[] = "test port"; struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', + GNUNET_GETOPT_option_relative_time ('t', "time", "short_time", gettext_noop ("set short timeout"), &short_time), - GNUNET_GETOPT_OPTION_SET_UINT ('m', + GNUNET_GETOPT_option_uint ('m', "messages", "NUM_MESSAGES", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('n', + GNUNET_GETOPT_option_uint ('n', "num-peers", NULL, gettext_noop ("number of peers in consensus"), &num_peers), - GNUNET_GETOPT_OPTION_SET_UINT ('k', + GNUNET_GETOPT_option_uint ('k', "value-replication", NULL, gettext_noop ("how many peers (random selection without replacement) receive one value?"), &replication), - GNUNET_GETOPT_OPTION_SET_UINT ('x', + GNUNET_GETOPT_option_uint ('x', "num-values", NULL, gettext_noop ("number of values"), &num_values), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', + GNUNET_GETOPT_option_relative_time ('t', "timeout", NULL, gettext_noop ("consensus timeout"), &conclude_timeout), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d', + GNUNET_GETOPT_option_relative_time ('d', "delay", NULL, gettext_noop ("delay until consensus starts"), &consensus_delay), - GNUNET_GETOPT_OPTION_FILENAME ('s', + GNUNET_GETOPT_option_filename ('s', "statistics", "FILENAME", gettext_noop ("write statistics to file"), &statistics_filename), - GNUNET_GETOPT_OPTION_SET_ONE ('S', + GNUNET_GETOPT_option_flag ('S', "dist-static", gettext_noop ("distribute elements to a static subset of good peers"), &dist_static), - GNUNET_GETOPT_OPTION_SET_ONE ('V', + GNUNET_GETOPT_option_flag ('V', "verbose", gettext_noop ("be more verbose (print received values)"), &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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('e', + GNUNET_GETOPT_option_string ('e', "ego", "NAME", gettext_noop ("sets the NAME of the ego to use for the phone (and name resolution)"), &ego_name), - GNUNET_GETOPT_OPTION_STRING ('p', + GNUNET_GETOPT_option_string ('p', "phone", "LINE", 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, { int res; struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('m', + GNUNET_GETOPT_option_flag ('m', "monitor", gettext_noop ("provide information about all current connections (continuously)"), &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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_FILENAME ('s', + GNUNET_GETOPT_option_filename ('s', "sourcecfg", "FILENAME", 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) struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('k', + GNUNET_GETOPT_option_string ('k', "key", "KEY", gettext_noop ("the query key"), &query_key), - GNUNET_GETOPT_OPTION_SET_UINT ('r', + GNUNET_GETOPT_option_uint ('r', "replication", "LEVEL", gettext_noop ("how many parallel requests (replicas) to create"), &replication), - GNUNET_GETOPT_OPTION_SET_UINT ('t', + GNUNET_GETOPT_option_uint ('t', "type", "TYPE", gettext_noop ("the type of data to look for"), &query_type), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', + GNUNET_GETOPT_option_relative_time ('T', "timeout", "TIMEOUT", gettext_noop ("how long to execute this query before giving up?"), &timeout_request), - GNUNET_GETOPT_OPTION_SET_ONE ('x', + GNUNET_GETOPT_option_flag ('x', "demultiplex", gettext_noop ("use DHT's demultiplex everywhere option"), &demultixplex_everywhere), - GNUNET_GETOPT_OPTION_VERBOSE (&verbose), + GNUNET_GETOPT_option_verbose (&verbose), GNUNET_GETOPT_OPTION_END }; 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('k', + GNUNET_GETOPT_option_string ('k', "key", "KEY", gettext_noop ("the query key"), &query_key), - GNUNET_GETOPT_OPTION_SET_UINT ('t', + GNUNET_GETOPT_option_uint ('t', "type", "TYPE", gettext_noop ("the type of data to look for"), &block_type), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', + GNUNET_GETOPT_option_relative_time ('T', "timeout", "TIMEOUT", gettext_noop ("how long should the monitor command run"), &timeout_request), - GNUNET_GETOPT_OPTION_SET_ONE ('V', + GNUNET_GETOPT_option_flag ('V', "verbose", gettext_noop ("be verbose (print progress information)"), &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) struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('d', + GNUNET_GETOPT_option_string ('d', "data", "DATA", gettext_noop ("the data to insert under the key"), &data), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('e', + GNUNET_GETOPT_option_relative_time ('e', "expiration", "EXPIRATION", gettext_noop ("how long to store this entry in the dht (in seconds)"), &expiration), - GNUNET_GETOPT_OPTION_STRING ('k', + GNUNET_GETOPT_option_string ('k', "key", "KEY", gettext_noop ("the query key"), &query_key), - GNUNET_GETOPT_OPTION_SET_ONE ('x', + GNUNET_GETOPT_option_flag ('x', "demultiplex", gettext_noop ("use DHT's demultiplex everywhere option"), &demultixplex_everywhere), - GNUNET_GETOPT_OPTION_SET_UINT ('r', + GNUNET_GETOPT_option_uint ('r', "replication", "LEVEL", gettext_noop ("how many replicas to create"), &replication), - GNUNET_GETOPT_OPTION_SET_ONE ('R', + GNUNET_GETOPT_option_flag ('R', "record", gettext_noop ("use DHT's record route option"), &record_route), - GNUNET_GETOPT_OPTION_SET_UINT ('t', + GNUNET_GETOPT_option_uint ('t', "type", "TYPE", gettext_noop ("the type to insert data as"), &query_type), - GNUNET_GETOPT_OPTION_VERBOSE (&verbose), + GNUNET_GETOPT_option_verbose (&verbose), GNUNET_GETOPT_OPTION_END }; 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) int rc; struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('n', + GNUNET_GETOPT_option_uint ('n', "peers", "COUNT", gettext_noop ("number of peers to start"), &num_peers), - GNUNET_GETOPT_OPTION_SET_UINT ('s', + GNUNET_GETOPT_option_uint ('s', "searches", "COUNT", gettext_noop ("maximum number of times we try to search for successor circle formation (0 for R5N)"), &max_searches), - GNUNET_GETOPT_OPTION_STRING ('H', + GNUNET_GETOPT_option_string ('H', "hosts", "FILENAME", gettext_noop ("name of the file with the login information for the testbed"), &hosts_file), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D', + GNUNET_GETOPT_option_relative_time ('D', "delay", "DELAY", gettext_noop ("delay between rounds for collecting statistics (default: 30 sec)"), &delay_stats), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('P', + GNUNET_GETOPT_option_relative_time ('P', "PUT-delay", "DELAY", gettext_noop ("delay to start doing PUTs (default: 1 sec)"), &delay_put), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('G', + GNUNET_GETOPT_option_relative_time ('G', "GET-delay", "DELAY", gettext_noop ("delay to start doing GETs (default: 5 min)"), &delay_get), - GNUNET_GETOPT_OPTION_SET_UINT ('r', + GNUNET_GETOPT_option_uint ('r', "replication", "DEGREE", gettext_noop ("replication degree for DHT PUTs"), &replication), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', + GNUNET_GETOPT_option_relative_time ('t', "timeout", "TIMEOUT", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('i', + GNUNET_GETOPT_option_flag ('i', "inbound-only", gettext_noop ("only monitor DNS queries"), &inbound_only), - GNUNET_GETOPT_OPTION_SET_ONE ('o', + GNUNET_GETOPT_option_flag ('o', "outbound-only", gettext_noop ("only monitor DNS queries"), &outbound_only), - GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), + GNUNET_GETOPT_option_verbose (&verbosity), GNUNET_GETOPT_OPTION_END }; 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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('4', + GNUNET_GETOPT_option_string ('4', "ipv4", "IPV4", gettext_noop ("set A records"), &n4), - GNUNET_GETOPT_OPTION_STRING ('6', + GNUNET_GETOPT_option_string ('6', "ipv4", "IPV6", gettext_noop ("set AAAA records"), &n6), - GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), + GNUNET_GETOPT_option_verbose (&verbosity), GNUNET_GETOPT_OPTION_END }; 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) struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_VERBOSE (&verbose), + GNUNET_GETOPT_option_verbose (&verbose), GNUNET_GETOPT_OPTION_END }; 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('a', + GNUNET_GETOPT_option_uint ('a', "anonymity", "LEVEL", gettext_noop ("set the desired LEVEL of sender-anonymity"), &anonymity_level), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_flag ('d', "disable-creation-time", gettext_noop ("disable adding the creation time to the metadata of the uploaded file"), &do_disable_creation_time), - GNUNET_GETOPT_OPTION_SET_ONE ('D', + GNUNET_GETOPT_option_flag ('D', "disable-extractor", gettext_noop ("do not use libextractor to add keywords or metadata"), &disable_extractor), - GNUNET_GETOPT_OPTION_SET_UINT ('p', + GNUNET_GETOPT_option_uint ('p', "priority", "PRIORITY", gettext_noop ("specify the priority of the content"), &content_priority), - GNUNET_GETOPT_OPTION_SET_UINT ('r', + GNUNET_GETOPT_option_uint ('r', "replication", "LEVEL", gettext_noop ("set the desired replication LEVEL"), &replication_level), - GNUNET_GETOPT_OPTION_VERBOSE (&verbose), + GNUNET_GETOPT_option_verbose (&verbose), GNUNET_GETOPT_OPTION_END }; 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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('a', + GNUNET_GETOPT_option_uint ('a', "anonymity", "LEVEL", gettext_noop ("set the desired LEVEL of receiver-anonymity"), &anonymity), - GNUNET_GETOPT_OPTION_SET_ONE ('D', + GNUNET_GETOPT_option_flag ('D', "delete-incomplete", gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"), &delete_incomplete), - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "no-network", gettext_noop ("only search the local peer (no P2P network search)"), &local_only), - GNUNET_GETOPT_OPTION_STRING ('o', + GNUNET_GETOPT_option_string ('o', "output", "FILENAME", gettext_noop ("write the file to FILENAME"), &filename), - GNUNET_GETOPT_OPTION_SET_UINT ('p', + GNUNET_GETOPT_option_uint ('p', "parallelism", "DOWNLOADS", gettext_noop ("set the maximum number of parallel downloads that is allowed"), ¶llelism), - GNUNET_GETOPT_OPTION_SET_UINT ('r', + GNUNET_GETOPT_option_uint ('r', "request-parallelism", "REQUESTS", gettext_noop ("set the maximum number of parallel requests for blocks that is allowed"), &request_parallelism), - GNUNET_GETOPT_OPTION_SET_ONE ('R', + GNUNET_GETOPT_option_flag ('R', "recursive", gettext_noop ("download a GNUnet directory recursively"), &do_recursive), - GNUNET_GETOPT_OPTION_INCREMENT_VALUE ('V', + GNUNET_GETOPT_option_increment_uint ('V', "verbose", gettext_noop ("be verbose (print progress information)"), &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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('n', + GNUNET_GETOPT_option_uint ('n', "num-peers", "COUNT", gettext_noop ("run the experiment with COUNT peers"), &num_peers), - GNUNET_GETOPT_OPTION_STRING ('H', + GNUNET_GETOPT_option_string ('H', "hosts", "HOSTFILE", gettext_noop ("specifies name of a file with the HOSTS the testbed should use"), &host_filename), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', + GNUNET_GETOPT_option_relative_time ('t', "timeout", "DELAY", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('i', + GNUNET_GETOPT_option_flag ('i', "list-indexed", gettext_noop ("print a list of all indexed files"), &list_indexed_files), - GNUNET_GETOPT_OPTION_VERBOSE (&verbose), + GNUNET_GETOPT_option_verbose (&verbose), GNUNET_GETOPT_OPTION_END }; 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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('a', + GNUNET_GETOPT_option_uint ('a', "anonymity", "LEVEL", gettext_noop ("set the desired LEVEL of sender-anonymity"), &bo.anonymity_level), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_flag ('d', "disable-creation-time", gettext_noop ("disable adding the creation time to the " "metadata of the uploaded file"), &do_disable_creation_time), - GNUNET_GETOPT_OPTION_SET_ONE ('D', + GNUNET_GETOPT_option_flag ('D', "disable-extractor", gettext_noop ("do not use libextractor to add keywords or metadata"), &disable_extractor), - GNUNET_GETOPT_OPTION_SET_ONE ('e', + GNUNET_GETOPT_option_flag ('e', "extract", gettext_noop ("print list of extracted keywords that would " "be used, but do not perform upload"), @@ -930,60 +930,60 @@ main (int argc, char *const *argv) gettext_noop ("set the meta-data for the given TYPE to the given VALUE"), &meta), - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "noindex", gettext_noop ("do not index, perform full insertion (stores " "entire file in encrypted form in GNUnet database)"), &do_insert), - GNUNET_GETOPT_OPTION_STRING ('N', + GNUNET_GETOPT_option_string ('N', "next", "ID", gettext_noop ("specify ID of an updated version to be " "published in the future (for namespace insertions only)"), &next_id), - GNUNET_GETOPT_OPTION_SET_UINT ('p', + GNUNET_GETOPT_option_uint ('p', "priority", "PRIORITY", gettext_noop ("specify the priority of the content"), &bo.content_priority), - GNUNET_GETOPT_OPTION_STRING ('P', + GNUNET_GETOPT_option_string ('P', "pseudonym", "NAME", gettext_noop ("publish the files under the pseudonym " "NAME (place file into namespace)"), &pseudonym), - GNUNET_GETOPT_OPTION_SET_UINT ('r', + GNUNET_GETOPT_option_uint ('r', "replication", "LEVEL", gettext_noop ("set the desired replication LEVEL"), &bo.replication_level), - GNUNET_GETOPT_OPTION_SET_ONE ('s', + GNUNET_GETOPT_option_flag ('s', "simulate-only", gettext_noop ("only simulate the process but do not do " "any actual publishing (useful to compute URIs)"), &do_simulate), - GNUNET_GETOPT_OPTION_STRING ('t', + GNUNET_GETOPT_option_string ('t', "this", "ID", gettext_noop ("set the ID of this version of the publication " "(for namespace insertions only)"), &this_id), - GNUNET_GETOPT_OPTION_STRING ('u', + GNUNET_GETOPT_option_string ('u', "uri", "URI", gettext_noop ("URI to be published (can be used instead of passing a " "file to add keywords to the file with the respective URI)"), &uri_string), - GNUNET_GETOPT_OPTION_VERBOSE (&verbose), + GNUNET_GETOPT_option_verbose (&verbose), GNUNET_GETOPT_OPTION_END }; 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('a', + GNUNET_GETOPT_option_uint ('a', "anonymity", "LEVEL", gettext_noop ("set the desired LEVEL of receiver-anonymity"), &anonymity), - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "no-network", gettext_noop ("only search the local peer (no P2P network search)"), &local_only), - GNUNET_GETOPT_OPTION_STRING ('o', + GNUNET_GETOPT_option_string ('o', "output", "PREFIX", gettext_noop ("write search results to file starting with PREFIX"), &output_filename), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', + GNUNET_GETOPT_option_relative_time ('t', "timeout", "DELAY", gettext_noop ("automatically terminate search after DELAY"), &timeout), - GNUNET_GETOPT_OPTION_VERBOSE (&verbose), + GNUNET_GETOPT_option_verbose (&verbose), - GNUNET_GETOPT_OPTION_SET_UINT ('N', + GNUNET_GETOPT_option_uint ('N', "results", "VALUE", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_VERBOSE (&verbose), + GNUNET_GETOPT_option_verbose (&verbose), GNUNET_GETOPT_OPTION_END }; 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('p', + GNUNET_GETOPT_option_uint ('p', "port", "PORT", 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, { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('d', + GNUNET_GETOPT_option_string ('d', "dns", "IP", gettext_noop ("IP of recursive DNS resolver to use (required)"), &dns_ip), - GNUNET_GETOPT_OPTION_STRING ('f', + GNUNET_GETOPT_option_string ('f', "fcfs", "NAME", gettext_noop ("Authoritative FCFS suffix to use (optional); default: fcfs.zkey.eu"), &fcfs_suffix), - GNUNET_GETOPT_OPTION_STRING ('s', + GNUNET_GETOPT_option_string ('s', "suffix", "SUFFIX", gettext_noop ("Authoritative DNS suffix to use (optional); default: zkey.eu"), &dns_suffix), - GNUNET_GETOPT_OPTION_SET_UINT ('p', + GNUNET_GETOPT_option_uint ('p', "port", "UDPPORT", gettext_noop ("UDP port to listen on for inbound DNS requests; default: 2853"), &listen_port), - GNUNET_GETOPT_OPTION_STRING ('z', + GNUNET_GETOPT_option_string ('z', "zone", "PUBLICKEY", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ULONG ('p', + GNUNET_GETOPT_option_ulong ('p', "port", NULL, gettext_noop ("listen on specified port (default: 7777)"), &port), - GNUNET_GETOPT_OPTION_STRING ('a', + GNUNET_GETOPT_option_string ('a', "authority", NULL, 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, { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('u', + GNUNET_GETOPT_option_string ('u', "lookup", "NAME", gettext_noop ("Lookup a record for the given name"), &lookup_name), - GNUNET_GETOPT_OPTION_STRING ('t', + GNUNET_GETOPT_option_string ('t', "type", "TYPE", gettext_noop ("Specify the type of the record to lookup"), &lookup_type), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T', + GNUNET_GETOPT_option_relative_time ('T', "timeout", "DELAY", gettext_noop ("Specify timeout for the lookup"), &timeout), - GNUNET_GETOPT_OPTION_SET_ONE ('r', + GNUNET_GETOPT_option_flag ('r', "raw", gettext_noop ("No unneeded output"), &raw), - GNUNET_GETOPT_OPTION_STRING ('p', + GNUNET_GETOPT_option_string ('p', "public-key", "PKEY", gettext_noop ("Specify the public key of the zone to lookup the record in"), &public_key), - GNUNET_GETOPT_OPTION_STRING ('z', + GNUNET_GETOPT_option_string ('z', "zone", "NAME", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { #if HAVE_MHD - GNUNET_GETOPT_OPTION_SET_ONE ('a', + GNUNET_GETOPT_option_flag ('a', "advertise", gettext_noop ("advertise our hostlist to other peers"), &advertising), #endif - GNUNET_GETOPT_OPTION_SET_ONE ('b', + GNUNET_GETOPT_option_flag ('b', "bootstrap", gettext_noop ("bootstrap using hostlists (it is highly recommended that you always use this option)"), &bootstrapping), - GNUNET_GETOPT_OPTION_SET_ONE ('e', + GNUNET_GETOPT_option_flag ('e', "enable-learning", gettext_noop ("enable learning about hostlist servers from other peers"), &learning), #if HAVE_MHD - GNUNET_GETOPT_OPTION_SET_ONE ('p', + GNUNET_GETOPT_option_flag ('p', "provide-hostlist", gettext_noop ("provide a hostlist server"), &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[]) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('t', + GNUNET_GETOPT_option_string ('t', "token", NULL, gettext_noop ("GNUid token"), &token), - GNUNET_GETOPT_OPTION_SET_ONE ('p', + GNUNET_GETOPT_option_flag ('p', "print", gettext_noop ("Print token contents"), &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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('C', + GNUNET_GETOPT_option_string ('C', "create", "NAME", gettext_noop ("create ego NAME"), &create_ego), - GNUNET_GETOPT_OPTION_STRING ('D', + GNUNET_GETOPT_option_string ('D', "delete", "NAME", gettext_noop ("delete ego NAME "), &delete_ego), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_flag ('d', "display", gettext_noop ("display all egos"), &list), - GNUNET_GETOPT_OPTION_STRING ('e', + GNUNET_GETOPT_option_string ('e', "ego", "NAME", gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -s)"), &set_ego), - GNUNET_GETOPT_OPTION_SET_ONE ('m', + GNUNET_GETOPT_option_flag ('m', "monitor", gettext_noop ("run in monitor mode egos"), &monitor), - GNUNET_GETOPT_OPTION_STRING ('s', + GNUNET_GETOPT_option_string ('s', "set", "SUBSYSTEM", 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 * @param about string with brief description of the application */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_HELP (const char *about); +GNUNET_GETOPT_option_help (const char *about); /** @@ -171,7 +171,7 @@ GNUNET_GETOPT_OPTION_HELP (const char *about); * @param version string with the version number */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_VERSION (const char *version); +GNUNET_GETOPT_option_version (const char *version); @@ -181,7 +181,7 @@ GNUNET_GETOPT_OPTION_VERSION (const char *version); * @param[out] logfn set to the name of the logfile */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); +GNUNET_GETOPT_option_logfile (char **logfn); /** @@ -194,7 +194,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); * @param[out] str set to the string */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_STRING (char shortName, +GNUNET_GETOPT_option_string (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -210,7 +210,7 @@ GNUNET_GETOPT_OPTION_STRING (char shortName, * @param[out] str set to the string */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_FILENAME (char shortName, +GNUNET_GETOPT_option_filename (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -229,7 +229,7 @@ GNUNET_GETOPT_OPTION_FILENAME (char shortName, * @param val_size size of @a val in bytes */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, +GNUNET_GETOPT_option_base32_fixed_size (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -249,8 +249,8 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, * @param[out] val binary value decoded from Crockford Base32-encoded argument; * size is determined by type (sizeof (*val)). */ -#define GNUNET_GETOPT_OPTION_SET_BASE32_AUTO(shortName,name,argumentHelp,description,val) \ - GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE(shortName,name,argumentHelp,description,val,sizeof(*val)) +#define GNUNET_GETOPT_option_base32_auto(shortName,name,argumentHelp,description,val) \ + GNUNET_GETOPT_option_base32_fixed_size(shortName,name,argumentHelp,description,val,sizeof(*val)) /** @@ -263,7 +263,7 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, * @param[out] val set to 1 if the option is present */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_ONE (char shortName, +GNUNET_GETOPT_option_flag (char shortName, const char *name, const char *description, int *val); @@ -279,7 +279,7 @@ GNUNET_GETOPT_OPTION_SET_ONE (char shortName, * @param[out] val set to the value specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_UINT (char shortName, +GNUNET_GETOPT_option_uint (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -296,7 +296,7 @@ GNUNET_GETOPT_OPTION_SET_UINT (char shortName, * @param[out] val set to the value specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, +GNUNET_GETOPT_option_ulong (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -314,7 +314,7 @@ GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, * @param[out] val set to the time specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, +GNUNET_GETOPT_option_relative_time (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -332,7 +332,7 @@ GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, * @param[out] val set to the time specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, +GNUNET_GETOPT_option_absolute_time (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -349,7 +349,7 @@ GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, * @param[out] val set to 1 if the option is present */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, +GNUNET_GETOPT_option_increment_uint (char shortName, const char *name, const char *description, unsigned int *val); @@ -362,7 +362,7 @@ GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, * @param[out] level set to the log level */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_LOGLEVEL (char **level); +GNUNET_GETOPT_option_loglevel (char **level); /** @@ -372,7 +372,7 @@ GNUNET_GETOPT_OPTION_LOGLEVEL (char **level); * @param[out] level set to the verbosity level */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level); +GNUNET_GETOPT_option_verbose (unsigned int *level); /** @@ -381,7 +381,7 @@ GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level); * @param[out] logfn set to the name of the logfile */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); +GNUNET_GETOPT_option_logfile (char **logfn); /** @@ -390,7 +390,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn); * @param[out] fn set to the name of the configuration file */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_CFG_FILE (char **fn); +GNUNET_GETOPT_option_cfgfile (char **fn); /** @@ -400,7 +400,7 @@ GNUNET_GETOPT_OPTION_CFG_FILE (char **fn); * @return @a opt with the mandatory flag set. */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt); +GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt); /** 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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('n', + GNUNET_GETOPT_option_string ('n', "name", "NAME", gettext_noop ("name of the record to add/delete/display"), &name), - GNUNET_GETOPT_OPTION_STRING ('z', + GNUNET_GETOPT_option_string ('z', "zone", "PKEY", 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, struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('a', + GNUNET_GETOPT_option_flag ('a', "add", gettext_noop ("add record"), &add), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_flag ('d', "delete", gettext_noop ("delete record"), &del), - GNUNET_GETOPT_OPTION_SET_ONE ('D', + GNUNET_GETOPT_option_flag ('D', "display", gettext_noop ("display records"), &list), - GNUNET_GETOPT_OPTION_STRING ('e', + GNUNET_GETOPT_option_string ('e', "expiration", "TIME", gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), &expirationstring), - GNUNET_GETOPT_OPTION_STRING ('i', + GNUNET_GETOPT_option_string ('i', "nick", "NICKNAME", gettext_noop ("set the desired nick name for the zone"), &nickstring), - GNUNET_GETOPT_OPTION_SET_ONE ('m', + GNUNET_GETOPT_option_flag ('m', "monitor", gettext_noop ("monitor changes in the namestore"), &monitor), - GNUNET_GETOPT_OPTION_STRING ('n', + GNUNET_GETOPT_option_string ('n', "name", "NAME", gettext_noop ("name of the record to add/delete/display"), &name), - GNUNET_GETOPT_OPTION_STRING ('r', + GNUNET_GETOPT_option_string ('r', "reverse", "PKEY", gettext_noop ("determine our name for the given PKEY"), @@ -1178,35 +1178,35 @@ main (int argc, - GNUNET_GETOPT_OPTION_STRING ('t', + GNUNET_GETOPT_option_string ('t', "type", "TYPE", gettext_noop ("type of the record to add/delete/display"), &typestring), - GNUNET_GETOPT_OPTION_STRING ('u', + GNUNET_GETOPT_option_string ('u', "uri", "URI", gettext_noop ("URI to import into our zone"), &uri), - GNUNET_GETOPT_OPTION_STRING ('V', + GNUNET_GETOPT_option_string ('V', "value", "VALUE", gettext_noop ("value of the record to add/delete"), &value), - GNUNET_GETOPT_OPTION_SET_ONE ('p', + GNUNET_GETOPT_option_flag ('p', "public", gettext_noop ("create or list public record"), &is_public), - GNUNET_GETOPT_OPTION_SET_ONE ('s', + GNUNET_GETOPT_option_flag ('s', "shadow", gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), &is_shadow), - GNUNET_GETOPT_OPTION_STRING ('z', + GNUNET_GETOPT_option_string ('z', "zone", "EGO", 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, char *const argv[]) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('a', + GNUNET_GETOPT_option_flag ('a', "auto", gettext_noop ("run autoconfiguration"), &do_auto), - GNUNET_GETOPT_OPTION_STRING ('S', + GNUNET_GETOPT_option_string ('S', "section", "NAME", gettext_noop ("section name providing the configuration for the adapter"), §ion_name), - GNUNET_GETOPT_OPTION_SET_ONE ('t', + GNUNET_GETOPT_option_flag ('t', "tcp", gettext_noop ("use TCP"), &use_tcp), - GNUNET_GETOPT_OPTION_SET_ONE ('u', + GNUNET_GETOPT_option_flag ('u', "udp", gettext_noop ("use UDP"), &use_udp), - GNUNET_GETOPT_OPTION_SET_ONE ('w', + GNUNET_GETOPT_option_flag ('w', "write", gettext_noop ("write configuration file (for autoconfiguration)"), &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, { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('i', + GNUNET_GETOPT_option_string ('i', "in", "ADDRESS", gettext_noop ("which IP and port are we locally using to bind/listen to"), &local_addr), - GNUNET_GETOPT_OPTION_STRING ('r', + GNUNET_GETOPT_option_string ('r', "remote", "ADDRESS", gettext_noop ("which remote IP and port should be asked for connection reversal"), &remote_addr), - GNUNET_GETOPT_OPTION_STRING ('S', + GNUNET_GETOPT_option_string ('S', "section", NULL, gettext_noop ("name of configuration section to find additional options, such as manual host punching data"), §ion_name), - GNUNET_GETOPT_OPTION_SET_ONE ('s', + GNUNET_GETOPT_option_flag ('s', "stun", gettext_noop ("enable STUN processing"), &do_stun), - GNUNET_GETOPT_OPTION_SET_ONE ('t', + GNUNET_GETOPT_option_flag ('t', "tcp", gettext_noop ("use TCP"), &use_tcp), - GNUNET_GETOPT_OPTION_SET_ONE ('u', + GNUNET_GETOPT_option_flag ('u', "udp", gettext_noop ("use UDP"), &use_udp), - GNUNET_GETOPT_OPTION_SET_ONE ('W', + GNUNET_GETOPT_option_flag ('W', "watch", gettext_noop ("watch for connection reversal requests"), &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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('C', + GNUNET_GETOPT_option_uint ('C', "connections", "COUNT", gettext_noop ("limit to the number of connections to NSE services, 0 for none"), &connection_limit), - GNUNET_GETOPT_OPTION_STRING ('d', + GNUNET_GETOPT_option_string ('d', "details", "FILENAME", gettext_noop ("name of the file for writing connection information and statistics"), &data_filename), - GNUNET_GETOPT_OPTION_STRING ('H', + GNUNET_GETOPT_option_string ('H', "hosts", "FILENAME", gettext_noop ("name of the file with the login information for the testbed"), &hosts_file), - GNUNET_GETOPT_OPTION_STRING ('o', + GNUNET_GETOPT_option_string ('o', "output", "FILENAME", gettext_noop ("name of the file for writing the main results"), &output_filename), - GNUNET_GETOPT_OPTION_STRING ('p', + GNUNET_GETOPT_option_string ('p', "peers", "NETWORKSIZESPEC", gettext_noop ("Number of peers to run in each round, separated by commas"), &num_peer_spec), - GNUNET_GETOPT_OPTION_INCREMENT_VALUE ('V', + GNUNET_GETOPT_option_increment_uint ('V', "verbose", gettext_noop ("be verbose (print progress information)"), &verbose), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('w', + GNUNET_GETOPT_option_relative_time ('w', "wait", "DELAY", 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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "numeric", gettext_noop ("don't resolve host names"), &no_resolve), - GNUNET_GETOPT_OPTION_SET_ONE ('q', + GNUNET_GETOPT_option_flag ('q', "quiet", gettext_noop ("output only the identity strings"), &be_quiet), - GNUNET_GETOPT_OPTION_SET_ONE ('f', + GNUNET_GETOPT_option_flag ('f', "friends", gettext_noop ("include friend-only information"), &include_friend_only), - GNUNET_GETOPT_OPTION_SET_ONE ('s', + GNUNET_GETOPT_option_flag ('s', "self", gettext_noop ("output our own identity only"), &get_self), - GNUNET_GETOPT_OPTION_SET_ONE ('i', + GNUNET_GETOPT_option_flag ('i', "info", gettext_noop ("list all known peers"), &get_info), - GNUNET_GETOPT_OPTION_STRING ('d', + GNUNET_GETOPT_option_string ('d', "dump-hello", NULL, gettext_noop ("dump hello to file"), &dump_hello), - GNUNET_GETOPT_OPTION_SET_ONE ('g', + GNUNET_GETOPT_option_flag ('g', "get-hello", gettext_noop ("also output HELLO uri(s)"), &get_uri), - GNUNET_GETOPT_OPTION_STRING ('p', + GNUNET_GETOPT_option_string ('p', "put-hello", "HELLO", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_FILENAME ('o', + GNUNET_GETOPT_option_filename ('o', "output-file", "FILENAME", gettext_noop ("name of the file for writing statistics"), &data_filename), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', + GNUNET_GETOPT_option_relative_time ('t', "matching-timeout", "TIMEOUT", gettext_noop ("wait TIMEOUT before ending the experiment"), &search_timeout_time), - GNUNET_GETOPT_OPTION_FILENAME ('p', + GNUNET_GETOPT_option_filename ('p', "policy-dir", "DIRECTORY", gettext_noop ("directory with policy files"), &policy_dir), - GNUNET_GETOPT_OPTION_FILENAME ('s', + GNUNET_GETOPT_option_filename ('s', "strings-file", "FILENAME", gettext_noop ("name of file with input strings"), &strings_file), - GNUNET_GETOPT_OPTION_FILENAME ('H', + GNUNET_GETOPT_option_filename ('H', "hosts-file", "FILENAME", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('t', + GNUNET_GETOPT_option_string ('t', "table", "TABLENAME", gettext_noop ("name of the table to write DFAs"), &table_name), - GNUNET_GETOPT_OPTION_SET_UINT ('p', + GNUNET_GETOPT_option_uint ('p', "max-path-compression", "MAX_PATH_COMPRESSION", 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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ULONG ('p', + GNUNET_GETOPT_option_ulong ('p', "port", "PORT", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('f', + GNUNET_GETOPT_option_string ('f', "filename", "NAME", gettext_noop ("use NAME for the name of the revocation file"), &filename), - GNUNET_GETOPT_OPTION_STRING ('R', + GNUNET_GETOPT_option_string ('R', "revoke", "NAME", gettext_noop ("revoke the private key associated for the the private key associated with the ego NAME "), &revoke_ego), - GNUNET_GETOPT_OPTION_SET_ONE ('p', + GNUNET_GETOPT_option_flag ('p', "perform", gettext_noop ("actually perform revocation, otherwise we just do the precomputation"), &perform), - GNUNET_GETOPT_OPTION_STRING ('t', + GNUNET_GETOPT_option_string ('t', "test", "KEY", 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) const char helpstr[] = "Get random GNUnet peers. If none is specified a single is requested."; struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_BASE32_AUTO ('s', + GNUNET_GETOPT_option_base32_auto ('s', "seed", "PEER_ID", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('e', + GNUNET_GETOPT_option_string ('e', "elements", "\"key1,val1;key2,val2;...,keyn,valn;\"", gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."), &input_elements), - GNUNET_GETOPT_OPTION_STRING ('e', + GNUNET_GETOPT_option_string ('e', "elements", "\"key1,val1;key2,val2;...,keyn,valn;\"", gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."), &input_elements), - GNUNET_GETOPT_OPTION_STRING ('p', + GNUNET_GETOPT_option_string ('p', "peer", "PEERID", 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."), &input_peer_id), - GNUNET_GETOPT_OPTION_STRING ('k', + GNUNET_GETOPT_option_string ('k', "key", "TRANSACTION_ID", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('n', + GNUNET_GETOPT_option_uint ('n', "num-peers", NULL, gettext_noop ("number of peers in consensus"), &num_peers), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D', + GNUNET_GETOPT_option_relative_time ('D', "delay", NULL, gettext_noop ("dkg start delay"), &delay), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', + GNUNET_GETOPT_option_relative_time ('t', "timeout", NULL, gettext_noop ("dkg timeout"), &timeout), - GNUNET_GETOPT_OPTION_SET_UINT ('k', + GNUNET_GETOPT_option_uint ('k', "threshold", NULL, gettext_noop ("threshold"), &threshold), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_flag ('d', "descrypt", gettext_noop ("also profile decryption"), &decrypt), - GNUNET_GETOPT_OPTION_VERBOSE (&verbose), + GNUNET_GETOPT_option_verbose (&verbose), GNUNET_GETOPT_OPTION_END }; 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('A', + GNUNET_GETOPT_option_uint ('A', "asize", NULL, gettext_noop ("number of element in set A-B"), &asize), - GNUNET_GETOPT_OPTION_SET_UINT ('B', + GNUNET_GETOPT_option_uint ('B', "bsize", NULL, gettext_noop ("number of element in set B-A"), &bsize), - GNUNET_GETOPT_OPTION_SET_UINT ('C', + GNUNET_GETOPT_option_uint ('C', "csize", NULL, gettext_noop ("number of common elements in A and B"), &csize), - GNUNET_GETOPT_OPTION_SET_UINT ('k', + GNUNET_GETOPT_option_uint ('k', "hash-num", NULL, gettext_noop ("hash num"), &hash_num), - GNUNET_GETOPT_OPTION_SET_UINT ('s', + GNUNET_GETOPT_option_uint ('s', "ibf-size", NULL, 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 main (int argc, char **argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('A', + GNUNET_GETOPT_option_uint ('A', "num-first", NULL, gettext_noop ("number of values"), &num_a), - GNUNET_GETOPT_OPTION_SET_UINT ('B', + GNUNET_GETOPT_option_uint ('B', "num-second", NULL, gettext_noop ("number of values"), &num_b), - GNUNET_GETOPT_OPTION_SET_ONE ('b', + GNUNET_GETOPT_option_flag ('b', "byzantine", gettext_noop ("use byzantine mode"), &byzantine), - GNUNET_GETOPT_OPTION_SET_UINT ('f', + GNUNET_GETOPT_option_uint ('f', "force-full", NULL, gettext_noop ("force sending full set"), &force_full), - GNUNET_GETOPT_OPTION_SET_UINT ('d', + GNUNET_GETOPT_option_uint ('d', "force-delta", NULL, gettext_noop ("number delta operation"), &force_delta), - GNUNET_GETOPT_OPTION_SET_UINT ('C', + GNUNET_GETOPT_option_uint ('C', "num-common", NULL, gettext_noop ("number of values"), &num_c), - GNUNET_GETOPT_OPTION_STRING ('x', + GNUNET_GETOPT_option_string ('x', "operation", NULL, gettext_noop ("operation to execute"), &op_str), - GNUNET_GETOPT_OPTION_SET_UINT ('w', + GNUNET_GETOPT_option_uint ('w', "element-size", NULL, gettext_noop ("element size"), &element_size), - GNUNET_GETOPT_OPTION_FILENAME ('s', + GNUNET_GETOPT_option_filename ('s', "statistics", "FILENAME", 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) /* operations */ - GNUNET_GETOPT_OPTION_SET_ONE ('A', + GNUNET_GETOPT_option_flag ('A', "host-assign", gettext_noop ("assign --name in state to --data"), &op_host_assign), - GNUNET_GETOPT_OPTION_SET_ONE ('B', + GNUNET_GETOPT_option_flag ('B', "guest-leave", gettext_noop ("say good-bye and leave somebody else's place"), &op_guest_leave), - GNUNET_GETOPT_OPTION_SET_ONE ('C', + GNUNET_GETOPT_option_flag ('C', "host-enter", gettext_noop ("create a place"), &op_host_enter), - GNUNET_GETOPT_OPTION_SET_ONE ('C', + GNUNET_GETOPT_option_flag ('C', "host-enter", gettext_noop ("create a place"), &op_host_enter), - GNUNET_GETOPT_OPTION_SET_ONE ('D', + GNUNET_GETOPT_option_flag ('D', "host-leave", gettext_noop ("destroy a place we were hosting"), &op_host_leave), - GNUNET_GETOPT_OPTION_SET_ONE ('E', + GNUNET_GETOPT_option_flag ('E', "guest-enter", gettext_noop ("enter somebody else's place"), &op_guest_enter), - GNUNET_GETOPT_OPTION_SET_ONE ('F', + GNUNET_GETOPT_option_flag ('F', "look-for", gettext_noop ("find state matching name prefix"), &op_look_for), - GNUNET_GETOPT_OPTION_SET_ONE ('H', + GNUNET_GETOPT_option_flag ('H', "replay-latest", gettext_noop ("replay history of messages up to the given --limit"), &op_replay_latest), - GNUNET_GETOPT_OPTION_SET_ONE ('N', + GNUNET_GETOPT_option_flag ('N', "host-reconnect", gettext_noop ("reconnect to a previously created place"), &op_host_reconnect), - GNUNET_GETOPT_OPTION_SET_ONE ('P', + GNUNET_GETOPT_option_flag ('P', "host-announce", gettext_noop ("publish something to a place we are hosting"), &op_host_announce), - GNUNET_GETOPT_OPTION_SET_ONE ('R', + GNUNET_GETOPT_option_flag ('R', "guest-reconnect", gettext_noop ("reconnect to a previously entered place"), &op_guest_reconnect), - GNUNET_GETOPT_OPTION_SET_ONE ('S', + GNUNET_GETOPT_option_flag ('S', "look-at", gettext_noop ("search for state matching exact name"), &op_look_at), - GNUNET_GETOPT_OPTION_SET_ONE ('T', + GNUNET_GETOPT_option_flag ('T', "guest-talk", gettext_noop ("submit something to somebody's place"), &op_guest_talk), - GNUNET_GETOPT_OPTION_SET_ONE ('U', + GNUNET_GETOPT_option_flag ('U', "status", gettext_noop ("list of egos and subscribed places"), &op_status), - GNUNET_GETOPT_OPTION_SET_ONE ('X', + GNUNET_GETOPT_option_flag ('X', "replay", gettext_noop ("extract and replay history between message IDs --start and --until"), &op_replay), @@ -1291,83 +1291,83 @@ main (int argc, char *const *argv) /* options */ - GNUNET_GETOPT_OPTION_STRING ('a', + GNUNET_GETOPT_option_string ('a', "app", "APPLICATION_ID", gettext_noop ("application ID to use when connecting"), &opt_app), - GNUNET_GETOPT_OPTION_STRING ('d', + GNUNET_GETOPT_option_string ('d', "data", "DATA", gettext_noop ("message body or state value"), &opt_data), - GNUNET_GETOPT_OPTION_STRING ('e', + GNUNET_GETOPT_option_string ('e', "ego", "NAME|PUBKEY", gettext_noop ("name or public key of ego"), &opt_ego), - GNUNET_GETOPT_OPTION_SET_ONE ('f', + GNUNET_GETOPT_option_flag ('f', "follow", gettext_noop ("wait for incoming messages"), &opt_follow), - GNUNET_GETOPT_OPTION_STRING ('g', + GNUNET_GETOPT_option_string ('g', "gns", "GNS_NAME", gettext_noop ("GNS name"), &opt_gns), - GNUNET_GETOPT_OPTION_STRING ('i', + GNUNET_GETOPT_option_string ('i', "peer", "PEER_ID", gettext_noop ("peer ID for --guest-enter"), &opt_peer), - GNUNET_GETOPT_OPTION_STRING ('k', + GNUNET_GETOPT_option_string ('k', "name", "VAR_NAME", gettext_noop ("name (key) to query from state"), &opt_name), - GNUNET_GETOPT_OPTION_STRING ('m', + GNUNET_GETOPT_option_string ('m', "method", "METHOD_NAME", gettext_noop ("method name"), &opt_method), - GNUNET_GETOPT_OPTION_SET_ULONG ('n', + GNUNET_GETOPT_option_ulong ('n', "limit", NULL, gettext_noop ("number of messages to replay from history"), &opt_limit), - GNUNET_GETOPT_OPTION_STRING ('p', + GNUNET_GETOPT_option_string ('p', "place", "PUBKEY", gettext_noop ("key address of place"), &opt_place), - GNUNET_GETOPT_OPTION_SET_ULONG ('s', + GNUNET_GETOPT_option_ulong ('s', "start", NULL, gettext_noop ("start message ID for history replay"), &opt_start), - GNUNET_GETOPT_OPTION_SET_ONE ('w', + GNUNET_GETOPT_option_flag ('w', "welcome", gettext_noop ("respond to entry requests by admitting all guests"), &opt_welcome), - GNUNET_GETOPT_OPTION_SET_ULONG ('u', + GNUNET_GETOPT_option_ulong ('u', "until", NULL, gettext_noop ("end message ID for history replay"), &opt_until), - GNUNET_GETOPT_OPTION_SET_ONE ('y', + GNUNET_GETOPT_option_flag ('y', "deny", gettext_noop ("respond to entry requests by refusing all guests"), &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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_STRING ('n', + GNUNET_GETOPT_option_string ('n', "name", "NAME", gettext_noop ("limit output to statistics for the given NAME"), &name), - GNUNET_GETOPT_OPTION_SET_ONE ('p', + GNUNET_GETOPT_option_flag ('p', "persistent", gettext_noop ("make the value being set persistent"), &persistent), - GNUNET_GETOPT_OPTION_STRING ('s', + GNUNET_GETOPT_option_string ('s', "subsystem", "SUBSYSTEM", gettext_noop ("limit output to the given SUBSYSTEM"), &subsystem), - GNUNET_GETOPT_OPTION_SET_ONE ('q', + GNUNET_GETOPT_option_flag ('q', "quiet", gettext_noop ("just print the statistics value"), &quiet), - GNUNET_GETOPT_OPTION_SET_ONE ('w', + GNUNET_GETOPT_option_flag ('w', "watch", gettext_noop ("watch value continuously"), &watch), - GNUNET_GETOPT_OPTION_STRING ('r', + GNUNET_GETOPT_option_string ('r', "remote", "REMOTE", gettext_noop ("connect to remote host"), &remote_host), - GNUNET_GETOPT_OPTION_SET_ULONG ('o', + GNUNET_GETOPT_option_ulong ('o', "port", "PORT", 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[]) { struct GNUNET_GETOPT_CommandLineOption option[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('p', + GNUNET_GETOPT_option_uint ('p', "num-peers", "COUNT", 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) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('p', + GNUNET_GETOPT_option_uint ('p', "num-peers", "COUNT", gettext_noop ("create COUNT number of peers"), &num_peers), - GNUNET_GETOPT_OPTION_SET_UINT ('e', + GNUNET_GETOPT_option_uint ('e', "num-errors", "COUNT", gettext_noop ("tolerate COUNT number of continious timeout failures"), &num_cont_fails), - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "non-interactive", gettext_noop ("run profiler in non-interactive mode where upon " "testbed setup the profiler does not wait for a " @@ -299,7 +299,7 @@ main (int argc, char *const *argv) &noninteractive), #if !ENABLE_SUPERMUC - GNUNET_GETOPT_OPTION_STRING ('H', + GNUNET_GETOPT_option_string ('H', "hosts", "FILENAME", 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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('C', + GNUNET_GETOPT_option_flag ('C', "cfg", gettext_noop ("create unique configuration files"), &create_cfg), - GNUNET_GETOPT_OPTION_STRING ('k', + GNUNET_GETOPT_option_string ('k', "key", "FILENAME", gettext_noop ("extract hostkey file from pre-computed hostkey list"), &create_hostkey), - GNUNET_GETOPT_OPTION_SET_UINT ('n', + GNUNET_GETOPT_option_uint ('n', "number", "NUMBER", gettext_noop ("number of unique configuration files to create, or number of the hostkey to extract"), &create_no), - GNUNET_GETOPT_OPTION_STRING ('t', + GNUNET_GETOPT_option_string ('t', "template", "FILENAME", gettext_noop ("configuration template"), &create_cfg_template), - GNUNET_GETOPT_OPTION_STRING ('r', + GNUNET_GETOPT_option_string ('r', "run", "SERVICE", 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, int main (int argc, char *argv[]) { struct GNUNET_GETOPT_CommandLineOption option[] = { - GNUNET_GETOPT_OPTION_SET_UINT ('n', + GNUNET_GETOPT_option_uint ('n', "num-keys", "COUNT", 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) struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('s', + GNUNET_GETOPT_option_flag ('s', "send", gettext_noop ("send data to peer"), &benchmark_send), - GNUNET_GETOPT_OPTION_SET_ONE ('r', + GNUNET_GETOPT_option_flag ('r', "receive", gettext_noop ("receive data from peer"), &benchmark_receive), - GNUNET_GETOPT_OPTION_SET_UINT ('i', + GNUNET_GETOPT_option_uint ('i', "iterations", NULL, gettext_noop ("iterations"), &benchmark_iterations), - GNUNET_GETOPT_OPTION_SET_UINT ('n', + GNUNET_GETOPT_option_uint ('n', "number", NULL, gettext_noop ("number of messages to send"), &benchmark_count), - GNUNET_GETOPT_OPTION_SET_UINT ('m', + GNUNET_GETOPT_option_uint ('m', "messagesize", NULL, gettext_noop ("message size to use"), &benchmark_size), - GNUNET_GETOPT_OPTION_STRING ('p', + GNUNET_GETOPT_option_string ('p', "peer", "PEER", gettext_noop ("peer identity"), &cpid), - GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), + GNUNET_GETOPT_option_verbose (&verbosity), GNUNET_GETOPT_OPTION_END }; 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, { int res; struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('a', + GNUNET_GETOPT_option_flag ('a', "all", gettext_noop ("print information for all peers (instead of only connected peers)"), &iterate_all), - GNUNET_GETOPT_OPTION_SET_ONE ('b', + GNUNET_GETOPT_option_flag ('b', "benchmark", gettext_noop ("measure how fast we are receiving data from all peers (until CTRL-C)"), &benchmark_receive), - GNUNET_GETOPT_OPTION_SET_ONE ('D', + GNUNET_GETOPT_option_flag ('D', "disconnect", gettext_noop ("disconnect from a peer"), &do_disconnect), - GNUNET_GETOPT_OPTION_SET_ONE ('i', + GNUNET_GETOPT_option_flag ('i', "information", gettext_noop ("provide information about all current connections (once)"), &iterate_connections), - GNUNET_GETOPT_OPTION_SET_ONE ('m', + GNUNET_GETOPT_option_flag ('m', "monitor", gettext_noop ("provide information about all current connections (continuously)"), &monitor_connections), - GNUNET_GETOPT_OPTION_SET_ONE ('e', + GNUNET_GETOPT_option_flag ('e', "events", gettext_noop ("provide information about all connects and disconnect events (continuously)"), &monitor_connects), - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "numeric", gettext_noop ("do not resolve hostnames"), &numeric), - GNUNET_GETOPT_OPTION_SET_BASE32_AUTO ('p', + GNUNET_GETOPT_option_base32_auto ('p', "peer", "PEER", gettext_noop ("peer identity"), &pid), - GNUNET_GETOPT_OPTION_SET_ONE ('P', + GNUNET_GETOPT_option_flag ('P', "plugins", gettext_noop ("monitor plugin sessions"), &monitor_plugins), - GNUNET_GETOPT_OPTION_SET_ONE ('s', + GNUNET_GETOPT_option_flag ('s', "send", gettext_noop ("send data for benchmarking to the other peer (until CTRL-C)"), &benchmark_send), - GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), + GNUNET_GETOPT_option_verbose (&verbosity), GNUNET_GETOPT_OPTION_END }; 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, const char *xdg; struct GNUNET_GETOPT_CommandLineOption service_options[] = { - GNUNET_GETOPT_OPTION_CFG_FILE (&opt_cfg_fn), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_cfgfile (&opt_cfg_fn), + GNUNET_GETOPT_option_flag ('d', "daemonize", gettext_noop ("do daemonize (detach from terminal)"), &do_daemonize), - GNUNET_GETOPT_OPTION_HELP (NULL), - GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev), - GNUNET_GETOPT_OPTION_LOGFILE (&logfile), - GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION), + GNUNET_GETOPT_option_help (NULL), + GNUNET_GETOPT_option_loglevel (&loglev), + GNUNET_GETOPT_option_logfile (&logfile), + GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION), GNUNET_GETOPT_OPTION_END }; 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, * @param version string with the version number */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_VERSION (const char *version) +GNUNET_GETOPT_option_version (const char *version) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'v', @@ -191,7 +191,7 @@ OUTER: * @param about string with brief description of the application */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_HELP (const char *about) +GNUNET_GETOPT_option_help (const char *about) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'h', @@ -242,7 +242,7 @@ increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val increment by 1 each time the option is present */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, +GNUNET_GETOPT_option_increment_uint (char shortName, const char *name, const char *description, unsigned int *val) @@ -266,7 +266,7 @@ GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName, * @param[out] level set to the verbosity level */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level) +GNUNET_GETOPT_option_verbose (unsigned int *level) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'V', @@ -318,7 +318,7 @@ set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to 1 if the option is present */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_ONE (char shortName, +GNUNET_GETOPT_option_flag (char shortName, const char *name, const char *description, int *val) @@ -374,7 +374,7 @@ set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] str set to the string */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_STRING (char shortName, +GNUNET_GETOPT_option_string (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -401,7 +401,7 @@ GNUNET_GETOPT_OPTION_STRING (char shortName, * @param[out] level set to the log level */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_LOGLEVEL (char **level) +GNUNET_GETOPT_option_loglevel (char **level) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'L', @@ -453,7 +453,7 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] str set to the string */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_FILENAME (char shortName, +GNUNET_GETOPT_option_filename (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -479,7 +479,7 @@ GNUNET_GETOPT_OPTION_FILENAME (char shortName, * @param[out] logfn set to the name of the logfile */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_LOGFILE (char **logfn) +GNUNET_GETOPT_option_logfile (char **logfn) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'l', @@ -501,7 +501,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn) * @param[out] fn set to the name of the configuration file */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_CFG_FILE (char **fn) +GNUNET_GETOPT_option_cfgfile (char **fn) { struct GNUNET_GETOPT_CommandLineOption clo = { .shortName = 'c', @@ -561,7 +561,7 @@ set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to the value specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_ULONG (char shortName, +GNUNET_GETOPT_option_ulong (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -626,7 +626,7 @@ set_relative_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to the time specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName, +GNUNET_GETOPT_option_relative_time (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -691,7 +691,7 @@ set_absolute_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to the time specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName, +GNUNET_GETOPT_option_absolute_time (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -755,7 +755,7 @@ set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, * @param[out] val set to the value specified at the command line */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_UINT (char shortName, +GNUNET_GETOPT_option_uint (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -830,7 +830,7 @@ set_base32 (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, /** * Helper function to clean up after - * #GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE. + * #GNUNET_GETOPT_option_base32_fixed_size. * * @param cls value to GNUNET_free() */ @@ -853,7 +853,7 @@ free_bc (void *cls) * @param val_size size of @a val in bytes */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, +GNUNET_GETOPT_option_base32_fixed_size (char shortName, const char *name, const char *argumentHelp, const char *description, @@ -885,7 +885,7 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName, * @return @a opt with the mandatory flag set. */ struct GNUNET_GETOPT_CommandLineOption -GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt) +GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt) { opt.option_mandatory = 1; return opt; 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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('f', + GNUNET_GETOPT_option_flag ('f', "filename", gettext_noop ("obtain option of value as a filename (with $-expansion)"), &is_filename), - GNUNET_GETOPT_OPTION_STRING ('s', + GNUNET_GETOPT_option_string ('s', "section", "SECTION", gettext_noop ("name of the section to access"), §ion), - GNUNET_GETOPT_OPTION_STRING ('o', + GNUNET_GETOPT_option_string ('o', "option", "OPTION", gettext_noop ("name of the option to access"), &option), - GNUNET_GETOPT_OPTION_STRING ('V', + GNUNET_GETOPT_option_string ('V', "value", "VALUE", gettext_noop ("value to set"), &value), - GNUNET_GETOPT_OPTION_SET_ONE ('S', + GNUNET_GETOPT_option_flag ('S', "list-sections", gettext_noop ("print available configuration sections"), &list_sections), - GNUNET_GETOPT_OPTION_SET_ONE ('w', + GNUNET_GETOPT_option_flag ('w', "rewrite", gettext_noop ("write configuration file that only contains delta to defaults"), &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, { list_keys_count = UINT32_MAX; struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('i', + GNUNET_GETOPT_option_flag ('i', "iterate", gettext_noop ("list keys included in a file (for testing)"), &list_keys), - GNUNET_GETOPT_OPTION_SET_UINT ('e', + GNUNET_GETOPT_option_uint ('e', "end=", "COUNT", gettext_noop ("number of keys to list included in a file (for testing)"), &list_keys_count), - GNUNET_GETOPT_OPTION_SET_UINT ('g', + GNUNET_GETOPT_option_uint ('g', "generate-keys", "COUNT", gettext_noop ("create COUNT public-private key pairs (for testing)"), &make_keys), - GNUNET_GETOPT_OPTION_SET_ONE ('p', + GNUNET_GETOPT_option_flag ('p', "print-public-key", gettext_noop ("print the public key in ASCII format"), &print_public_key), - GNUNET_GETOPT_OPTION_SET_ONE ('E', + GNUNET_GETOPT_option_flag ('E', "examples", gettext_noop ("print examples of ECC operations (used for compatibility testing)"), &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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('r', + GNUNET_GETOPT_option_flag ('r', "reverse", gettext_noop ("perform a reverse lookup"), &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, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ULONG ('b', + GNUNET_GETOPT_option_ulong ('b', "bits", "BITS", gettext_noop ("number of bits to require for the proof of work"), &nse_work_required), - GNUNET_GETOPT_OPTION_FILENAME ('k', + GNUNET_GETOPT_option_filename ('k', "keyfile", "FILE", gettext_noop ("file with private key, otherwise default is used"), &pkfn), - GNUNET_GETOPT_OPTION_FILENAME ('o', + GNUNET_GETOPT_option_filename ('o', "outfile", "FILE", gettext_noop ("file with proof of work, otherwise default is used"), &pwfn), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', + GNUNET_GETOPT_option_relative_time ('t', "timeout", "TIME", 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, struct GNUNET_CONFIGURATION_Handle *cfg; struct GNUNET_GETOPT_CommandLineOption defoptions[] = { - GNUNET_GETOPT_OPTION_CFG_FILE (&cc.cfgfile), - GNUNET_GETOPT_OPTION_HELP (binaryHelp), - GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev), - GNUNET_GETOPT_OPTION_LOGFILE (&logfile), - GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION) + GNUNET_GETOPT_option_cfgfile (&cc.cfgfile), + GNUNET_GETOPT_option_help (binaryHelp), + GNUNET_GETOPT_option_loglevel (&loglev), + GNUNET_GETOPT_option_logfile (&logfile), + GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION) }; struct GNUNET_GETOPT_CommandLineOption *allopts; 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, int err; struct GNUNET_GETOPT_CommandLineOption service_options[] = { - GNUNET_GETOPT_OPTION_CFG_FILE (&opt_cfg_filename), - GNUNET_GETOPT_OPTION_SET_ONE ('d', + GNUNET_GETOPT_option_cfgfile (&opt_cfg_filename), + GNUNET_GETOPT_option_flag ('d', "daemonize", gettext_noop ("do daemonize (detach from terminal)"), &do_daemonize), - GNUNET_GETOPT_OPTION_HELP (NULL), - GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev), - GNUNET_GETOPT_OPTION_LOGFILE (&logfile), - GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION), + GNUNET_GETOPT_option_help (NULL), + GNUNET_GETOPT_option_loglevel (&loglev), + GNUNET_GETOPT_option_logfile (&logfile), + GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION), GNUNET_GETOPT_OPTION_END }; 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 () unsigned int vflags = 0; const struct GNUNET_GETOPT_CommandLineOption verboseoptionlist[] = { - GNUNET_GETOPT_OPTION_VERBOSE (&vflags), + GNUNET_GETOPT_option_verbose (&vflags), GNUNET_GETOPT_OPTION_END }; @@ -83,7 +83,7 @@ testVersion () NULL }; const struct GNUNET_GETOPT_CommandLineOption versionoptionlist[] = { - GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION), + GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION), GNUNET_GETOPT_OPTION_END }; @@ -105,7 +105,7 @@ testAbout () NULL }; const struct GNUNET_GETOPT_CommandLineOption aboutoptionlist[] = { - GNUNET_GETOPT_OPTION_HELP ("Testing"), + GNUNET_GETOPT_option_help ("Testing"), GNUNET_GETOPT_OPTION_END }; @@ -131,8 +131,8 @@ testLogOpts () char *fn = NULL; const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = { - GNUNET_GETOPT_OPTION_LOGFILE (&fn), - GNUNET_GETOPT_OPTION_LOGLEVEL (&level), + GNUNET_GETOPT_option_logfile (&fn), + GNUNET_GETOPT_option_loglevel (&level), GNUNET_GETOPT_OPTION_END }; @@ -173,16 +173,16 @@ testFlagNum () unsigned long long lnum = 0; const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('f', + GNUNET_GETOPT_option_flag ('f', "--flag", "helptext", &flag), - GNUNET_GETOPT_OPTION_SET_UINT ('n', + GNUNET_GETOPT_option_uint ('n', "--num", "ARG", "helptext", &num), - GNUNET_GETOPT_OPTION_SET_ULONG ('N', + GNUNET_GETOPT_option_ulong ('N', "--lnum", "ARG", "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[]) NULL }; struct GNUNET_GETOPT_CommandLineOption options1[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "name", "description", &setme1), GNUNET_GETOPT_OPTION_END }; struct GNUNET_GETOPT_CommandLineOption options2[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "name", "description", &setme1), - GNUNET_GETOPT_OPTION_SET_ONE ('N', + GNUNET_GETOPT_option_flag ('N', "number", "description", &setme2), GNUNET_GETOPT_OPTION_END }; struct GNUNET_GETOPT_CommandLineOption options3[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('N', + GNUNET_GETOPT_option_flag ('N', "number", "description", &setme1), - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "name", "description", &setme2), GNUNET_GETOPT_OPTION_END }; struct GNUNET_GETOPT_CommandLineOption options4[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "name", "description", &setme1), - GNUNET_GETOPT_OPTION_SET_ONE ('n', + GNUNET_GETOPT_option_flag ('n', "name", "description", &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 main (int argc, char *const *argv) { struct GNUNET_GETOPT_CommandLineOption options[] = { - GNUNET_GETOPT_OPTION_SET_ONE ('4', + GNUNET_GETOPT_option_flag ('4', "ipv4", gettext_noop ("request that result should be an IPv4 address"), &ipv4), - GNUNET_GETOPT_OPTION_SET_ONE ('6', + GNUNET_GETOPT_option_flag ('6', "ipv6", gettext_noop ("request that result should be an IPv6 address"), &ipv6), - GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d', + GNUNET_GETOPT_option_relative_time ('d', "duration", "TIME", gettext_noop ("how long should the mapping be valid for new tunnels?"), &duration), - GNUNET_GETOPT_OPTION_STRING ('i', + GNUNET_GETOPT_option_string ('i', "ip", "IP", gettext_noop ("destination IP for the tunnel"), &target_ip), - GNUNET_GETOPT_OPTION_STRING ('p', + GNUNET_GETOPT_option_string ('p', "peer", "PEERID", gettext_noop ("peer offering the service we would like to access"), &peer_id), - GNUNET_GETOPT_OPTION_STRING ('s', + GNUNET_GETOPT_option_string ('s', "service", "NAME", gettext_noop ("name of the service we would like to access"), &service_name), - GNUNET_GETOPT_OPTION_SET_ONE ('t', + GNUNET_GETOPT_option_flag ('t', "tcp", gettext_noop ("service is offered via TCP"), &tcp), - GNUNET_GETOPT_OPTION_SET_ONE ('u', + GNUNET_GETOPT_option_flag ('u', "udp", gettext_noop ("service is offered via UDP"), &udp), - GNUNET_GETOPT_OPTION_VERBOSE (&verbosity), + GNUNET_GETOPT_option_verbose (&verbosity), GNUNET_GETOPT_OPTION_END }; -- cgit v1.2.3