From 04a46ba5acf180be6f3a7d85cd6f6ce0ff13b1ba Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Thu, 16 Mar 2017 11:45:15 +0100 Subject: porting --- src/set/gnunet-set-ibf-profiler.c | 49 ++++++++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 16 deletions(-) (limited to 'src/set') 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); -- cgit v1.2.3