rename GNUNET_GETOPT functions to achieve better consistency
authorChristian Grothoff <christian@grothoff.org>
Sat, 25 Mar 2017 20:25:44 +0000 (21:25 +0100)
committerChristian Grothoff <christian@grothoff.org>
Sat, 25 Mar 2017 20:25:44 +0000 (21:25 +0100)
68 files changed:
src/arm/gnunet-arm.c
src/ats-tests/gnunet-solver-eval.c
src/ats-tool/gnunet-ats.c
src/ats/gnunet-ats-solver-eval.c
src/ats/perf_ats_solver.c
src/auction/gnunet-auction-create.c
src/cadet/gnunet-cadet.c
src/cadet/test_cadet.c
src/consensus/gnunet-consensus-profiler.c
src/conversation/gnunet-conversation.c
src/core/gnunet-core.c
src/datastore/gnunet-datastore.c
src/dht/gnunet-dht-get.c
src/dht/gnunet-dht-monitor.c
src/dht/gnunet-dht-put.c
src/dht/gnunet_dht_profiler.c
src/dns/gnunet-dns-monitor.c
src/dns/gnunet-dns-redirector.c
src/dv/gnunet-dv.c
src/fs/gnunet-auto-share.c
src/fs/gnunet-download.c
src/fs/gnunet-fs-profiler.c
src/fs/gnunet-fs.c
src/fs/gnunet-publish.c
src/fs/gnunet-search.c
src/fs/gnunet-unindex.c
src/gns/gnunet-bcd.c
src/gns/gnunet-dns2gns.c
src/gns/gnunet-gns-proxy.c
src/gns/gnunet-gns.c
src/hostlist/gnunet-daemon-hostlist.c
src/identity-provider/gnunet-identity-token.c
src/identity/gnunet-identity.c
src/include/gnunet_getopt_lib.h
src/namecache/gnunet-namecache.c
src/namestore/gnunet-namestore.c
src/nat-auto/gnunet-nat-auto.c
src/nat/gnunet-nat.c
src/nse/gnunet-nse-profiler.c
src/peerinfo-tool/gnunet-peerinfo.c
src/regex/gnunet-regex-profiler.c
src/regex/gnunet-regex-simulation-profiler.c
src/rest/gnunet-rest-server.c
src/revocation/gnunet-revocation.c
src/rps/gnunet-rps.c
src/scalarproduct/gnunet-scalarproduct.c
src/secretsharing/gnunet-secretsharing-profiler.c
src/set/gnunet-set-ibf-profiler.c
src/set/gnunet-set-profiler.c
src/social/gnunet-social.c
src/statistics/gnunet-statistics.c
src/testbed/generate-underlay-topology.c
src/testbed/gnunet-testbed-profiler.c
src/testing/gnunet-testing.c
src/testing/list-keys.c
src/transport/gnunet-transport-profiler.c
src/transport/gnunet-transport.c
src/transport/tcp_service_legacy.c
src/util/getopt_helpers.c
src/util/gnunet-config.c
src/util/gnunet-ecc.c
src/util/gnunet-resolver.c
src/util/gnunet-scrypt.c
src/util/program.c
src/util/service.c
src/util/test_getopt.c
src/util/test_program.c
src/vpn/gnunet-vpn.c

