Quellcode durchsuchen

rename GNUNET_GETOPT functions to achieve better consistency

Christian Grothoff vor 7 Jahren
Ursprung
Commit
5a7cef0202
68 geänderte Dateien mit 404 neuen und 404 gelöschten Zeilen
  1. 12 12
      src/arm/gnunet-arm.c
  2. 3 3
      src/ats-tests/gnunet-solver-eval.c
  3. 11 11
      src/ats-tool/gnunet-ats.c
  4. 6 6
      src/ats/gnunet-ats-solver-eval.c
  5. 7 7
      src/ats/perf_ats_solver.c
  6. 7 7
      src/auction/gnunet-auction-create.c
  7. 8 8
      src/cadet/gnunet-cadet.c
  8. 2 2
      src/cadet/test_cadet.c
  9. 8 8
      src/consensus/gnunet-consensus-profiler.c
  10. 2 2
      src/conversation/gnunet-conversation.c
  11. 1 1
      src/core/gnunet-core.c
  12. 1 1
      src/datastore/gnunet-datastore.c
  13. 6 6
      src/dht/gnunet-dht-get.c
  14. 4 4
      src/dht/gnunet-dht-monitor.c
  15. 8 8
      src/dht/gnunet-dht-put.c
  16. 8 8
      src/dht/gnunet_dht_profiler.c
  17. 3 3
      src/dns/gnunet-dns-monitor.c
  18. 3 3
      src/dns/gnunet-dns-redirector.c
  19. 1 1
      src/dv/gnunet-dv.c
  20. 6 6
      src/fs/gnunet-auto-share.c
  21. 8 8
      src/fs/gnunet-download.c
  22. 3 3
      src/fs/gnunet-fs-profiler.c
  23. 2 2
      src/fs/gnunet-fs.c
  24. 13 13
      src/fs/gnunet-publish.c
  25. 6 6
      src/fs/gnunet-search.c
  26. 1 1
      src/fs/gnunet-unindex.c
  27. 1 1
      src/gns/gnunet-bcd.c
  28. 5 5
      src/gns/gnunet-dns2gns.c
  29. 2 2
      src/gns/gnunet-gns-proxy.c
  30. 6 6
      src/gns/gnunet-gns.c
  31. 4 4
      src/hostlist/gnunet-daemon-hostlist.c
  32. 2 2
      src/identity-provider/gnunet-identity-token.c
  33. 6 6
      src/identity/gnunet-identity.c
  34. 19 19
      src/include/gnunet_getopt_lib.h
  35. 2 2
      src/namecache/gnunet-namecache.c
  36. 14 14
      src/namestore/gnunet-namestore.c
  37. 5 5
      src/nat-auto/gnunet-nat-auto.c
  38. 7 7
      src/nat/gnunet-nat.c
  39. 7 7
      src/nse/gnunet-nse-profiler.c
  40. 8 8
      src/peerinfo-tool/gnunet-peerinfo.c
  41. 5 5
      src/regex/gnunet-regex-profiler.c
  42. 2 2
      src/regex/gnunet-regex-simulation-profiler.c
  43. 1 1
      src/rest/gnunet-rest-server.c
  44. 4 4
      src/revocation/gnunet-revocation.c
  45. 1 1
      src/rps/gnunet-rps.c
  46. 4 4
      src/scalarproduct/gnunet-scalarproduct.c
  47. 6 6
      src/secretsharing/gnunet-secretsharing-profiler.c
  48. 5 5
      src/set/gnunet-set-ibf-profiler.c
  49. 9 9
      src/set/gnunet-set-profiler.c
  50. 29 29
      src/social/gnunet-social.c
  51. 7 7
      src/statistics/gnunet-statistics.c
  52. 1 1
      src/testbed/generate-underlay-topology.c
  53. 4 4
      src/testbed/gnunet-testbed-profiler.c
  54. 5 5
      src/testing/gnunet-testing.c
  55. 1 1
      src/testing/list-keys.c
  56. 7 7
      src/transport/gnunet-transport-profiler.c
  57. 11 11
      src/transport/gnunet-transport.c
  58. 6 6
      src/transport/tcp_service_legacy.c
  59. 17 17
      src/util/getopt_helpers.c
  60. 6 6
      src/util/gnunet-config.c
  61. 5 5
      src/util/gnunet-ecc.c
  62. 1 1
      src/util/gnunet-resolver.c
  63. 4 4
      src/util/gnunet-scrypt.c
  64. 5 5
      src/util/program.c
  65. 6 6
      src/util/service.c
  66. 8 8
      src/util/test_getopt.c
  67. 7 7
      src/util/test_program.c
  68. 9 9
      src/vpn/gnunet-vpn.c

+ 12 - 12
src/arm/gnunet-arm.c

