bin: Adjust version display and help options.

In particular, this get rid of the ugly -? option that argp adds by
default, and we also remove -V so that we can use it for something
else later.

* src/bin/common_setup.cc, src/bin/common_setup.hh (misc_argp):
Provide support for --help/--version/--usage output, replacing argp's
default builting version.
* src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc,
src/bin/ltlcheck.cc, src/bin/ltlfilt.cc, src/bin/randltl.cc:
Call argp_parse() with ARGP_NO_HELP, and use misc_argp instead.
This commit is contained in:
Alexandre Duret-Lutz 2012-10-19 22:50:19 +02:00
parent c6030df936
commit b8ed85a30d
8 changed files with 64 additions and 9 deletions

View file

@ -130,6 +130,7 @@ static const argp_option options[] =
const struct argp_child children[] =
{
{ &finput_argp, 0, 0, 1 },
{ &misc_argp, 0, 0, -1 },
{ 0, 0, 0, 0 }
};
@ -1057,7 +1058,7 @@ main(int argc, char** argv)
const argp ap = { options, parse_opt, "[COMMANDFMT...]",
argp_program_doc, children, 0, 0 };
if (int err = argp_parse(&ap, argc, argv, 0, 0, 0))
if (int err = argp_parse(&ap, argc, argv, ARGP_NO_HELP, 0, 0))
exit(err);
if (jobs.empty())