index 78c78738a1d5d3b2c65dc713bf70acff159b59fa..4c30985b1a6c04367bff1cac65446fc51d5b5c21 100644 (file)
@@ -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),
index 1bb7fdee7587415860780e5b46f30d0b1659ed3e..04508d1df9b7ec2315f119da8958c464249588a3 100644 (file)
@@ -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),
index f645ba56d45acb5f8323f773dd8c5f2978f081b4..5ec7693b1ada4647c569a0d7d833378f382ce469 100644 (file)
@@ -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),
index 597285f5ed4c7361729f5b09b265312cee0f537a..5af2fbce3ab44347fe1a9e073c8588bd1b0c5662 100644 (file)
@@ -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),
index 855899b3627640514db76650a98ed623477f4cea..7fae3624fd5c6f17812f68653f41b6c5ce3311ff 100644 (file)
@@ -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),
index e6fcab097f48c74606a6617d47482a2c75cb871b..9e6c23b88b5dce5dab7b5a4a20e5840f922c4596 100644 (file)
@@ -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),
index 57eeac7355094581082dcc81c1a46a1c4c0e5b78..675e7faf026b51164e94d10622081960f801cad6 100644 (file)
@@ -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),
index 8963d97c9420826980ad90e9ab1eeebe3b3b9bdb..72df2203ccf9c8874734d3b2538d8ca9c4421b4a 100644 (file)
@@ -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"),
index 8cc1b35120545f58ea24992c142be3cb48ff2f29..68c2ad594776accc6a30ac6cd7b5ebcdf9e83a3d 100644 (file)
@@ -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),
index c5275c0de4616fb0d634806c0d19b1f0f3d01d8e..8f9ddec257fee8071e4f66f635f49ad519aa16ae 100644 (file)
@@ -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"),
index ed89b19461fe22505325618c87956bdb0419a1d3..76b7e8ac4aa627cd0276082b52eeb632f378b877 100644 (file)
@@ -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),
index 7caf5d175bb98e894592ee26fd9d6bc47bb0955e..9e0ee205eced2e5a6b690b9144e8ef3b38f41809 100644 (file)
@@ -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"),
index 67f0ce76d49e8f2e2c0a5ab5ed53e9e725bdd4c5..e361df3361b4784e4e77fb8131745693eed15c05 100644 (file)
@@ -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
   };
 
index e4e8c46a10bca807065bdb13f3ea7759c6b29e1b..b7360bbabc608e12066c79f777ca3f24cee589ce 100644 (file)
@@ -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),
index bf88e5ded97225b593375c9f4d80febeb67f8889..f183fe588d62a910810147ccfca1193299e7fcff 100644 (file)
@@ -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
   };
index f65141640adccc868c52dee51523aaad94685910..a8807bea8cbe5c33395200f181f0ab5c95d69ec5 100644 (file)
@@ -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)"),
index 2436931fbf686c4c18a9a85ad3325554ae9fdedb..fb5c768ac2a8ab37a43a6b4b1d3a12599a8d57aa 100644 (file)
@@ -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
   };
 
index 0469af732aff959eefa0ceacc8536e7031b0b6a3..44d3d0b6c05720403c7afff32ee879aa3c0bddaf 100644 (file)
@@ -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
   };
 
index cb40bb6d28e1da09e57b999107a681c1072aeaff..d99097a156f04cb906a1a4df9e3632530c69228b 100644 (file)
@@ -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
   };
index 2f980520a5550e44002cdd8803e9b6ba465d538d..0976b37e4e40bc8d8e2d81cd57b75c15095520c8 100644 (file)
@@ -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
   };
index 4d6f30587b0c9115a6ac7b94e84c2104b75a5b47..83c1eb505e6ee632c595d4a62ba3eb2de77a902a 100644 (file)
@@ -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"),
                                    &parallelism),
 
-    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), 
index fb99d8f9051fc77b5565a51df7c1a6d01206afaa..ac9f6777f46284a194867c200d60291533263ef4 100644 (file)
@@ -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"),
index 2b24b71245376989f24c70992fc5a15f3f1cc25f..ad8f223ff15e5e35dd5fe0c69935ca2f279bfd0c 100644 (file)
@@ -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
   };
 
index 2229e45e7d81ce141c1c176cae8dcc7e5ee10a76..395aad7dbf2485159ce972904b961b54b121e1a0 100644 (file)
@@ -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
   };
index 22e790cf3c5f0e0dd7ec01e3132faacf177367ee..ef17434367a6b65eba0a28fb353175b97d641846 100644 (file)
@@ -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 "
index c53a85fb4b72ec87e97837d14f1740bc82aa5b7a..213d2b3327377dee739561aac0b571be6e8b75fe 100644 (file)
@@ -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
   };