@@ -764,64 +764,64 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('e',
+    GNUNET_GETOPT_option_flag ('e',
                                   "end",
                                   gettext_noop ("stop all GNUnet services"),
                                   &end),
 
-    GNUNET_GETOPT_OPTION_STRING ('i',
+    GNUNET_GETOPT_option_string ('i',
                                  "init",
                                  "SERVICE",
                                  gettext_noop ("start a particular service"),
                                  &init),
 
-    GNUNET_GETOPT_OPTION_STRING ('k',
+    GNUNET_GETOPT_option_string ('k',
                                  "kill",
                                  "SERVICE",
                                  gettext_noop ("stop a particular service"),
                                  &term),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('s',
+    GNUNET_GETOPT_option_flag ('s',
                                   "start",
                                   gettext_noop ("start all GNUnet default services"),
                                   &start),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('r',
+    GNUNET_GETOPT_option_flag ('r',
                                   "restart",
                                   gettext_noop ("stop and start all GNUnet default services"),
                                   &restart),
-    GNUNET_GETOPT_OPTION_SET_ONE ('d',
+    GNUNET_GETOPT_option_flag ('d',
                                   "delete",
                                   gettext_noop ("delete config file and directory on exit"),
                                   &delete),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('m',
+    GNUNET_GETOPT_option_flag ('m',
                                   "monitor",
                                   gettext_noop ("monitor ARM activities"),
                                   &monitor),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('q',
+    GNUNET_GETOPT_option_flag ('q',
                                   "quiet",
                                   gettext_noop ("don't print status messages"),
                                   &quiet),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T',
+    GNUNET_GETOPT_option_relative_time ('T',
                                             "timeout",
                                             "DELAY",
                                             gettext_noop ("exit with error status if operation does not finish after DELAY"),
                                             &timeout),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('I',
+    GNUNET_GETOPT_option_flag ('I',
                                   "info",
                                   gettext_noop ("list currently running services"),
                                   &list), 
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('O',
+    GNUNET_GETOPT_option_flag ('O',
                                   "no-stdout",
                                   gettext_noop ("don't let gnunet-service-arm inherit standard output"),
                                   &no_stdout),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('E',
+    GNUNET_GETOPT_option_flag ('E',
                                   "no-stderr",
                                   gettext_noop ("don't let gnunet-service-arm inherit standard error"),
                                   &no_stderr),

+ 3 - 3
src/ats-tests/gnunet-solver-eval.c

@@ -933,19 +933,19 @@ main (int argc, char *argv[])
 
   struct GNUNET_GETOPT_CommandLineOption options[] =
   {
-    GNUNET_GETOPT_OPTION_STRING ('s',
+    GNUNET_GETOPT_option_string ('s',
                                  "solver",
                                  NULL,
                                  gettext_noop ("solver to use"),
                                  &opt_solver),
 
-    GNUNET_GETOPT_OPTION_STRING ('e',
+    GNUNET_GETOPT_option_string ('e',
                                  "experiment",
                                  NULL,
                                  gettext_noop ("experiment to use"),
                                  &opt_exp_file),
  
-    GNUNET_GETOPT_OPTION_SET_ONE ('e',
+    GNUNET_GETOPT_option_flag ('e',
                                   "experiment",
                                   gettext_noop ("experiment to use"),
                                   &opt_verbose),

+ 11 - 11
src/ats-tool/gnunet-ats.c

@@ -945,58 +945,58 @@ main (int argc,
   opt_type_str = NULL;
 
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('u',
+    GNUNET_GETOPT_option_flag ('u',
                                   "used",
                                   gettext_noop ("get list of active addresses currently used"),
                                   &opt_list_used),
-    GNUNET_GETOPT_OPTION_SET_ONE ('a',
+    GNUNET_GETOPT_option_flag ('a',
                                   "all",
                                   gettext_noop ("get list of all active addresses"),
                                   &opt_list_all),
 
-    GNUNET_GETOPT_OPTION_STRING ('C',
+    GNUNET_GETOPT_option_string ('C',
                                  "connect",
                                  NULL,
                                  gettext_noop ("connect to PEER"),
                                  &cpid_str),
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "numeric",
                                   gettext_noop ("do not resolve IP addresses to hostnames"),
                                   &opt_resolve_addresses_numeric),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('m',
+    GNUNET_GETOPT_option_flag ('m',
                                   "monitor",
                                   gettext_noop ("monitor mode"),
                                   &opt_monitor),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('p',
+    GNUNET_GETOPT_option_flag ('p',
                                   "preference",
                                   gettext_noop ("set preference for the given peer"),
                                   &opt_set_pref),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('q', 
+    GNUNET_GETOPT_option_flag ('q', 
                                   "quotas",
                                   gettext_noop ("print all configured quotas"),
                                   &opt_print_quotas),
-    GNUNET_GETOPT_OPTION_STRING ('i',
+    GNUNET_GETOPT_option_string ('i',
                                  "id",
                                  "TYPE",
                                  gettext_noop ("peer id"),
                                  &opt_pid_str),
 
-    GNUNET_GETOPT_OPTION_STRING ('t',
+    GNUNET_GETOPT_option_string ('t',
                                  "type",
                                  "TYPE",
                                  gettext_noop ("preference type to set: latency | bandwidth"),
                                  &opt_type_str),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('k',
+    GNUNET_GETOPT_option_uint ('k',
                                    "value",
                                    "VALUE",
                                    gettext_noop ("preference value"),
                                    &opt_pref_value),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('V',
+    GNUNET_GETOPT_option_flag ('V',
                                   "verbose",
                                   gettext_noop ("verbose output (include ATS address properties)"),
                                   &opt_verbose),

+ 6 - 6
src/ats/gnunet-ats-solver-eval.c

@@ -3289,29 +3289,29 @@ main (int argc, char *argv[])
 
   static struct GNUNET_GETOPT_CommandLineOption options[] =
   {
-    GNUNET_GETOPT_OPTION_STRING ('s',
+    GNUNET_GETOPT_option_string ('s',
                                  "solver",
                                  gettext_noop ("solver to use"),
                                  &opt_solver),
 
-    GNUNET_GETOPT_OPTION_STRING ('e',
+    GNUNET_GETOPT_option_string ('e',
                                  "experiment"
                                  gettext_noop ("experiment to use"),
                                  &opt_exp_file),
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&opt_verbose),
+    GNUNET_GETOPT_option_verbose (&opt_verbose),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('p', 
+    GNUNET_GETOPT_option_flag ('p', 
                                   "print",
                                   gettext_noop ("print logging"),
                                   &opt_print),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('f',
+    GNUNET_GETOPT_option_flag ('f',
                                   "file",
                                   gettext_noop ("save logging to disk"),
                                   &opt_save),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('d', 
+    GNUNET_GETOPT_option_flag ('d', 
                                   "dn",
                                   gettext_noop ("disable normalization"),
                                   &opt_disable_normalization),

+ 7 - 7
src/ats/perf_ats_solver.c

@@ -1405,37 +1405,37 @@ main (int argc, char *argv[])
 
   static struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('a',
+      GNUNET_GETOPT_option_uint ('a',
                                      "addresses",
                                      gettext_noop ("addresses to use"),
                                      &ph.N_address),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('s',
+      GNUNET_GETOPT_option_uint ('s',
                                      "start",
                                      gettext_noop ("start with peer"),
                                      &ph.N_peers_start),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('e',
+      GNUNET_GETOPT_option_uint ('e',
                                      "end",
                                      gettext_noop ("end with peer"),
                                      &ph.N_peers_end),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('i',
+      GNUNET_GETOPT_option_uint ('i',
                                      "iterations",
                                      gettext_noop ("number of iterations used for averaging (default: 1)"),
                                      &ph.total_iterations),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('p',
+      GNUNET_GETOPT_option_uint ('p',
                                      "percentage",
                                      gettext_noop ("update a fix percentage of addresses"),
                                      &ph.opt_update_percent),
 
-      GNUNET_GETOPT_OPTION_SET_ONE ('d',
+      GNUNET_GETOPT_option_flag ('d',
                                     "data",
                                     gettext_noop ("create data file"),
                                     &ph.create_datafile),
 
-      GNUNET_GETOPT_OPTION_SET_ONE ('u',
+      GNUNET_GETOPT_option_flag ('u',
                                     "update",
                                     gettext_noop ("measure updates"),
                                     &ph.measure_updates),

+ 7 - 7
src/auction/gnunet-auction-create.c

@@ -157,30 +157,30 @@ main (int argc, char *const *argv)
 {
 	struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-                GNUNET_GETOPT_OPTION_FILENAME ('d',
+                GNUNET_GETOPT_option_filename ('d',
                                                "description",
                                                "FILE",
                                                gettext_noop ("description of the item to be sold"),
                                                &fndesc),
 
-                GNUNET_GETOPT_OPTION_FILENAME ('p',
+                GNUNET_GETOPT_option_filename ('p',
                                                "pricemap",
                                                "FILE",
                                                gettext_noop ("mapping of possible prices"),
                                                &fnprices),
 
-                GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('r',
+                GNUNET_GETOPT_option_relative_time ('r',
                                                         "roundtime",
                                                         "DURATION",
                                                         gettext_noop ("max duration per round"),
                                                         &dround),
 
-                GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('s',
+                GNUNET_GETOPT_option_relative_time ('s',
                                                         "regtime",
                                                         "DURATION",
                                                         gettext_noop ("duration until auction starts"),
                                                         &dstart),
-                GNUNET_GETOPT_OPTION_SET_UINT ('m',
+                GNUNET_GETOPT_option_uint ('m',
                                                "m",
                                                "NUMBER",
                                                gettext_noop ("number of items to sell\n"
@@ -188,12 +188,12 @@ main (int argc, char *const *argv)
 			                                     ">0 for vickrey/M+1st price auction"),
                                                &m), 
 
-                GNUNET_GETOPT_OPTION_SET_ONE ('u',
+                GNUNET_GETOPT_option_flag ('u',
                                               "public",
                                               gettext_noop ("public auction outcome"),
                                               &outcome),
 
-                GNUNET_GETOPT_OPTION_SET_ONE ('i',
+                GNUNET_GETOPT_option_flag ('i',
                                               "interactive",
                                               gettext_noop ("keep running in foreground until auction completes"),
                                               &interactive),

+ 8 - 8
src/cadet/gnunet-cadet.c

@@ -922,49 +922,49 @@ main (int argc,
   const char helpstr[] = "Create tunnels and retrieve info about CADET's status.";
   struct GNUNET_GETOPT_CommandLineOption options[] = {
     /* I would use the terminology 'circuit' here...  --lynX */
-    GNUNET_GETOPT_OPTION_STRING ('C',
+    GNUNET_GETOPT_option_string ('C',
                                  "connection",
                                  "CONNECTION_ID",
                                  gettext_noop ("Provide information about a particular connection"),
                                  &conn_id),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('e',
+    GNUNET_GETOPT_option_flag ('e',
                                   "echo",
                                   gettext_noop ("Activate echo mode"),
                                   &echo), 
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('d',
+    GNUNET_GETOPT_option_flag ('d',
                                   "dump",
                                   gettext_noop ("Dump debug information to STDERR"),
                                   &dump),
 
-    GNUNET_GETOPT_OPTION_STRING ('o',
+    GNUNET_GETOPT_option_string ('o',
                                  "open-port",
                                  "SHARED_SECRET",
                                  gettext_noop ("Listen for connections using a shared secret among sender and recipient"),
                                  &listen_port),
 
 
-    GNUNET_GETOPT_OPTION_STRING ('p',
+    GNUNET_GETOPT_option_string ('p',
                                  "peer",
                                  "PEER_ID",
                                  gettext_noop ("Provide information about a patricular peer"),
                                  &peer_id),
 
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('P',
+    GNUNET_GETOPT_option_flag ('P',
                                   "peers",
                                   gettext_noop ("Provide information about all peers"),
                                   &request_peers),
 
-    GNUNET_GETOPT_OPTION_STRING ('t',
+    GNUNET_GETOPT_option_string ('t',
                                  "tunnel",
                                  "TUNNEL_ID",
                                  gettext_noop ("Provide information about a particular tunnel"),
                                  &tunnel_id),
 
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('T',
+    GNUNET_GETOPT_option_flag ('T',
                                   "tunnels",
                                   gettext_noop ("Provide information about all tunnels"),
                                   &request_tunnels),

+ 2 - 2
src/cadet/test_cadet.c

@@ -959,13 +959,13 @@ main (int argc, char *argv[])
   const char *config_file;
   char port_id[] = "test port";
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+    GNUNET_GETOPT_option_relative_time ('t',
                                             "time",
                                             "short_time",
                                             gettext_noop ("set short timeout"),
                                             &short_time),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('m',
+    GNUNET_GETOPT_option_uint ('m',
                                    "messages",
                                    "NUM_MESSAGES",
                                    gettext_noop ("set number of messages to send"),

+ 8 - 8
src/consensus/gnunet-consensus-profiler.c

@@ -517,49 +517,49 @@ main (int argc, char **argv)
 {
    struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('n',
+      GNUNET_GETOPT_option_uint ('n',
                                      "num-peers",
                                      NULL,
                                      gettext_noop ("number of peers in consensus"),
                                      &num_peers),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('k',
+      GNUNET_GETOPT_option_uint ('k',
                                      "value-replication",
                                      NULL,
                                      gettext_noop ("how many peers (random selection without replacement) receive one value?"),
                                      &replication),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('x',
+      GNUNET_GETOPT_option_uint ('x',
                                      "num-values",
                                      NULL,
                                      gettext_noop ("number of values"),
                                      &num_values),
 
-      GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+      GNUNET_GETOPT_option_relative_time ('t',
                                               "timeout",
                                               NULL,
                                               gettext_noop ("consensus timeout"),
                                               &conclude_timeout),
 
 
-      GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d',
+      GNUNET_GETOPT_option_relative_time ('d',
                                               "delay",
                                               NULL,
                                               gettext_noop ("delay until consensus starts"),
                                               &consensus_delay),
 
-      GNUNET_GETOPT_OPTION_FILENAME ('s',
+      GNUNET_GETOPT_option_filename ('s',
                                      "statistics",
                                      "FILENAME",
                                      gettext_noop ("write statistics to file"),
                                      &statistics_filename),
 
-      GNUNET_GETOPT_OPTION_SET_ONE ('S',
+      GNUNET_GETOPT_option_flag ('S',
                                     "dist-static",
                                     gettext_noop ("distribute elements to a static subset of good peers"),
                                     &dist_static),
 
-      GNUNET_GETOPT_OPTION_SET_ONE ('V',
+      GNUNET_GETOPT_option_flag ('V',
                                     "verbose",
                                     gettext_noop ("be more verbose (print received values)"),
                                     &verbose),

+ 2 - 2
src/conversation/gnunet-conversation.c

@@ -1267,13 +1267,13 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_STRING ('e',
+    GNUNET_GETOPT_option_string ('e',
                                  "ego",
                                  "NAME",
                                  gettext_noop ("sets the NAME of the ego to use for the phone (and name resolution)"),
                                  &ego_name),
 
-    GNUNET_GETOPT_OPTION_STRING ('p',
+    GNUNET_GETOPT_option_string ('p',
                                  "phone",
                                  "LINE",
                                  gettext_noop ("sets the LINE to use for the phone"),

+ 1 - 1
src/core/gnunet-core.c

@@ -172,7 +172,7 @@ main (int argc,
 {
   int res;
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('m',
+    GNUNET_GETOPT_option_flag ('m',
                                   "monitor",
                                   gettext_noop ("provide information about all current connections (continuously)"),
                                   &monitor_connections),

+ 1 - 1
src/datastore/gnunet-datastore.c

@@ -250,7 +250,7 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_FILENAME ('s',
+    GNUNET_GETOPT_option_filename ('s',
                                    "sourcecfg",
                                    "FILENAME",
                                    gettext_noop ("specifies the configuration to use to access an alternative datastore; will merge that datastore into our current datastore"),

+ 6 - 6
src/dht/gnunet-dht-get.c

@@ -239,37 +239,37 @@ main (int argc, char *const *argv)
 
   struct GNUNET_GETOPT_CommandLineOption options[] = {
   
-    GNUNET_GETOPT_OPTION_STRING ('k',
+    GNUNET_GETOPT_option_string ('k',
                                  "key",
                                  "KEY",
                                  gettext_noop ("the query key"),
                                  &query_key),
   
-    GNUNET_GETOPT_OPTION_SET_UINT ('r',
+    GNUNET_GETOPT_option_uint ('r',
                                    "replication",
                                    "LEVEL",
                                    gettext_noop ("how many parallel requests (replicas) to create"),
                                    &replication),
   
   
-    GNUNET_GETOPT_OPTION_SET_UINT ('t',
+    GNUNET_GETOPT_option_uint ('t',
                                    "type",
                                    "TYPE",
                                    gettext_noop ("the type of data to look for"),
                                    &query_type),
   
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T',
+    GNUNET_GETOPT_option_relative_time ('T',
                                             "timeout",
                                             "TIMEOUT",
                                             gettext_noop ("how long to execute this query before giving up?"),
                                             &timeout_request),
   
-    GNUNET_GETOPT_OPTION_SET_ONE ('x',
+    GNUNET_GETOPT_option_flag ('x',
                                   "demultiplex",
                                   gettext_noop ("use DHT's demultiplex everywhere option"),
                                   &demultixplex_everywhere),
   
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+    GNUNET_GETOPT_option_verbose (&verbose),
     GNUNET_GETOPT_OPTION_END
   };
 

+ 4 - 4
src/dht/gnunet-dht-monitor.c

@@ -292,25 +292,25 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
   
-    GNUNET_GETOPT_OPTION_STRING ('k',
+    GNUNET_GETOPT_option_string ('k',
                                  "key",
                                  "KEY",
                                  gettext_noop ("the query key"),
                                  &query_key),
   
-    GNUNET_GETOPT_OPTION_SET_UINT ('t',
+    GNUNET_GETOPT_option_uint ('t',
                                    "type",
                                    "TYPE",
                                    gettext_noop ("the type of data to look for"),
                                    &block_type),
   
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T',
+    GNUNET_GETOPT_option_relative_time ('T',
                                             "timeout",
                                             "TIMEOUT",
                                             gettext_noop ("how long should the monitor command run"),
                                             &timeout_request),
   
-    GNUNET_GETOPT_OPTION_SET_ONE ('V',
+    GNUNET_GETOPT_option_flag ('V',
                                   "verbose",
                                   gettext_noop ("be verbose (print progress information)"),
                                   &verbose),

+ 8 - 8
src/dht/gnunet-dht-put.c

@@ -204,47 +204,47 @@ main (int argc, char *const *argv)
 
   struct GNUNET_GETOPT_CommandLineOption options[] = {
   
-    GNUNET_GETOPT_OPTION_STRING ('d',
+    GNUNET_GETOPT_option_string ('d',
                                  "data",
                                  "DATA",
                                  gettext_noop ("the data to insert under the key"),
                                  &data),
   
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('e',
+    GNUNET_GETOPT_option_relative_time ('e',
                                             "expiration",
                                             "EXPIRATION",
                                             gettext_noop ("how long to store this entry in the dht (in seconds)"),
                                             &expiration),
   
-    GNUNET_GETOPT_OPTION_STRING ('k',
+    GNUNET_GETOPT_option_string ('k',
                                  "key",
                                  "KEY",
                                  gettext_noop ("the query key"),
                                  &query_key),
   
-    GNUNET_GETOPT_OPTION_SET_ONE ('x',
+    GNUNET_GETOPT_option_flag ('x',
                                   "demultiplex",
                                   gettext_noop ("use DHT's demultiplex everywhere option"),
                                   &demultixplex_everywhere),
   
-    GNUNET_GETOPT_OPTION_SET_UINT ('r',
+    GNUNET_GETOPT_option_uint ('r',
                                    "replication",
                                    "LEVEL",
                                    gettext_noop ("how many replicas to create"),
                                    &replication),
   
-    GNUNET_GETOPT_OPTION_SET_ONE ('R',
+    GNUNET_GETOPT_option_flag ('R',
                                   "record",
                                   gettext_noop ("use DHT's record route option"),
                                   &record_route),
   
-    GNUNET_GETOPT_OPTION_SET_UINT ('t',
+    GNUNET_GETOPT_option_uint ('t',
                                    "type",
                                    "TYPE",
                                    gettext_noop ("the type to insert data as"),
                                    &query_type),
   
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+    GNUNET_GETOPT_option_verbose (&verbose),
   
     GNUNET_GETOPT_OPTION_END
   };

+ 8 - 8
src/dht/gnunet_dht_profiler.c

@@ -1182,49 +1182,49 @@ main (int argc, char *const *argv)
   int rc;
 
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_UINT ('n',
+    GNUNET_GETOPT_option_uint ('n',
                                    "peers",
                                    "COUNT",
                                    gettext_noop ("number of peers to start"),
                                    &num_peers),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('s',
+    GNUNET_GETOPT_option_uint ('s',
                                    "searches",
                                    "COUNT",
                                    gettext_noop ("maximum number of times we try to search for successor circle formation (0 for R5N)"),
                                    &max_searches),
 
-    GNUNET_GETOPT_OPTION_STRING ('H',
+    GNUNET_GETOPT_option_string ('H',
                                  "hosts",
                                  "FILENAME",
                                  gettext_noop ("name of the file with the login information for the testbed"),
                                  &hosts_file),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D',
+    GNUNET_GETOPT_option_relative_time ('D',
                                             "delay",
                                             "DELAY",
                                             gettext_noop ("delay between rounds for collecting statistics (default: 30 sec)"),
                                             &delay_stats),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('P',
+    GNUNET_GETOPT_option_relative_time ('P',
                                             "PUT-delay",
                                             "DELAY",
                                             gettext_noop ("delay to start doing PUTs (default: 1 sec)"),
                                             &delay_put),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('G',
+    GNUNET_GETOPT_option_relative_time ('G',
                                             "GET-delay",
                                             "DELAY",
                                             gettext_noop ("delay to start doing GETs (default: 5 min)"),
                                             &delay_get),
-    GNUNET_GETOPT_OPTION_SET_UINT ('r',
+    GNUNET_GETOPT_option_uint ('r',
                                    "replication",
                                    "DEGREE",
                                    gettext_noop ("replication degree for DHT PUTs"),
                                    &replication),
 
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+    GNUNET_GETOPT_option_relative_time ('t',
                                             "timeout",
                                             "TIMEOUT",
                                             gettext_noop ("timeout for DHT PUT and GET requests (default: 1 min)"),

+ 3 - 3
src/dns/gnunet-dns-monitor.c

@@ -348,17 +348,17 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('i',
+    GNUNET_GETOPT_option_flag ('i',
                                   "inbound-only",
                                   gettext_noop ("only monitor DNS queries"),
                                   &inbound_only),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('o',
+    GNUNET_GETOPT_option_flag ('o',
                                   "outbound-only",
                                   gettext_noop ("only monitor DNS queries"),
                                   &outbound_only),
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+    GNUNET_GETOPT_option_verbose (&verbosity),
     GNUNET_GETOPT_OPTION_END
   };
 

+ 3 - 3
src/dns/gnunet-dns-redirector.c

@@ -231,19 +231,19 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_STRING ('4',
+    GNUNET_GETOPT_option_string ('4',
                                  "ipv4",
                                  "IPV4",
                                  gettext_noop ("set A records"),
                                  &n4),
 
-    GNUNET_GETOPT_OPTION_STRING ('6',
+    GNUNET_GETOPT_option_string ('6',
                                  "ipv4",
                                  "IPV6",
                                  gettext_noop ("set AAAA records"),
                                  &n6),
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+    GNUNET_GETOPT_option_verbose (&verbosity),
     GNUNET_GETOPT_OPTION_END
   };
 

+ 1 - 1
src/dv/gnunet-dv.c

@@ -163,7 +163,7 @@ main (int argc, char *const *argv)
 
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+    GNUNET_GETOPT_option_verbose (&verbose),
 
     GNUNET_GETOPT_OPTION_END
   };

+ 6 - 6
src/fs/gnunet-auto-share.c

@@ -761,35 +761,35 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('a',
+    GNUNET_GETOPT_option_uint ('a',
                                    "anonymity",
                                    "LEVEL",
                                    gettext_noop ("set the desired LEVEL of sender-anonymity"),
                                    &anonymity_level),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('d',
+    GNUNET_GETOPT_option_flag ('d',
                                   "disable-creation-time",
                                   gettext_noop ("disable adding the creation time to the metadata of the uploaded file"),
                                   &do_disable_creation_time),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('D',
+    GNUNET_GETOPT_option_flag ('D',
                                   "disable-extractor",
                                   gettext_noop ("do not use libextractor to add keywords or metadata"),
                                   &disable_extractor),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('p',
+    GNUNET_GETOPT_option_uint ('p',
                                    "priority",
                                    "PRIORITY",
                                    gettext_noop ("specify the priority of the content"),
                                    &content_priority),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('r',
+    GNUNET_GETOPT_option_uint ('r',
                                    "replication",
                                    "LEVEL",
                                    gettext_noop ("set the desired replication LEVEL"),
                                    &replication_level),
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+    GNUNET_GETOPT_option_verbose (&verbose),
 
     GNUNET_GETOPT_OPTION_END
   };

+ 8 - 8
src/fs/gnunet-download.c

@@ -300,46 +300,46 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_UINT ('a',
+    GNUNET_GETOPT_option_uint ('a',
                                    "anonymity",
                                    "LEVEL",
                                    gettext_noop ("set the desired LEVEL of receiver-anonymity"),
                                    &anonymity),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('D',
+    GNUNET_GETOPT_option_flag ('D',
                                   "delete-incomplete",
                                   gettext_noop ("delete incomplete downloads (when aborted with CTRL-C)"),
                                   &delete_incomplete),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "no-network",
                                   gettext_noop ("only search the local peer (no P2P network search)"),
                                   &local_only), 
 
-    GNUNET_GETOPT_OPTION_STRING ('o',
+    GNUNET_GETOPT_option_string ('o',
                                  "output",
                                  "FILENAME",
                                  gettext_noop ("write the file to FILENAME"),
                                  &filename),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('p',
+    GNUNET_GETOPT_option_uint ('p',
                                    "parallelism",
                                    "DOWNLOADS",
                                    gettext_noop ("set the maximum number of parallel downloads that is allowed"),
                                    &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), 

+ 3 - 3
src/fs/gnunet-fs-profiler.c

@@ -205,19 +205,19 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('n',
+    GNUNET_GETOPT_option_uint ('n',
                                    "num-peers",
                                    "COUNT",
                                    gettext_noop ("run the experiment with COUNT peers"),
                                    &num_peers),
 
-    GNUNET_GETOPT_OPTION_STRING ('H',
+    GNUNET_GETOPT_option_string ('H',
                                  "hosts",
                                  "HOSTFILE",
                                  gettext_noop ("specifies name of a file with the HOSTS the testbed should use"),
                                  &host_filename),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+    GNUNET_GETOPT_option_relative_time ('t',
                                             "timeout",
                                             "DELAY",
                                             gettext_noop ("automatically terminate experiment after DELAY"),

+ 2 - 2
src/fs/gnunet-fs.c

@@ -114,12 +114,12 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('i',
+    GNUNET_GETOPT_option_flag ('i',
                                   "list-indexed",
                                   gettext_noop ("print a list of all indexed files"),
                                   &list_indexed_files),
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+    GNUNET_GETOPT_option_verbose (&verbose),
     GNUNET_GETOPT_OPTION_END
   };
 

+ 13 - 13
src/fs/gnunet-publish.c

@@ -894,24 +894,24 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_UINT ('a',
+    GNUNET_GETOPT_option_uint ('a',
                                    "anonymity",
                                    "LEVEL",
                                    gettext_noop ("set the desired LEVEL of sender-anonymity"),
                                    &bo.anonymity_level),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('d',
+    GNUNET_GETOPT_option_flag ('d',
                                   "disable-creation-time",
                                   gettext_noop ("disable adding the creation time to the "
                                                 "metadata of the uploaded file"),
                                   &do_disable_creation_time),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('D',
+    GNUNET_GETOPT_option_flag ('D',
                                   "disable-extractor",
                                   gettext_noop ("do not use libextractor to add keywords or metadata"),
                                   &disable_extractor),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('e',
+    GNUNET_GETOPT_option_flag ('e',
                                   "extract",
                                   gettext_noop ("print list of extracted keywords that would "
                                                 "be used, but do not perform upload"),
@@ -930,60 +930,60 @@ main (int argc, char *const *argv)
                                gettext_noop ("set the meta-data for the given TYPE to the given VALUE"),
                                &meta),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "noindex",
                                   gettext_noop ("do not index, perform full insertion (stores "
                                                 "entire file in encrypted form in GNUnet database)"),
                                   &do_insert),
 
-    GNUNET_GETOPT_OPTION_STRING ('N',
+    GNUNET_GETOPT_option_string ('N',
                                  "next",
                                  "ID",
                                  gettext_noop ("specify ID of an updated version to be "
                                                "published in the future (for namespace insertions only)"),
                                  &next_id),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('p',
+    GNUNET_GETOPT_option_uint ('p',
                                    "priority",
                                    "PRIORITY",
                                    gettext_noop ("specify the priority of the content"),
                                    &bo.content_priority),
 
-    GNUNET_GETOPT_OPTION_STRING ('P',
+    GNUNET_GETOPT_option_string ('P',
                                  "pseudonym",
                                  "NAME",
                                  gettext_noop ("publish the files under the pseudonym "
                                                "NAME (place file into namespace)"),
                                  &pseudonym),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('r',
+    GNUNET_GETOPT_option_uint ('r',
                                    "replication",
                                    "LEVEL",
                                    gettext_noop ("set the desired replication LEVEL"),
                                    &bo.replication_level),
 
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('s',
+    GNUNET_GETOPT_option_flag ('s',
                                   "simulate-only",
                                   gettext_noop ("only simulate the process but do not do "
                                                 "any actual publishing (useful to compute URIs)"),
                                   &do_simulate),
 
-    GNUNET_GETOPT_OPTION_STRING ('t',
+    GNUNET_GETOPT_option_string ('t',
                                  "this",
                                  "ID",
                                  gettext_noop ("set the ID of this version of the publication "
                                                "(for namespace insertions only)"),
                                  &this_id),
 
-    GNUNET_GETOPT_OPTION_STRING ('u',
+    GNUNET_GETOPT_option_string ('u',
                                  "uri",
                                  "URI",
                                  gettext_noop ("URI to be published (can be used instead of passing a "
                                                "file to add keywords to the file with the respective URI)"),
                                  &uri_string), 
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+    GNUNET_GETOPT_option_verbose (&verbose),
 
     GNUNET_GETOPT_OPTION_END
   };

+ 6 - 6
src/fs/gnunet-search.c

@@ -307,34 +307,34 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('a',
+    GNUNET_GETOPT_option_uint ('a',
                                    "anonymity",
                                    "LEVEL",
                                    gettext_noop ("set the desired LEVEL of receiver-anonymity"),
                                    &anonymity),
 
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "no-network",
                                   gettext_noop ("only search the local peer (no P2P network search)"),
                                   &local_only),
                                   
-    GNUNET_GETOPT_OPTION_STRING ('o',
+    GNUNET_GETOPT_option_string ('o',
                                  "output",
                                  "PREFIX",
                                  gettext_noop ("write search results to file starting with PREFIX"),
                                  &output_filename),                              
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t', 
+    GNUNET_GETOPT_option_relative_time ('t', 
                                             "timeout",
                                             "DELAY",
                                             gettext_noop ("automatically terminate search after DELAY"),
                                             &timeout),
 
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+    GNUNET_GETOPT_option_verbose (&verbose),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('N',
+    GNUNET_GETOPT_option_uint ('N',
                                    "results",
                                    "VALUE",
                                    gettext_noop ("automatically terminate search "

+ 1 - 1
src/fs/gnunet-unindex.c

@@ -164,7 +164,7 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+    GNUNET_GETOPT_option_verbose (&verbose),
 
     GNUNET_GETOPT_OPTION_END
   };

+ 1 - 1
src/gns/gnunet-bcd.c

@@ -516,7 +516,7 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('p',
+    GNUNET_GETOPT_option_uint ('p',
                                    "port",
                                    "PORT",
                                    gettext_noop ("Run HTTP serve on port PORT (default is 8888)"),

+ 5 - 5
src/gns/gnunet-dns2gns.c

@@ -778,31 +778,31 @@ main (int argc,
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_STRING ('d',
+    GNUNET_GETOPT_option_string ('d',
                                  "dns",
                                  "IP",
                                  gettext_noop ("IP of recursive DNS resolver to use (required)"),
                                  &dns_ip),
 
-    GNUNET_GETOPT_OPTION_STRING ('f',
+    GNUNET_GETOPT_option_string ('f',
                                  "fcfs",
                                  "NAME",
                                  gettext_noop ("Authoritative FCFS suffix to use (optional); default: fcfs.zkey.eu"),
                                  &fcfs_suffix),
 
-    GNUNET_GETOPT_OPTION_STRING ('s',
+    GNUNET_GETOPT_option_string ('s',
                                  "suffix",
                                  "SUFFIX",
                                  gettext_noop ("Authoritative DNS suffix to use (optional); default: zkey.eu"),
                                  &dns_suffix),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('p',
+    GNUNET_GETOPT_option_uint ('p',
                                    "port",
                                    "UDPPORT",
                                    gettext_noop ("UDP port to listen on for inbound DNS requests; default: 2853"),
                                    &listen_port),
 
-    GNUNET_GETOPT_OPTION_STRING ('z',
+    GNUNET_GETOPT_option_string ('z',
                                  "zone",
                                  "PUBLICKEY",
                                  gettext_noop ("Public key of the GNS zone to use (overrides default)"),

+ 2 - 2
src/gns/gnunet-gns-proxy.c

@@ -3263,13 +3263,13 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_ULONG ('p',
+    GNUNET_GETOPT_option_ulong ('p',
                                     "port",
                                     NULL,
                                     gettext_noop ("listen on specified port (default: 7777)"),
                                     &port),
 
-    GNUNET_GETOPT_OPTION_STRING ('a',
+    GNUNET_GETOPT_option_string ('a',
                                  "authority",
                                  NULL,
                                  gettext_noop ("pem file to use as CA"),

+ 6 - 6
src/gns/gnunet-gns.c

@@ -422,36 +422,36 @@ main (int argc,
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_STRING ('u',
+    GNUNET_GETOPT_option_string ('u',
                                  "lookup",
                                  "NAME",
                                  gettext_noop ("Lookup a record for the given name"),
                                  &lookup_name),
 
-    GNUNET_GETOPT_OPTION_STRING ('t',
+    GNUNET_GETOPT_option_string ('t',
                                  "type",
                                  "TYPE",
                                  gettext_noop ("Specify the type of the record to lookup"),
                                  &lookup_type),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('T',
+    GNUNET_GETOPT_option_relative_time ('T',
                                             "timeout",
                                             "DELAY",
                                             gettext_noop ("Specify timeout for the lookup"),
                                             &timeout),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('r',
+    GNUNET_GETOPT_option_flag ('r',
                                   "raw",
                                   gettext_noop ("No unneeded output"),
                                   &raw),
 
-    GNUNET_GETOPT_OPTION_STRING ('p',
+    GNUNET_GETOPT_option_string ('p',
                                  "public-key",
                                  "PKEY",
                                  gettext_noop ("Specify the public key of the zone to lookup the record in"),
                                  &public_key),
     
-    GNUNET_GETOPT_OPTION_STRING ('z',
+    GNUNET_GETOPT_option_string ('z',
                                  "zone",
                                  "NAME",
                                  gettext_noop ("Specify the name of the ego of the zone to lookup the record in"),

+ 4 - 4
src/hostlist/gnunet-daemon-hostlist.c

@@ -371,21 +371,21 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 #if HAVE_MHD
-    GNUNET_GETOPT_OPTION_SET_ONE ('a',
+    GNUNET_GETOPT_option_flag ('a',
                                   "advertise",
                                   gettext_noop ("advertise our hostlist to other peers"),
                                   &advertising),
 #endif
-    GNUNET_GETOPT_OPTION_SET_ONE ('b',
+    GNUNET_GETOPT_option_flag ('b',
                                   "bootstrap",
                                   gettext_noop ("bootstrap using hostlists (it is highly recommended that you always use this option)"),
                                   &bootstrapping),
-    GNUNET_GETOPT_OPTION_SET_ONE ('e',
+    GNUNET_GETOPT_option_flag ('e',
                                   "enable-learning",
                                   gettext_noop ("enable learning about hostlist servers from other peers"),
                                   &learning),
 #if HAVE_MHD
-    GNUNET_GETOPT_OPTION_SET_ONE ('p',
+    GNUNET_GETOPT_option_flag ('p',
                                   "provide-hostlist",
                                   gettext_noop ("provide a hostlist server"),
                                   &provide_hostlist),

+ 2 - 2
src/identity-provider/gnunet-identity-token.c

@@ -160,13 +160,13 @@ main(int argc, char *const argv[])
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_STRING ('t',
+    GNUNET_GETOPT_option_string ('t',
                                  "token",
                                  NULL,
                                  gettext_noop ("GNUid token"),
                                  &token),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('p',
+    GNUNET_GETOPT_option_flag ('p',
                                   "print",
                                   gettext_noop ("Print token contents"),
                                   &print_token),

+ 6 - 6
src/identity/gnunet-identity.c

@@ -350,35 +350,35 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_STRING ('C',
+    GNUNET_GETOPT_option_string ('C',
                                  "create",
                                  "NAME",
                                  gettext_noop ("create ego NAME"),
                                  &create_ego),
 
-    GNUNET_GETOPT_OPTION_STRING ('D',
+    GNUNET_GETOPT_option_string ('D',
                                  "delete",
                                  "NAME",
                                  gettext_noop ("delete ego NAME "),
                                  &delete_ego),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('d',
+    GNUNET_GETOPT_option_flag ('d',
                                   "display",
                                   gettext_noop ("display all egos"),
                                   &list),
     
-    GNUNET_GETOPT_OPTION_STRING ('e',
+    GNUNET_GETOPT_option_string ('e',
                                  "ego",
                                  "NAME",
                                  gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -s)"),
                                  &set_ego),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('m',
+    GNUNET_GETOPT_option_flag ('m',
                                   "monitor",
                                   gettext_noop ("run in monitor mode egos"),
                                   &monitor),
 
-    GNUNET_GETOPT_OPTION_STRING ('s',
+    GNUNET_GETOPT_option_string ('s',
                                  "set",
                                  "SUBSYSTEM",
                                  gettext_noop ("set default identity to EGO for a subsystem SUBSYSTEM (use together with -e)"),

+ 19 - 19
src/include/gnunet_getopt_lib.h

@@ -161,7 +161,7 @@ struct GNUNET_GETOPT_CommandLineOption
  * @param about string with brief description of the application
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_HELP (const char *about);
+GNUNET_GETOPT_option_help (const char *about);
 
 
 /**
@@ -171,7 +171,7 @@ GNUNET_GETOPT_OPTION_HELP (const char *about);
  * @param version string with the version number
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_VERSION (const char *version);
+GNUNET_GETOPT_option_version (const char *version);
 
 
 
@@ -181,7 +181,7 @@ GNUNET_GETOPT_OPTION_VERSION (const char *version);
  * @param[out] logfn set to the name of the logfile
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGFILE (char **logfn);
+GNUNET_GETOPT_option_logfile (char **logfn);
 
 
 /**
@@ -194,7 +194,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn);
  * @param[out] str set to the string
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_STRING (char shortName,
+GNUNET_GETOPT_option_string (char shortName,
                              const char *name,
                              const char *argumentHelp,
                              const char *description,
@@ -210,7 +210,7 @@ GNUNET_GETOPT_OPTION_STRING (char shortName,
  * @param[out] str set to the string
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_FILENAME (char shortName,
+GNUNET_GETOPT_option_filename (char shortName,
                                const char *name,
                                const char *argumentHelp,
                                const char *description,
@@ -229,7 +229,7 @@ GNUNET_GETOPT_OPTION_FILENAME (char shortName,
  * @param val_size size of @a val in bytes
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName,
+GNUNET_GETOPT_option_base32_fixed_size (char shortName,
                                             const char *name,
                                             const char *argumentHelp,
                                             const char *description,
@@ -249,8 +249,8 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName,
  * @param[out] val binary value decoded from Crockford Base32-encoded argument;
  *             size is determined by type (sizeof (*val)).
  */
-#define GNUNET_GETOPT_OPTION_SET_BASE32_AUTO(shortName,name,argumentHelp,description,val) \
-  GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE(shortName,name,argumentHelp,description,val,sizeof(*val))
+#define GNUNET_GETOPT_option_base32_auto(shortName,name,argumentHelp,description,val) \
+  GNUNET_GETOPT_option_base32_fixed_size(shortName,name,argumentHelp,description,val,sizeof(*val))
 
 
 /**
@@ -263,7 +263,7 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName,
  * @param[out] val set to 1 if the option is present
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ONE (char shortName,
+GNUNET_GETOPT_option_flag (char shortName,
                               const char *name,
                               const char *description,
                               int *val);
@@ -279,7 +279,7 @@ GNUNET_GETOPT_OPTION_SET_ONE (char shortName,
  * @param[out] val set to the value specified at the command line
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_UINT (char shortName,
+GNUNET_GETOPT_option_uint (char shortName,
                                const char *name,
                                const char *argumentHelp,
                                const char *description,
@@ -296,7 +296,7 @@ GNUNET_GETOPT_OPTION_SET_UINT (char shortName,
  * @param[out] val set to the value specified at the command line
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ULONG (char shortName,
+GNUNET_GETOPT_option_ulong (char shortName,
                                 const char *name,
                                 const char *argumentHelp,
                                 const char *description,
@@ -314,7 +314,7 @@ GNUNET_GETOPT_OPTION_SET_ULONG (char shortName,
  * @param[out] val set to the time specified at the command line
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName,
+GNUNET_GETOPT_option_relative_time (char shortName,
                                         const char *name,
                                         const char *argumentHelp,
                                         const char *description,
@@ -332,7 +332,7 @@ GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName,
  * @param[out] val set to the time specified at the command line
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName,
+GNUNET_GETOPT_option_absolute_time (char shortName,
                                         const char *name,
                                         const char *argumentHelp,
                                         const char *description,
@@ -349,7 +349,7 @@ GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName,
  * @param[out] val set to 1 if the option is present
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName,
+GNUNET_GETOPT_option_increment_uint (char shortName,
                                       const char *name,
                                       const char *description,
                                       unsigned int *val);
@@ -362,7 +362,7 @@ GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName,
  * @param[out] level set to the log level
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGLEVEL (char **level);
+GNUNET_GETOPT_option_loglevel (char **level);
 
 
 /**
@@ -372,7 +372,7 @@ GNUNET_GETOPT_OPTION_LOGLEVEL (char **level);
  * @param[out] level set to the verbosity level
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level);
+GNUNET_GETOPT_option_verbose (unsigned int *level);
 
 
 /**
@@ -381,7 +381,7 @@ GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level);
  * @param[out] logfn set to the name of the logfile
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGFILE (char **logfn);
+GNUNET_GETOPT_option_logfile (char **logfn);
 
 
 /**
@@ -390,7 +390,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn);
  * @param[out] fn set to the name of the configuration file
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_CFG_FILE (char **fn);
+GNUNET_GETOPT_option_cfgfile (char **fn);
 
 
 /**
@@ -400,7 +400,7 @@ GNUNET_GETOPT_OPTION_CFG_FILE (char **fn);
  * @return @a opt with the mandatory flag set.
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt);
+GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt);
 
 
 /**

+ 2 - 2
src/namecache/gnunet-namecache.c

@@ -226,13 +226,13 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_STRING ('n',
+    GNUNET_GETOPT_option_string ('n',
                                  "name",
                                  "NAME",
                                  gettext_noop ("name of the record to add/delete/display"),
                                  &name),
 
-    GNUNET_GETOPT_OPTION_STRING ('z',
+    GNUNET_GETOPT_option_string ('z',
                                  "zone",
                                  "PKEY",
                                  gettext_noop ("spezifies the public key of the zone to look in"),

+ 14 - 14
src/namestore/gnunet-namestore.c

@@ -1132,45 +1132,45 @@ main (int argc,
 
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('a',
+    GNUNET_GETOPT_option_flag ('a',
                                   "add",
                                   gettext_noop ("add record"),
                                   &add),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('d',
+    GNUNET_GETOPT_option_flag ('d',
                                   "delete",
                                   gettext_noop ("delete record"),
                                   &del),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('D',
+    GNUNET_GETOPT_option_flag ('D',
                                   "display",
                                   gettext_noop ("display records"),
                                   &list), 
 
-    GNUNET_GETOPT_OPTION_STRING ('e',
+    GNUNET_GETOPT_option_string ('e',
                                  "expiration",
                                  "TIME",
                                  gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"),
                                  &expirationstring),
 
-    GNUNET_GETOPT_OPTION_STRING ('i',
+    GNUNET_GETOPT_option_string ('i',
                                  "nick",
                                  "NICKNAME",
                                  gettext_noop ("set the desired nick name for the zone"),
                                  &nickstring), 
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('m',
+    GNUNET_GETOPT_option_flag ('m',
                                   "monitor",
                                   gettext_noop ("monitor changes in the namestore"),
                                   &monitor),
 
-    GNUNET_GETOPT_OPTION_STRING ('n',
+    GNUNET_GETOPT_option_string ('n',
                                  "name",
                                  "NAME",
                                  gettext_noop ("name of the record to add/delete/display"),
                                  &name),
 
-    GNUNET_GETOPT_OPTION_STRING ('r',
+    GNUNET_GETOPT_option_string ('r',
                                  "reverse",
                                  "PKEY",
                                  gettext_noop ("determine our name for the given PKEY"),
@@ -1178,35 +1178,35 @@ main (int argc,
 
 
 
-    GNUNET_GETOPT_OPTION_STRING ('t',
+    GNUNET_GETOPT_option_string ('t',
                                  "type",
                                  "TYPE",
                                  gettext_noop ("type of the record to add/delete/display"),
                                  &typestring),
 
-    GNUNET_GETOPT_OPTION_STRING ('u',
+    GNUNET_GETOPT_option_string ('u',
                                  "uri",
                                  "URI",
                                  gettext_noop ("URI to import into our zone"),
                                  &uri),
 
-    GNUNET_GETOPT_OPTION_STRING ('V',
+    GNUNET_GETOPT_option_string ('V',
                                  "value",
                                  "VALUE",
                                  gettext_noop ("value of the record to add/delete"),
                                  &value),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('p',
+    GNUNET_GETOPT_option_flag ('p',
                                   "public",
                                   gettext_noop ("create or list public record"),
                                   &is_public),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('s',
+    GNUNET_GETOPT_option_flag ('s',
                                   "shadow",
                                   gettext_noop ("create shadow record (only valid if all other records of the same type have expired"),
                                   &is_shadow),
 
-    GNUNET_GETOPT_OPTION_STRING ('z',
+    GNUNET_GETOPT_option_string ('z',
                                  "zone",
                                  "EGO",
                                  gettext_noop ("name of the ego controlling the zone"),

+ 5 - 5
src/nat-auto/gnunet-nat-auto.c

@@ -340,28 +340,28 @@ main (int argc,
       char *const argv[])
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('a',
+    GNUNET_GETOPT_option_flag ('a',
                                   "auto",
                                   gettext_noop ("run autoconfiguration"),
                                   &do_auto),
 
-    GNUNET_GETOPT_OPTION_STRING ('S',
+    GNUNET_GETOPT_option_string ('S',
                                  "section",
                                  "NAME",
                                  gettext_noop ("section name providing the configuration for the adapter"),
                                  &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),

+ 7 - 7
src/nat/gnunet-nat.c

@@ -419,40 +419,40 @@ main (int argc,
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_STRING ('i',
+    GNUNET_GETOPT_option_string ('i',
                                  "in",
                                  "ADDRESS",
                                  gettext_noop ("which IP and port are we locally using to bind/listen to"),
                                  &local_addr),
 
-    GNUNET_GETOPT_OPTION_STRING ('r',
+    GNUNET_GETOPT_option_string ('r',
                                  "remote",
                                  "ADDRESS",
                                  gettext_noop ("which remote IP and port should be asked for connection reversal"),
                                  &remote_addr),
 
-    GNUNET_GETOPT_OPTION_STRING ('S',
+    GNUNET_GETOPT_option_string ('S',
                                  "section",
                                  NULL,
                                  gettext_noop ("name of configuration section to find additional options, such as manual host punching data"),
                                  &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),

+ 7 - 7
src/nse/gnunet-nse-profiler.c

@@ -836,42 +836,42 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_UINT ('C',
+    GNUNET_GETOPT_option_uint ('C',
                                    "connections",
                                    "COUNT",
                                    gettext_noop ("limit to the number of connections to NSE services, 0 for none"),
                                    &connection_limit),
-    GNUNET_GETOPT_OPTION_STRING ('d',
+    GNUNET_GETOPT_option_string ('d',
                                  "details",
                                  "FILENAME",
                                  gettext_noop ("name of the file for writing connection information and statistics"),
                                  &data_filename),
 
-    GNUNET_GETOPT_OPTION_STRING ('H',
+    GNUNET_GETOPT_option_string ('H',
                                  "hosts",
                                  "FILENAME",
                                  gettext_noop ("name of the file with the login information for the testbed"),
                                  &hosts_file),
 
-    GNUNET_GETOPT_OPTION_STRING ('o',
+    GNUNET_GETOPT_option_string ('o',
                                  "output",
                                  "FILENAME",
                                  gettext_noop ("name of the file for writing the main results"),
                                  &output_filename),
 
 
-    GNUNET_GETOPT_OPTION_STRING ('p',
+    GNUNET_GETOPT_option_string ('p',
                                  "peers",
                                  "NETWORKSIZESPEC",
                                  gettext_noop ("Number of peers to run in each round, separated by commas"),
                                  &num_peer_spec),
 
-    GNUNET_GETOPT_OPTION_INCREMENT_VALUE ('V',
+    GNUNET_GETOPT_option_increment_uint ('V',
                                           "verbose",
                                           gettext_noop ("be verbose (print progress information)"),
                                           &verbose),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('w',
+    GNUNET_GETOPT_option_relative_time ('w',
                                             "wait",
                                             "DELAY",
                                             gettext_noop ("delay between rounds"),

+ 8 - 8
src/peerinfo-tool/gnunet-peerinfo.c

@@ -838,42 +838,42 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "numeric",
                                   gettext_noop ("don't resolve host names"),
                                   &no_resolve),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('q',
+    GNUNET_GETOPT_option_flag ('q',
                                   "quiet",
                                   gettext_noop ("output only the identity strings"),
                                   &be_quiet),
-    GNUNET_GETOPT_OPTION_SET_ONE ('f',
+    GNUNET_GETOPT_option_flag ('f',
                                   "friends",
                                   gettext_noop ("include friend-only information"),
                                   &include_friend_only),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('s',
+    GNUNET_GETOPT_option_flag ('s',
                                   "self",
                                   gettext_noop ("output our own identity only"),
                                   &get_self),
     
-    GNUNET_GETOPT_OPTION_SET_ONE ('i',
+    GNUNET_GETOPT_option_flag ('i',
                                   "info",
                                   gettext_noop ("list all known peers"),
                                   &get_info),
 
-    GNUNET_GETOPT_OPTION_STRING ('d',
+    GNUNET_GETOPT_option_string ('d',
                                  "dump-hello",
                                  NULL,
                                  gettext_noop ("dump hello to file"),
                                  &dump_hello),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('g',
+    GNUNET_GETOPT_option_flag ('g',
                                   "get-hello",
                                   gettext_noop ("also output HELLO uri(s)"),
                                   &get_uri),
 
-    GNUNET_GETOPT_OPTION_STRING ('p',
+    GNUNET_GETOPT_option_string ('p',
                                  "put-hello",
                                  "HELLO",
                                  gettext_noop ("add given HELLO uri to the database"),

+ 5 - 5
src/regex/gnunet-regex-profiler.c

@@ -1479,32 +1479,32 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_FILENAME ('o',
+    GNUNET_GETOPT_option_filename ('o',
                                    "output-file",
                                    "FILENAME",
                                    gettext_noop ("name of the file for writing statistics"),
                                    &data_filename),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+    GNUNET_GETOPT_option_relative_time ('t',
                                             "matching-timeout",
                                             "TIMEOUT",
                                             gettext_noop ("wait TIMEOUT before ending the experiment"),
                                             &search_timeout_time), 
 
-    GNUNET_GETOPT_OPTION_FILENAME ('p',
+    GNUNET_GETOPT_option_filename ('p',
                                    "policy-dir",
                                    "DIRECTORY",
                                    gettext_noop ("directory with policy files"),
                                    &policy_dir),
 
 
-    GNUNET_GETOPT_OPTION_FILENAME ('s',
+    GNUNET_GETOPT_option_filename ('s',
                                    "strings-file",
                                    "FILENAME",
                                    gettext_noop ("name of file with input strings"),
                                    &strings_file),
 
-    GNUNET_GETOPT_OPTION_FILENAME ('H',
+    GNUNET_GETOPT_option_filename ('H',
                                    "hosts-file",
                                    "FILENAME",
                                    gettext_noop ("name of file with hosts' names"),

+ 2 - 2
src/regex/gnunet-regex-simulation-profiler.c

@@ -693,13 +693,13 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_STRING ('t',
+    GNUNET_GETOPT_option_string ('t',
                                  "table",
                                  "TABLENAME",
                                  gettext_noop ("name of the table to write DFAs"),
                                  &table_name),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('p',
+    GNUNET_GETOPT_option_uint ('p',
                                    "max-path-compression",
                                    "MAX_PATH_COMPRESSION",
                                    gettext_noop ("maximum path compression length"),

+ 1 - 1
src/rest/gnunet-rest-server.c

@@ -784,7 +784,7 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ULONG ('p',
+    GNUNET_GETOPT_option_ulong ('p',
                                     "port",
                                     "PORT",
                                     gettext_noop ("listen on specified port (default: 7776)"),

+ 4 - 4
src/revocation/gnunet-revocation.c

@@ -529,24 +529,24 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_STRING ('f',
+    GNUNET_GETOPT_option_string ('f',
                                  "filename",
                                  "NAME",
                                  gettext_noop ("use NAME for the name of the revocation file"),
                                  &filename),
 
-    GNUNET_GETOPT_OPTION_STRING ('R',
+    GNUNET_GETOPT_option_string ('R',
                                  "revoke",
                                  "NAME",
                                  gettext_noop ("revoke the private key associated for the the private key associated with the ego NAME "),
                                  &revoke_ego), 
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('p',
+    GNUNET_GETOPT_option_flag ('p',
                                   "perform",
                                   gettext_noop ("actually perform revocation, otherwise we just do the precomputation"),
                                   &perform),
 
-    GNUNET_GETOPT_OPTION_STRING ('t',
+    GNUNET_GETOPT_option_string ('t',
                                  "test",
                                  "KEY",
                                  gettext_noop ("test if the public key KEY has been revoked"),

+ 1 - 1
src/rps/gnunet-rps.c

@@ -140,7 +140,7 @@ main (int argc, char *const *argv)
   const char helpstr[] =
     "Get random GNUnet peers. If none is specified a single is requested.";
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_BASE32_AUTO ('s',
+    GNUNET_GETOPT_option_base32_auto ('s',
                                           "seed",
                                           "PEER_ID",
                                           gettext_noop ("Seed a PeerID"),

+ 4 - 4
src/scalarproduct/gnunet-scalarproduct.c

@@ -345,25 +345,25 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_STRING ('e',
+    GNUNET_GETOPT_option_string ('e',
                                  "elements",
                                  "\"key1,val1;key2,val2;...,keyn,valn;\"",
                                  gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."),
                                  &input_elements),
 
-    GNUNET_GETOPT_OPTION_STRING ('e',
+    GNUNET_GETOPT_option_string ('e',
                                  "elements",
                                  "\"key1,val1;key2,val2;...,keyn,valn;\"",
                                  gettext_noop ("A comma separated list of elements to compare as vector with our remote peer."),
                                  &input_elements),
 
-    GNUNET_GETOPT_OPTION_STRING ('p',
+    GNUNET_GETOPT_option_string ('p',
                                  "peer",
                                  "PEERID",
                                  gettext_noop ("[Optional] peer to calculate our scalarproduct with. If this parameter is not given, the service will wait for a remote peer to compute the request."),
                                  &input_peer_id),
 
-    GNUNET_GETOPT_OPTION_STRING ('k',
+    GNUNET_GETOPT_option_string ('k',
                                  "key",
                                  "TRANSACTION_ID",
                                  gettext_noop ("Transaction ID shared with peer."),

+ 6 - 6
src/secretsharing/gnunet-secretsharing-profiler.c

@@ -604,37 +604,37 @@ main (int argc, char **argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('n',
+    GNUNET_GETOPT_option_uint ('n',
                                    "num-peers",
                                    NULL,
                                    gettext_noop ("number of peers in consensus"),
                                    &num_peers),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('D',
+    GNUNET_GETOPT_option_relative_time ('D',
                                             "delay",
                                             NULL,
                                             gettext_noop ("dkg start delay"),
                                             &delay),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+    GNUNET_GETOPT_option_relative_time ('t',
                                             "timeout",
                                             NULL,
                                             gettext_noop ("dkg timeout"),
                                             &timeout),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('k',
+    GNUNET_GETOPT_option_uint ('k',
                                    "threshold",
                                    NULL,
                                    gettext_noop ("threshold"),
                                    &threshold),
     
-    GNUNET_GETOPT_OPTION_SET_ONE ('d',
+    GNUNET_GETOPT_option_flag ('d',
                                   "descrypt",
                                   gettext_noop ("also profile decryption"),
                                   &decrypt),
 
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbose),
+    GNUNET_GETOPT_option_verbose (&verbose),
 
     GNUNET_GETOPT_OPTION_END
   };

+ 5 - 5
src/set/gnunet-set-ibf-profiler.c

@@ -246,31 +246,31 @@ main (int argc, char **argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('A',
+    GNUNET_GETOPT_option_uint ('A',
                                    "asize",
                                    NULL,
                                    gettext_noop ("number of element in set A-B"),
                                    &asize),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('B',
+    GNUNET_GETOPT_option_uint ('B',
                                    "bsize",
                                    NULL,
                                    gettext_noop ("number of element in set B-A"),
                                    &bsize),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('C',
+    GNUNET_GETOPT_option_uint ('C',
                                    "csize",
                                    NULL,
                                    gettext_noop ("number of common elements in A and B"),
                                    &csize),
     
-    GNUNET_GETOPT_OPTION_SET_UINT ('k',
+    GNUNET_GETOPT_option_uint ('k',
                                    "hash-num",
                                    NULL,
                                    gettext_noop ("hash num"),
                                    &hash_num),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('s',
+    GNUNET_GETOPT_option_uint ('s',
                                    "ibf-size",
                                    NULL,
                                    gettext_noop ("ibf size"),

+ 9 - 9
src/set/gnunet-set-profiler.c

@@ -427,54 +427,54 @@ int
 main (int argc, char **argv)
 {
    struct GNUNET_GETOPT_CommandLineOption options[] = {
-      GNUNET_GETOPT_OPTION_SET_UINT ('A',
+      GNUNET_GETOPT_option_uint ('A',
                                      "num-first",
                                      NULL,
                                      gettext_noop ("number of values"),
                                      &num_a),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('B',
+      GNUNET_GETOPT_option_uint ('B',
                                      "num-second",
                                      NULL,
                                      gettext_noop ("number of values"),
                                      &num_b),
 
-      GNUNET_GETOPT_OPTION_SET_ONE ('b',
+      GNUNET_GETOPT_option_flag ('b',
                                     "byzantine",
                                     gettext_noop ("use byzantine mode"),
                                     &byzantine),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('f',
+      GNUNET_GETOPT_option_uint ('f',
                                      "force-full",
                                      NULL,
                                      gettext_noop ("force sending full set"),
                                      &force_full),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('d',
+      GNUNET_GETOPT_option_uint ('d',
                                      "force-delta",
                                      NULL,
                                      gettext_noop ("number delta operation"),
                                      &force_delta),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('C',
+      GNUNET_GETOPT_option_uint ('C',
                                      "num-common",
                                      NULL,
                                      gettext_noop ("number of values"),
                                      &num_c),
 
-      GNUNET_GETOPT_OPTION_STRING ('x',
+      GNUNET_GETOPT_option_string ('x',
                                    "operation",
                                    NULL,
                                    gettext_noop ("operation to execute"),
                                    &op_str),
 
-      GNUNET_GETOPT_OPTION_SET_UINT ('w',
+      GNUNET_GETOPT_option_uint ('w',
                                      "element-size",
                                      NULL,
                                      gettext_noop ("element size"),
                                      &element_size),
 
-      GNUNET_GETOPT_OPTION_FILENAME ('s',
+      GNUNET_GETOPT_option_filename ('s',
                                      "statistics",
                                      "FILENAME",
                                      gettext_noop ("write statistics to file"),

+ 29 - 29
src/social/gnunet-social.c

@@ -1212,78 +1212,78 @@ main (int argc, char *const *argv)
 
     /* operations */
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('A',
+    GNUNET_GETOPT_option_flag ('A',
                                   "host-assign",
                                   gettext_noop ("assign --name in state to --data"),
                                   &op_host_assign),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('B',
+    GNUNET_GETOPT_option_flag ('B',
                                   "guest-leave",
                                   gettext_noop ("say good-bye and leave somebody else's place"),
                                   &op_guest_leave),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('C',
+    GNUNET_GETOPT_option_flag ('C',
                                   "host-enter",
                                   gettext_noop ("create a place"),
                                   &op_host_enter),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('C',
+    GNUNET_GETOPT_option_flag ('C',
                                   "host-enter",
                                   gettext_noop ("create a place"),
                                   &op_host_enter),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('D',
+    GNUNET_GETOPT_option_flag ('D',
                                   "host-leave",
                                   gettext_noop ("destroy a place we were hosting"),
                                   &op_host_leave),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('E',
+    GNUNET_GETOPT_option_flag ('E',
                                   "guest-enter",
                                   gettext_noop ("enter somebody else's place"),
                                   &op_guest_enter),
 
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('F',
+    GNUNET_GETOPT_option_flag ('F',
                                   "look-for",
                                   gettext_noop ("find state matching name prefix"),
                                   &op_look_for),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('H',
+    GNUNET_GETOPT_option_flag ('H',
                                   "replay-latest",
                                   gettext_noop ("replay history of messages up to the given --limit"),
                                   &op_replay_latest),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('N',
+    GNUNET_GETOPT_option_flag ('N',
                                   "host-reconnect",
                                   gettext_noop ("reconnect to a previously created place"),
                                   &op_host_reconnect),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('P',
+    GNUNET_GETOPT_option_flag ('P',
                                   "host-announce",
                                   gettext_noop ("publish something to a place we are hosting"),
                                   &op_host_announce),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('R',
+    GNUNET_GETOPT_option_flag ('R',
                                   "guest-reconnect",
                                   gettext_noop ("reconnect to a previously entered place"),
                                   &op_guest_reconnect),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('S',
+    GNUNET_GETOPT_option_flag ('S',
                                   "look-at",
                                   gettext_noop ("search for state matching exact name"),
                                   &op_look_at),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('T',
+    GNUNET_GETOPT_option_flag ('T',
                                   "guest-talk",
                                   gettext_noop ("submit something to somebody's place"),
                                   &op_guest_talk),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('U',
+    GNUNET_GETOPT_option_flag ('U',
                                   "status",
                                   gettext_noop ("list of egos and subscribed places"),
                                   &op_status),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('X',
+    GNUNET_GETOPT_option_flag ('X',
                                   "replay",
                                   gettext_noop ("extract and replay history between message IDs --start and --until"),
                                   &op_replay),
@@ -1291,83 +1291,83 @@ main (int argc, char *const *argv)
 
     /* options */
 
-    GNUNET_GETOPT_OPTION_STRING ('a',
+    GNUNET_GETOPT_option_string ('a',
                                  "app",
                                  "APPLICATION_ID",
                                  gettext_noop ("application ID to use when connecting"),
                                  &opt_app),
 
-    GNUNET_GETOPT_OPTION_STRING ('d',
+    GNUNET_GETOPT_option_string ('d',
                                  "data",
                                  "DATA",
                                  gettext_noop ("message body or state value"),
                                  &opt_data),
 
-    GNUNET_GETOPT_OPTION_STRING ('e',
+    GNUNET_GETOPT_option_string ('e',
                                  "ego",
                                  "NAME|PUBKEY",
                                  gettext_noop ("name or public key of ego"),
                                  &opt_ego),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('f',
+    GNUNET_GETOPT_option_flag ('f',
                                   "follow",
                                   gettext_noop ("wait for incoming messages"),
                                   &opt_follow),
 
-    GNUNET_GETOPT_OPTION_STRING ('g',
+    GNUNET_GETOPT_option_string ('g',
                                  "gns",
                                  "GNS_NAME",
                                  gettext_noop ("GNS name"),
                                  &opt_gns),
 
-    GNUNET_GETOPT_OPTION_STRING ('i',
+    GNUNET_GETOPT_option_string ('i',
                                  "peer",
                                  "PEER_ID",
                                  gettext_noop ("peer ID for --guest-enter"),
                                  &opt_peer),
 
-    GNUNET_GETOPT_OPTION_STRING ('k',
+    GNUNET_GETOPT_option_string ('k',
                                  "name",
                                  "VAR_NAME",
                                  gettext_noop ("name (key) to query from state"),
                                  &opt_name),
 
-    GNUNET_GETOPT_OPTION_STRING ('m',
+    GNUNET_GETOPT_option_string ('m',
                                  "method",
                                  "METHOD_NAME",
                                  gettext_noop ("method name"),
                                  &opt_method),
 
-    GNUNET_GETOPT_OPTION_SET_ULONG ('n',
+    GNUNET_GETOPT_option_ulong ('n',
                                     "limit",
                                     NULL,
                                     gettext_noop ("number of messages to replay from history"),
                                     &opt_limit),
 
-    GNUNET_GETOPT_OPTION_STRING ('p',
+    GNUNET_GETOPT_option_string ('p',
                                  "place",
                                  "PUBKEY",
                                  gettext_noop ("key address of place"),
                                  &opt_place),
 
-    GNUNET_GETOPT_OPTION_SET_ULONG ('s',
+    GNUNET_GETOPT_option_ulong ('s',
                                     "start",
                                     NULL,
                                     gettext_noop ("start message ID for history replay"),
                                     &opt_start),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('w',
+    GNUNET_GETOPT_option_flag ('w',
                                   "welcome",
                                   gettext_noop ("respond to entry requests by admitting all guests"),
                                   &opt_welcome),
 
-    GNUNET_GETOPT_OPTION_SET_ULONG ('u',
+    GNUNET_GETOPT_option_ulong ('u',
                                     "until",
                                     NULL,
                                     gettext_noop ("end message ID for history replay"),
                                     &opt_until),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('y',
+    GNUNET_GETOPT_option_flag ('y',
                                   "deny",
                                   gettext_noop ("respond to entry requests by refusing all guests"),
                                   &opt_deny),

+ 7 - 7
src/statistics/gnunet-statistics.c

@@ -379,39 +379,39 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_STRING ('n',
+    GNUNET_GETOPT_option_string ('n',
                                  "name",
                                  "NAME",
                                  gettext_noop ("limit output to statistics for the given NAME"),
                                  &name),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('p',
+    GNUNET_GETOPT_option_flag ('p',
                                   "persistent",
                                   gettext_noop ("make the value being set persistent"),
                                   &persistent),
 
-    GNUNET_GETOPT_OPTION_STRING ('s',
+    GNUNET_GETOPT_option_string ('s',
                                  "subsystem",
                                  "SUBSYSTEM",
                                  gettext_noop ("limit output to the given SUBSYSTEM"),
                                  &subsystem),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('q',
+    GNUNET_GETOPT_option_flag ('q',
                                   "quiet",
                                   gettext_noop ("just print the statistics value"),
                                   &quiet),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('w',
+    GNUNET_GETOPT_option_flag ('w',
                                   "watch",
                                   gettext_noop ("watch value continuously"),
                                   &watch),
 
-    GNUNET_GETOPT_OPTION_STRING ('r',
+    GNUNET_GETOPT_option_string ('r',
                                  "remote",
                                  "REMOTE",
                                  gettext_noop ("connect to remote host"),
                                  &remote_host),
-    GNUNET_GETOPT_OPTION_SET_ULONG ('o',
+    GNUNET_GETOPT_option_ulong ('o',
                                     "port",
                                     "PORT",
                                     gettext_noop ("port for remote host"),

+ 1 - 1
src/testbed/generate-underlay-topology.c

@@ -336,7 +336,7 @@ main (int argc, char *const argv[])
 {
   struct GNUNET_GETOPT_CommandLineOption option[] = {
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('p',
+    GNUNET_GETOPT_option_uint ('p',
                                    "num-peers",
                                    "COUNT",
                                    gettext_noop ("create COUNT number of peers"),

+ 4 - 4
src/testbed/gnunet-testbed-profiler.c

@@ -278,19 +278,19 @@ main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('p',
+    GNUNET_GETOPT_option_uint ('p',
                                    "num-peers",
                                    "COUNT",
                                    gettext_noop ("create COUNT number of peers"),
                                    &num_peers),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('e',
+    GNUNET_GETOPT_option_uint ('e',
                                    "num-errors",
                                    "COUNT",
                                    gettext_noop ("tolerate COUNT number of continious timeout failures"),
                                    &num_cont_fails),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "non-interactive",
                                   gettext_noop ("run profiler in non-interactive mode where upon "
                                                 "testbed setup the profiler does not wait for a "
@@ -299,7 +299,7 @@ main (int argc, char *const *argv)
                                   &noninteractive),
 
 #if !ENABLE_SUPERMUC
-    GNUNET_GETOPT_OPTION_STRING ('H',
+    GNUNET_GETOPT_option_string ('H',
                                  "hosts",
                                  "FILENAME",
                                  gettext_noop ("name of the file with the login information for the testbed"),

+ 5 - 5
src/testing/gnunet-testing.c

@@ -349,30 +349,30 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('C',
+    GNUNET_GETOPT_option_flag ('C',
                                   "cfg",
                                   gettext_noop ("create unique configuration files"),
                                   &create_cfg),
-    GNUNET_GETOPT_OPTION_STRING ('k',
+    GNUNET_GETOPT_option_string ('k',
                                  "key",
                                  "FILENAME",
                                  gettext_noop ("extract hostkey file from pre-computed hostkey list"),
                                  &create_hostkey),
 
-    GNUNET_GETOPT_OPTION_SET_UINT ('n',
+    GNUNET_GETOPT_option_uint ('n',
                                    "number",
                                    "NUMBER",
                                    gettext_noop ("number of unique configuration files to create, or number of the hostkey to extract"),
                                    &create_no),
 
 
-    GNUNET_GETOPT_OPTION_STRING ('t',
+    GNUNET_GETOPT_option_string ('t',
                                  "template",
                                  "FILENAME",
                                  gettext_noop ("configuration template"),
                                  &create_cfg_template),
 
-    GNUNET_GETOPT_OPTION_STRING ('r',
+    GNUNET_GETOPT_option_string ('r',
                                  "run",
                                  "SERVICE",
                                  gettext_noop ("run the given service, wait on stdin for 'r' (restart) or 'q' (quit)"),

+ 1 - 1
src/testing/list-keys.c

@@ -83,7 +83,7 @@ run (void *cls, char *const *args, const char *cfgfile,
 int main (int argc, char *argv[])
 {
   struct GNUNET_GETOPT_CommandLineOption option[] = {
-    GNUNET_GETOPT_OPTION_SET_UINT ('n',
+    GNUNET_GETOPT_option_uint ('n',
                                    "num-keys",
                                    "COUNT",
                                    gettext_noop ("list COUNT number of keys"),

+ 7 - 7
src/transport/gnunet-transport-profiler.c

@@ -612,35 +612,35 @@ main (int argc, char * const *argv)
 
   struct GNUNET_GETOPT_CommandLineOption options[] = {
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('s',
+    GNUNET_GETOPT_option_flag ('s',
                                   "send",
                                   gettext_noop ("send data to peer"),
                                   &benchmark_send),
-    GNUNET_GETOPT_OPTION_SET_ONE ('r',
+    GNUNET_GETOPT_option_flag ('r',
                                   "receive",
                                   gettext_noop ("receive data from peer"),
                                   &benchmark_receive),
-    GNUNET_GETOPT_OPTION_SET_UINT ('i',
+    GNUNET_GETOPT_option_uint ('i',
                                    "iterations",
                                    NULL,
                                    gettext_noop ("iterations"),
                                    &benchmark_iterations),
-    GNUNET_GETOPT_OPTION_SET_UINT ('n',
+    GNUNET_GETOPT_option_uint ('n',
                                    "number",
                                    NULL,
                                    gettext_noop ("number of messages to send"),
                                    &benchmark_count),
-    GNUNET_GETOPT_OPTION_SET_UINT ('m',
+    GNUNET_GETOPT_option_uint ('m',
                                    "messagesize",
                                    NULL,
                                    gettext_noop ("message size to use"),
                                    &benchmark_size),
-    GNUNET_GETOPT_OPTION_STRING ('p',
+    GNUNET_GETOPT_option_string ('p',
                                  "peer",
                                  "PEER",
                                  gettext_noop ("peer identity"),
                                  &cpid),
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+    GNUNET_GETOPT_option_verbose (&verbosity),
     GNUNET_GETOPT_OPTION_END
   };
 

+ 11 - 11
src/transport/gnunet-transport.c

@@ -1428,49 +1428,49 @@ main (int argc,
 {
   int res;
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('a',
+    GNUNET_GETOPT_option_flag ('a',
                                   "all",
                                   gettext_noop ("print information for all peers (instead of only connected peers)"),
                                   &iterate_all),
-    GNUNET_GETOPT_OPTION_SET_ONE ('b',
+    GNUNET_GETOPT_option_flag ('b',
                                   "benchmark",
                                   gettext_noop ("measure how fast we are receiving data from all peers (until CTRL-C)"),
                                   &benchmark_receive),
-    GNUNET_GETOPT_OPTION_SET_ONE ('D',
+    GNUNET_GETOPT_option_flag ('D',
                                   "disconnect",
                                   gettext_noop ("disconnect from a peer"),
                                   &do_disconnect),
-    GNUNET_GETOPT_OPTION_SET_ONE ('i',
+    GNUNET_GETOPT_option_flag ('i',
                                   "information",
                                   gettext_noop ("provide information about all current connections (once)"),
                                   &iterate_connections),
-    GNUNET_GETOPT_OPTION_SET_ONE ('m',
+    GNUNET_GETOPT_option_flag ('m',
                                   "monitor",
                                   gettext_noop ("provide information about all current connections (continuously)"),
                                   &monitor_connections),
-    GNUNET_GETOPT_OPTION_SET_ONE ('e',
+    GNUNET_GETOPT_option_flag ('e',
                                   "events",
                                   gettext_noop ("provide information about all connects and disconnect events (continuously)"),
                                   &monitor_connects),
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "numeric",
                                   gettext_noop ("do not resolve hostnames"),
                                   &numeric),
-    GNUNET_GETOPT_OPTION_SET_BASE32_AUTO ('p',
+    GNUNET_GETOPT_option_base32_auto ('p',
                                           "peer",
                                           "PEER",
                                           gettext_noop ("peer identity"),
                                           &pid),
-    GNUNET_GETOPT_OPTION_SET_ONE ('P',
+    GNUNET_GETOPT_option_flag ('P',
                                   "plugins",
                                   gettext_noop ("monitor plugin sessions"),
                                   &monitor_plugins),
-    GNUNET_GETOPT_OPTION_SET_ONE ('s',
+    GNUNET_GETOPT_option_flag ('s',
                                   "send",
                                   gettext_noop
       ("send data for benchmarking to the other peer (until CTRL-C)"),
                                   &benchmark_send),
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+    GNUNET_GETOPT_option_verbose (&verbosity),
     GNUNET_GETOPT_OPTION_END
   };
 

+ 6 - 6
src/transport/tcp_service_legacy.c

@@ -1392,15 +1392,15 @@ LEGACY_SERVICE_run (int argc, char *const *argv,
   const char *xdg;
 
   struct GNUNET_GETOPT_CommandLineOption service_options[] = {
-    GNUNET_GETOPT_OPTION_CFG_FILE (&opt_cfg_fn),
-    GNUNET_GETOPT_OPTION_SET_ONE ('d',
+    GNUNET_GETOPT_option_cfgfile (&opt_cfg_fn),
+    GNUNET_GETOPT_option_flag ('d',
                                   "daemonize",
                                   gettext_noop ("do daemonize (detach from terminal)"),
                                   &do_daemonize),
-    GNUNET_GETOPT_OPTION_HELP (NULL),
-    GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev),
-    GNUNET_GETOPT_OPTION_LOGFILE (&logfile),
-    GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION),
+    GNUNET_GETOPT_option_help (NULL),
+    GNUNET_GETOPT_option_loglevel (&loglev),
+    GNUNET_GETOPT_option_logfile (&logfile),
+    GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION),
     GNUNET_GETOPT_OPTION_END
   };
   err = 1;

+ 17 - 17
src/util/getopt_helpers.c

@@ -60,7 +60,7 @@ print_version (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
  * @param version string with the version number
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_VERSION (const char *version)
+GNUNET_GETOPT_option_version (const char *version)
 {
   struct GNUNET_GETOPT_CommandLineOption clo = {
     .shortName =  'v',
@@ -191,7 +191,7 @@ OUTER:
  * @param about string with brief description of the application
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_HELP (const char *about)
+GNUNET_GETOPT_option_help (const char *about)
 {
   struct GNUNET_GETOPT_CommandLineOption clo = {
     .shortName = 'h',
@@ -242,7 +242,7 @@ increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
  * @param[out] val increment by 1 each time the option is present
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName,
+GNUNET_GETOPT_option_increment_uint (char shortName,
                                       const char *name,
                                       const char *description,
                                       unsigned int *val)
@@ -266,7 +266,7 @@ GNUNET_GETOPT_OPTION_INCREMENT_VALUE (char shortName,
  * @param[out] level set to the verbosity level
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_VERBOSE (unsigned int *level)
+GNUNET_GETOPT_option_verbose (unsigned int *level)
 {
   struct GNUNET_GETOPT_CommandLineOption clo = {
     .shortName = 'V',
@@ -318,7 +318,7 @@ set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
  * @param[out] val set to 1 if the option is present
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ONE (char shortName,
+GNUNET_GETOPT_option_flag (char shortName,
                               const char *name,
                               const char *description,
                               int *val)
@@ -374,7 +374,7 @@ set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
  * @param[out] str set to the string
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_STRING (char shortName,
+GNUNET_GETOPT_option_string (char shortName,
                              const char *name,
                              const char *argumentHelp,
                              const char *description,
@@ -401,7 +401,7 @@ GNUNET_GETOPT_OPTION_STRING (char shortName,
  * @param[out] level set to the log level
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGLEVEL (char **level)
+GNUNET_GETOPT_option_loglevel (char **level)
 {
   struct GNUNET_GETOPT_CommandLineOption clo = {
     .shortName = 'L',
@@ -453,7 +453,7 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
  * @param[out] str set to the string
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_FILENAME (char shortName,
+GNUNET_GETOPT_option_filename (char shortName,
                              const char *name,
                              const char *argumentHelp,
                              const char *description,
@@ -479,7 +479,7 @@ GNUNET_GETOPT_OPTION_FILENAME (char shortName,
  * @param[out] logfn set to the name of the logfile
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_LOGFILE (char **logfn)
+GNUNET_GETOPT_option_logfile (char **logfn)
 {
   struct GNUNET_GETOPT_CommandLineOption clo = {
     .shortName =  'l',
@@ -501,7 +501,7 @@ GNUNET_GETOPT_OPTION_LOGFILE (char **logfn)
  * @param[out] fn set to the name of the configuration file
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_CFG_FILE (char **fn)
+GNUNET_GETOPT_option_cfgfile (char **fn)
 {
   struct GNUNET_GETOPT_CommandLineOption clo = {
     .shortName =  'c',
@@ -561,7 +561,7 @@ set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
  * @param[out] val set to the value specified at the command line
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ULONG (char shortName,
+GNUNET_GETOPT_option_ulong (char shortName,
                                 const char *name,
                                 const char *argumentHelp,
                                 const char *description,
@@ -626,7 +626,7 @@ set_relative_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
  * @param[out] val set to the time specified at the command line
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME (char shortName,
+GNUNET_GETOPT_option_relative_time (char shortName,
                                         const char *name,
                                         const char *argumentHelp,
                                         const char *description,
@@ -691,7 +691,7 @@ set_absolute_time (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
  * @param[out] val set to the time specified at the command line
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_ABSOLUTE_TIME (char shortName,
+GNUNET_GETOPT_option_absolute_time (char shortName,
                                         const char *name,
                                         const char *argumentHelp,
                                         const char *description,
@@ -755,7 +755,7 @@ set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
  * @param[out] val set to the value specified at the command line
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_UINT (char shortName,
+GNUNET_GETOPT_option_uint (char shortName,
                                const char *name,
                                const char *argumentHelp,
                                const char *description,
@@ -830,7 +830,7 @@ set_base32 (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
 
 /**
  * Helper function to clean up after
- * #GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE.
+ * #GNUNET_GETOPT_option_base32_fixed_size.
  *
  * @param cls value to GNUNET_free()
  */
@@ -853,7 +853,7 @@ free_bc (void *cls)
  * @param val_size size of @a val in bytes
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName,
+GNUNET_GETOPT_option_base32_fixed_size (char shortName,
                                             const char *name,
                                             const char *argumentHelp,
                                             const char *description,
@@ -885,7 +885,7 @@ GNUNET_GETOPT_OPTION_SET_BASE32_FIXED_SIZE (char shortName,
  * @return @a opt with the mandatory flag set.
  */
 struct GNUNET_GETOPT_CommandLineOption
-GNUNET_GETOPT_OPTION_MANDATORY (struct GNUNET_GETOPT_CommandLineOption opt)
+GNUNET_GETOPT_option_mandatory (struct GNUNET_GETOPT_CommandLineOption opt)
 {
   opt.option_mandatory = 1;
   return opt;

+ 6 - 6
src/util/gnunet-config.c

@@ -224,30 +224,30 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('f',
+    GNUNET_GETOPT_option_flag ('f',
                                   "filename",
                                   gettext_noop ("obtain option of value as a filename (with $-expansion)"),
                                   &is_filename),
-    GNUNET_GETOPT_OPTION_STRING ('s',
+    GNUNET_GETOPT_option_string ('s',
                                      "section",
                                      "SECTION",
                                      gettext_noop ("name of the section to access"),
                                      &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),

+ 5 - 5
src/util/gnunet-ecc.c

@@ -411,25 +411,25 @@ main (int argc,
 {
   list_keys_count = UINT32_MAX;
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('i',
+    GNUNET_GETOPT_option_flag ('i',
                                   "iterate",
                                   gettext_noop ("list keys included in a file (for testing)"),
                                   &list_keys),
-    GNUNET_GETOPT_OPTION_SET_UINT ('e',
+    GNUNET_GETOPT_option_uint ('e',
                                    "end=",
                                    "COUNT",
                                    gettext_noop ("number of keys to list included in a file (for testing)"),
                                    &list_keys_count),
-    GNUNET_GETOPT_OPTION_SET_UINT ('g',
+    GNUNET_GETOPT_option_uint ('g',
                                    "generate-keys",
                                    "COUNT",
                                    gettext_noop ("create COUNT public-private key pairs (for testing)"),
                                    &make_keys),
-    GNUNET_GETOPT_OPTION_SET_ONE ('p',
+    GNUNET_GETOPT_option_flag ('p',
                                   "print-public-key",
                                   gettext_noop ("print the public key in ASCII format"),
                                   &print_public_key),
-    GNUNET_GETOPT_OPTION_SET_ONE ('E',
+    GNUNET_GETOPT_option_flag ('E',
                                   "examples",
                                   gettext_noop ("print examples of ECC operations (used for compatibility testing)"),
                                   &print_examples_flag),

+ 1 - 1
src/util/gnunet-resolver.c

@@ -145,7 +145,7 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('r',
+    GNUNET_GETOPT_option_flag ('r',
                                   "reverse",
                                   gettext_noop ("perform a reverse lookup"),
                                   &reverse),

+ 4 - 4
src/util/gnunet-scrypt.c

@@ -311,22 +311,22 @@ main (int argc,
       char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ULONG ('b',
+    GNUNET_GETOPT_option_ulong ('b',
                                     "bits",
                                     "BITS",
                                     gettext_noop ("number of bits to require for the proof of work"),
                                     &nse_work_required),
-    GNUNET_GETOPT_OPTION_FILENAME ('k',
+    GNUNET_GETOPT_option_filename ('k',
                                    "keyfile",
                                    "FILE",
                                    gettext_noop ("file with private key, otherwise default is used"),
                                    &pkfn),
-    GNUNET_GETOPT_OPTION_FILENAME ('o',
+    GNUNET_GETOPT_option_filename ('o',
                                    "outfile",
                                    "FILE",
                                    gettext_noop ("file with proof of work, otherwise default is used"),
                                    &pwfn),
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+    GNUNET_GETOPT_option_relative_time ('t',
                                             "timeout",
                                             "TIME",
                                             gettext_noop ("time to wait between calculations"),

+ 5 - 5
src/util/program.c

@@ -148,11 +148,11 @@ GNUNET_PROGRAM_run2 (int argc, char *const *argv, const char *binaryName,
   struct GNUNET_CONFIGURATION_Handle *cfg;
 
   struct GNUNET_GETOPT_CommandLineOption defoptions[] = {
-    GNUNET_GETOPT_OPTION_CFG_FILE (&cc.cfgfile),
-    GNUNET_GETOPT_OPTION_HELP (binaryHelp),
-    GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev),
-    GNUNET_GETOPT_OPTION_LOGFILE (&logfile),
-    GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION)
+    GNUNET_GETOPT_option_cfgfile (&cc.cfgfile),
+    GNUNET_GETOPT_option_help (binaryHelp),
+    GNUNET_GETOPT_option_loglevel (&loglev),
+    GNUNET_GETOPT_option_logfile (&logfile),
+    GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION)
   };
   struct GNUNET_GETOPT_CommandLineOption *allopts;
   const char *gargs;

+ 6 - 6
src/util/service.c

@@ -1722,15 +1722,15 @@ GNUNET_SERVICE_run_ (int argc,
   int err;
 
   struct GNUNET_GETOPT_CommandLineOption service_options[] = {
-    GNUNET_GETOPT_OPTION_CFG_FILE (&opt_cfg_filename),
-    GNUNET_GETOPT_OPTION_SET_ONE ('d',
+    GNUNET_GETOPT_option_cfgfile (&opt_cfg_filename),
+    GNUNET_GETOPT_option_flag ('d',
                                   "daemonize",
                                   gettext_noop ("do daemonize (detach from terminal)"),
                                   &do_daemonize),
-    GNUNET_GETOPT_OPTION_HELP (NULL),
-    GNUNET_GETOPT_OPTION_LOGLEVEL (&loglev),
-    GNUNET_GETOPT_OPTION_LOGFILE (&logfile),
-    GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION),
+    GNUNET_GETOPT_option_help (NULL),
+    GNUNET_GETOPT_option_loglevel (&loglev),
+    GNUNET_GETOPT_option_logfile (&logfile),
+    GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION),
     GNUNET_GETOPT_OPTION_END
   };
 

+ 8 - 8
src/util/test_getopt.c

@@ -56,7 +56,7 @@ testVerbose ()
   unsigned int vflags = 0;
 
   const struct GNUNET_GETOPT_CommandLineOption verboseoptionlist[] = {
-    GNUNET_GETOPT_OPTION_VERBOSE (&vflags),
+    GNUNET_GETOPT_option_verbose (&vflags),
     GNUNET_GETOPT_OPTION_END
   };
 
@@ -83,7 +83,7 @@ testVersion ()
     NULL
   };
   const struct GNUNET_GETOPT_CommandLineOption versionoptionlist[] = {
-    GNUNET_GETOPT_OPTION_VERSION (PACKAGE_VERSION " " VCS_VERSION),
+    GNUNET_GETOPT_option_version (PACKAGE_VERSION " " VCS_VERSION),
     GNUNET_GETOPT_OPTION_END
   };
 
@@ -105,7 +105,7 @@ testAbout ()
     NULL
   };
   const struct GNUNET_GETOPT_CommandLineOption aboutoptionlist[] = {
-    GNUNET_GETOPT_OPTION_HELP ("Testing"),
+    GNUNET_GETOPT_option_help ("Testing"),
     GNUNET_GETOPT_OPTION_END
   };
 
@@ -131,8 +131,8 @@ testLogOpts ()
   char *fn = NULL;
 
   const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = {
-    GNUNET_GETOPT_OPTION_LOGFILE (&fn),
-    GNUNET_GETOPT_OPTION_LOGLEVEL (&level),
+    GNUNET_GETOPT_option_logfile (&fn),
+    GNUNET_GETOPT_option_loglevel (&level),
     GNUNET_GETOPT_OPTION_END
   };
 
@@ -173,16 +173,16 @@ testFlagNum ()
   unsigned long long lnum = 0;
 
   const struct GNUNET_GETOPT_CommandLineOption logoptionlist[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('f',
+    GNUNET_GETOPT_option_flag ('f',
                                   "--flag",
                                   "helptext",
                                   &flag),
-    GNUNET_GETOPT_OPTION_SET_UINT ('n',
+    GNUNET_GETOPT_option_uint ('n',
                                    "--num",
                                    "ARG",
                                    "helptext",
                                    &num),
-    GNUNET_GETOPT_OPTION_SET_ULONG ('N',
+    GNUNET_GETOPT_option_ulong ('N',
                                     "--lnum",
                                     "ARG",
                                     "helptext",

+ 7 - 7
src/util/test_program.c

@@ -64,40 +64,40 @@ main (int argc, char *argv[])
     NULL
   };
   struct GNUNET_GETOPT_CommandLineOption options1[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "name",
                                   "description",
                                   &setme1),
     GNUNET_GETOPT_OPTION_END
   };
   struct GNUNET_GETOPT_CommandLineOption options2[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "name",
                                   "description",
                                   &setme1),
-    GNUNET_GETOPT_OPTION_SET_ONE ('N',
+    GNUNET_GETOPT_option_flag ('N',
                                   "number",
                                   "description",
                                   &setme2),
     GNUNET_GETOPT_OPTION_END
   };
   struct GNUNET_GETOPT_CommandLineOption options3[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('N',
+    GNUNET_GETOPT_option_flag ('N',
                                   "number",
                                   "description",
                                   &setme1),
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "name",
                                   "description",
                                   &setme2),
     GNUNET_GETOPT_OPTION_END
   };
   struct GNUNET_GETOPT_CommandLineOption options4[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "name",
                                   "description",
                                   &setme1),
-    GNUNET_GETOPT_OPTION_SET_ONE ('n',
+    GNUNET_GETOPT_option_flag ('n',
                                   "name",
                                   "description",
                                   &setme2),

+ 9 - 9
src/vpn/gnunet-vpn.c

@@ -287,51 +287,51 @@ int
 main (int argc, char *const *argv)
 {
   struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_SET_ONE ('4',
+    GNUNET_GETOPT_option_flag ('4',
                                   "ipv4",
                                   gettext_noop ("request that result should be an IPv4 address"),
                                   &ipv4),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('6',
+    GNUNET_GETOPT_option_flag ('6',
                                   "ipv6",
                                   gettext_noop ("request that result should be an IPv6 address"),
                                   &ipv6),
 
-    GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d',
+    GNUNET_GETOPT_option_relative_time ('d',
                                             "duration",
                                             "TIME",
                                             gettext_noop ("how long should the mapping be valid for new tunnels?"),
                                             &duration),
 
-    GNUNET_GETOPT_OPTION_STRING ('i',
+    GNUNET_GETOPT_option_string ('i',
                                  "ip",
                                  "IP",
                                  gettext_noop ("destination IP for the tunnel"),
                                  &target_ip),
 
-    GNUNET_GETOPT_OPTION_STRING ('p',
+    GNUNET_GETOPT_option_string ('p',
                                  "peer",
                                  "PEERID",
                                  gettext_noop ("peer offering the service we would like to access"),
                                  &peer_id),
 
-    GNUNET_GETOPT_OPTION_STRING ('s', 
+    GNUNET_GETOPT_option_string ('s', 
                                  "service",
                                  "NAME",
                                  gettext_noop ("name of the service we would like to access"),
                                  &service_name),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('t',
+    GNUNET_GETOPT_option_flag ('t',
                                   "tcp",
                                   gettext_noop ("service is offered via TCP"),
                                   &tcp),
 
-    GNUNET_GETOPT_OPTION_SET_ONE ('u',
+    GNUNET_GETOPT_option_flag ('u',
                                   "udp",
                                   gettext_noop ("service is offered via UDP"),
                                   &udp),
 
-    GNUNET_GETOPT_OPTION_VERBOSE (&verbosity),
+    GNUNET_GETOPT_option_verbose (&verbosity),
 
     GNUNET_GETOPT_OPTION_END
   };