[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 21/28: porting
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 21/28: porting |
Date: |
Fri, 17 Mar 2017 12:09:53 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 04a46ba5acf180be6f3a7d85cd6f6ce0ff13b1ba
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Mar 16 11:45:15 2017 +0100
porting
---
src/consensus/gnunet-consensus-profiler.c | 74 ++++++++++++++++++++-----------
src/scalarproduct/gnunet-scalarproduct.c | 7 +++
src/set/gnunet-set-ibf-profiler.c | 49 +++++++++++++-------
3 files changed, 89 insertions(+), 41 deletions(-)
diff --git a/src/consensus/gnunet-consensus-profiler.c
b/src/consensus/gnunet-consensus-profiler.c
index 65542f4cd..8cc1b3512 100644
--- a/src/consensus/gnunet-consensus-profiler.c
+++ b/src/consensus/gnunet-consensus-profiler.c
@@ -515,31 +515,55 @@ run (void *cls, char *const *args, const char *cfgfile,
int
main (int argc, char **argv)
{
- static const struct GNUNET_GETOPT_CommandLineOption options[] = {
- { 'n', "num-peers", NULL,
- gettext_noop ("number of peers in consensus"),
- GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_peers },
- { 'k', "value-replication", NULL,
- gettext_noop ("how many peers (random selection without replacement)
receive one value?"),
- GNUNET_YES, &GNUNET_GETOPT_set_uint, &replication },
- { 'x', "num-values", NULL,
- gettext_noop ("number of values"),
- GNUNET_YES, &GNUNET_GETOPT_set_uint, &num_values },
- { 't', "timeout", NULL,
- gettext_noop ("consensus timeout"),
- GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &conclude_timeout },
- { 'd', "delay", NULL,
- gettext_noop ("delay until consensus starts"),
- GNUNET_YES, &GNUNET_GETOPT_set_relative_time, &consensus_delay },
- { 's', "statistics", NULL,
- gettext_noop ("write statistics to file"),
- GNUNET_YES, &GNUNET_GETOPT_set_filename, &statistics_filename },
- { 'S', "dist-static", NULL,
- gettext_noop ("distribute elements to a static subset of good peers"),
- GNUNET_YES, &GNUNET_GETOPT_set_one, &dist_static },
- { 'V', "verbose", NULL,
- gettext_noop ("be more verbose (print received values)"),
- GNUNET_NO, &GNUNET_GETOPT_set_one, &verbose },
+ struct GNUNET_GETOPT_CommandLineOption options[] = {
+
+ GNUNET_GETOPT_OPTION_SET_UINT ('n',
+ "num-peers",
+ NULL,
+ gettext_noop ("number of peers in
consensus"),
+ &num_peers),
+
+ GNUNET_GETOPT_OPTION_SET_UINT ('k',
+ "value-replication",
+ NULL,
+ gettext_noop ("how many peers (random
selection without replacement) receive one value?"),
+ &replication),
+
+ GNUNET_GETOPT_OPTION_SET_UINT ('x',
+ "num-values",
+ NULL,
+ gettext_noop ("number of values"),
+ &num_values),
+
+ GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('t',
+ "timeout",
+ NULL,
+ gettext_noop ("consensus
timeout"),
+ &conclude_timeout),
+
+
+ GNUNET_GETOPT_OPTION_SET_RELATIVE_TIME ('d',
+ "delay",
+ NULL,
+ gettext_noop ("delay until
consensus starts"),
+ &consensus_delay),
+
+ GNUNET_GETOPT_OPTION_FILENAME ('s',
+ "statistics",
+ "FILENAME",
+ gettext_noop ("write statistics to file"),
+ &statistics_filename),
+
+ GNUNET_GETOPT_OPTION_SET_ONE ('S',
+ "dist-static",
+ gettext_noop ("distribute elements to a
static subset of good peers"),
+ &dist_static),
+
+ GNUNET_GETOPT_OPTION_SET_ONE ('V',
+ "verbose",
+ gettext_noop ("be more verbose (print
received values)"),
+ &verbose),
+
GNUNET_GETOPT_OPTION_END
};
conclude_timeout = GNUNET_TIME_UNIT_SECONDS;
diff --git a/src/scalarproduct/gnunet-scalarproduct.c
b/src/scalarproduct/gnunet-scalarproduct.c
index aa894b61d..773283959 100644
--- a/src/scalarproduct/gnunet-scalarproduct.c
+++ b/src/scalarproduct/gnunet-scalarproduct.c
@@ -344,6 +344,13 @@ int
main (int argc, char *const *argv)
{
static const struct GNUNET_GETOPT_CommandLineOption options[] = {
+
+ 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),
+
{'e', "elements", "\"key1,val1;key2,val2;...,keyn,valn;\"",
gettext_noop ("A comma separated list of elements to compare as vector
with our remote peer."),
1, &GNUNET_GETOPT_set_string, &input_elements},
diff --git a/src/set/gnunet-set-ibf-profiler.c
b/src/set/gnunet-set-ibf-profiler.c
index 8d832e358..ac86a900d 100644
--- a/src/set/gnunet-set-ibf-profiler.c
+++ b/src/set/gnunet-set-ibf-profiler.c
@@ -244,24 +244,41 @@ run (void *cls,
int
main (int argc, char **argv)
{
- static const struct GNUNET_GETOPT_CommandLineOption options[] = {
- {'A', "asize", NULL,
- gettext_noop ("number of element in set A-B"), 1,
- &GNUNET_GETOPT_set_uint, &asize},
- {'B', "bsize", NULL,
- gettext_noop ("number of element in set B-A"), 1,
- &GNUNET_GETOPT_set_uint, &bsize},
- {'C', "csize", NULL,
- gettext_noop ("number of common elements in A and B"), 1,
- &GNUNET_GETOPT_set_uint, &csize},
- {'k', "hash-num", NULL,
- gettext_noop ("hash num"), 1,
- &GNUNET_GETOPT_set_uint, &hash_num},
- {'s', "ibf-size", NULL,
- gettext_noop ("ibf size"), 1,
- &GNUNET_GETOPT_set_uint, &ibf_size},
+ struct GNUNET_GETOPT_CommandLineOption options[] = {
+
+ GNUNET_GETOPT_OPTION_SET_UINT ('A',
+ "asize",
+ NULL,
+ gettext_noop ("number of element in set
A-B"),
+ &asize),
+
+ GNUNET_GETOPT_OPTION_SET_UINT ('B',
+ "bsize",
+ NULL,
+ gettext_noop ("number of element in set
B-A"),
+ &bsize),
+
+ GNUNET_GETOPT_OPTION_SET_UINT ('C',
+ "csize",
+ NULL,
+ gettext_noop ("number of common elements in
A and B"),
+ &csize),
+
+ GNUNET_GETOPT_OPTION_SET_UINT ('k',
+ "hash-num",
+ NULL,
+ gettext_noop ("hash num"),
+ &hash_num),
+
+ GNUNET_GETOPT_OPTION_SET_UINT ('s',
+ "ibf-size",
+ NULL,
+ gettext_noop ("ibf size"),
+ &ibf_size),
+
GNUNET_GETOPT_OPTION_END
};
+
GNUNET_PROGRAM_run2 (argc, argv, "gnunet-consensus-ibf",
"help",
options, &run, NULL, GNUNET_YES);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 16/28: Porting 'nat'., (continued)
- [GNUnet-SVN] [gnunet] 16/28: Porting 'nat'., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 07/28: Porting 'arm'., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 17/28: Porting 'nat-auto'., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 14/28: add way to mark options as mandatory, get tests to pass again, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 09/28: fix test case, implement base32 argument parser logic, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 26/28: Fix compiler warnings., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 27/28: Merge branch 'master' into getopt, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 25/28: Last commit as of getopt porting. 'social' still gives warnings., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 18/28: Still porting to new getopt API., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 23/28: porting fs finished., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 21/28: porting,
gnunet <=
- [GNUnet-SVN] [gnunet] 08/28: getopt major style fix, remove macro-mania with nicer typed functions, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 20/28: porting., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 19/28: getopt API porting., gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 28/28: Merge branch 'getopt', gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 24/28: porting social, gnunet, 2017/03/17
- [GNUnet-SVN] [gnunet] 22/28: porting gnunet-publish + others.., gnunet, 2017/03/17