index fb7ac10c18424c493d6ed6e49fa6bc44f14e6445..0746d5c5798c45167fbe86b612d9e7ba90f78fb2 100644 (file)
@@ -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)"),
index c9b4bde9c17af85d8812bb2937a2555214753669..424677d14de1cc0b113b8c988a3e1ddb1f2d9015 100644 (file)
@@ -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)"),
index 35f42cdecaa875be7139f55f6662dde1a276841a..2a6de1c30e8b02a85a931bb4e445d580f86a8be8 100644 (file)
@@ -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"),
index c85ddfe81c2781771106483263bf8d8d928d7e4a..c0de0f30c5028c7599ff1d1fe5b70b654f38097e 100644 (file)
@@ -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"),
index 9b4790c32b14172378f42ed80fa7a8c56c4d6619..854340d3d55f77d979a84570378c1f900d44faba 100644 (file)
@@ -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),
index 906899ea761353d4946796e3422eefb954bd15bf..30b63bfc498636e7981aab0417813c369e01f6b8 100644 (file)
@@ -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),
index 5c457ef5d53a4629b7c0a154856d37bf15025c91..9b66a1bc706aa81ccd8fdf9215ab1064c567701d 100644 (file)
@@ -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)"),
index c2bd72340db00d2b2e7bf1ad20ca36ff2cf0d497..f707bb0919c989571b1fc8a29f2370d0893a7ee4 100644 (file)
@@ -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);
 
 
 /**
index 2410c9b3c3fb3edc92d9da880d0fa1f41a37ebfe..d867138e4645e0d50e4e56d0cf74b8af4a6da5a8 100644 (file)
@@ -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"),
index 2ce3741f8a1dd33e25be76b8bd2fd73f2181a84b..dcb9dd678d38fbb7bb17266cb050ba80fd9ade68 100644 (file)
@@ -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"),
index 8b281d1ab648ec15d39654acdf7041687b53fe7b..7d09253b8538a85626ff085f0b8314df88cb69ed 100644 (file)
@@ -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"),
                                  &section_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),
index 50e0dff0f7ecb9cebb17b2022132f1c2e504b135..b3cf2e9469c50eddd9196ba1baa949a0f81e76e8 100644 (file)
@@ -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"),
                                  &section_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),
index ea28bf61017ae85eb38e8334fd7b9a7758e75c23..4a10022e3ce81b5a308a37d78ad9c77bb34186b5 100644 (file)
@@ -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"),
index 59ffe2efd2eaaf4101944c54956b2c6c849c0f0f..de7dcd6fa957f15cf77cf2455b87b3acf3a8ebe3 100644 (file)
@@ -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"),
index 71f3580f8f283bc5a5bb09282e35c66ce5fc311f..7d907fec6b7e894104af3c0009c00e103ec101f7 100644 (file)
@@ -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"),
index 422e455653096ef51a9983d1a2faa7165011a0ef..67c2ecfff9ad6d8f881c601f448188cca4669654 100644 (file)
@@ -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"),
index 0b6c182674965cda64e9af149490f31c3d55991d..5b92c6c43dfa84a1adda5f3fa7b7c9b20d7d9f35 100644 (file)
@@ -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)"),
index 7b40c83d7f374241483909aaacba89f38116111e..13e6b23a5cce3d4f3e26ed2e193595ddf456b73b 100644 (file)
@@ -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"),
index e36e547fad5b03993c39ff75b5fa7e7eb737670d..bbac0d63496d4526cd4f5cf28a77750e03852320 100644 (file)
@@ -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"),
index 5d0fce2b1986c5dc1131ba039c5426f15fa9bc79..4a152e09ef7ef25289c1198a3f6f4a4587b02ee3 100644 (file)
@@ -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."),
index e66019dc6996b9855c6e5687a546bf34770321a9..a83dcd92aafacb82ab9d3521f5491a3f8d83db82 100644 (file)
@@ -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
   };
index ac86a900d914a30511b726136bbf535a778f01dc..70fafa1e1446a42ce18f1d59fc496e7a7bc3c550 100644 (file)
@@ -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"),
index 349bce6ea1c05197e051b1ef21756a2716bb990a..68f7be690bbb10c441490d7e2a1724596b30ab2b 100644 (file)
@@ -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"),
index 4a46fdc99c11464a4c346c181fb4ffa869381910..228d69d58056f27e181d960f5ce1ec94d4760397 100644 (file)
@@ -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),
index 6cfc5617183e86dcba165fdfe8a16b5e7291fb72..159afda53c5a7f919421312ad68e8defb1a92286 100644 (file)
@@ -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"),
index ab7d81c8bfaa7a2e18912d0ce48271937271f7d0..2e78c60be196423a061296d0a4b2e96b7d73d8f0 100644 (file)
@@ -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"),
index 29f77193d3e06f130532154158fff2bd2e1f95ce..9829bbf0d85f1a5da0465a4a9f9d821c29a42468 100644 (file)
@@ -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"),
index 686b38192b1268dd777ab0215141e324d19964f1..3dbe6588345951a3ac67e9e6f2b8a489048f62d3 100644 (file)
@@ -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)"),
index cfb49460aeed2d8d176b54575f07d8674c7726b2..9210486d375dfafac7a33abd46bf9e2bfa031852 100644 (file)
@@ -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"),
index 9292c42d420dd636fddc1124fde7df7fab6ba86c..d580fce08808f598dc7ececf87888cbaf8cd356a 100644 (file)
@@ -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
   };
 
index 8624b09b42a2a3b2db06bc9e82322abe6aa955c4..96d0a6a3a3a5a4db80b41306073d419f8f213026 100644 (file)
@@ -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
   };
 
index 7c2d3e55a94720c957d9a363fa10640da5a1774f..1f1f6c063ba13516491ee14a22360f5f9dc5f77a 100644 (file)
@@ -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;
index 76342a6c9c4384834780d6bd373038b668a3c94a..c3d0e4c7c6b3fd85e1dfeb4549fa960aad85c237 100644 (file)
@@ -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;
index 2beb772a9a9fc19673f09765b1e06afbc89263f3..fb3b9ebf933c5ad60d59608eccff31ea4aeb2f69 100644 (file)
@@ -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"),
                                      &section),
-    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),
index 732228b52bd6f654d159d90b28d309d361a0793e..2a712f4ebd09fdf01d3a8f28e942ecf9035dd79e 100644 (file)
@@ -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),
index 563cf9fce410113daa6b0e327acff5df73e66392..7ffafee322cb3239c3e8576ef6114026d829035f 100644 (file)
@@ -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),
index 7c73cfe1efd5886dac042afeaf9dac663cc994c8..3b3b7d695c0b45555c0348d633e2a6c29f9c09c3 100644 (file)
@@ -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"),
index e2b356f8810a371f29329f45a3e6ac6fbb1d22a9..92a9750f3e66961bf05dbddc93782e07d2c2a144 100644 (file)
@@ -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;
index 800d09a4256a7be88d2b57eb14cf15d1a105e4bb..f63737e564fbc8e9b03b4769f28ea757518e9ed6 100644 (file)
@@ -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
   };
 
index 13cedd7f51786793c523ce7ad008fa71410c7b90..16f2df8d16fbd2880e17b2aab6ca7e1504a4a712 100644 (file)
@@ -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",
index d206952af9ab1fb8a38b6926e3f1e8991a401f3a..6d51b1872c327ed466ef1fcc261c99a6f8380c39 100644 (file)
@@ -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),
index 0adbd5c96f7f6d4bdebb3e96b3628854c8b95926..34c545339175b29d3014ee22c32d9096d80a7565 100644 (file)
@@ -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
   };