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_uint ('A',
+ "asize",
+ NULL,
+ gettext_noop ("number of element in set A-B"),
+ &asize),
+
+ GNUNET_GETOPT_option_uint ('B',
+ "bsize",
+ NULL,
+ gettext_noop ("number of element in set B-A"),
+ &bsize),
+
+ GNUNET_GETOPT_option_uint ('C',
+ "csize",
+ NULL,
+ gettext_noop ("number of common elements in A and B"),
+ &csize),
+
+ GNUNET_GETOPT_option_uint ('k',
+ "hash-num",
+ NULL,
+ gettext_noop ("hash num"),
+ &hash_num),
+
+ GNUNET_GETOPT_option_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);