Make the parsing of command line getopt-compliant.
These commits make Why3 follow the getopt
standard way of parsing command-line options.
Benefits:
-
-Lfoo
and-L foo
both work. - Short options can be concatenated, e.g.,
why3 wc -tfa
. - Arguments can be made optional, e.g.,
--smoke-detector
instead of--smoke-detector=top
. - The
getopt
way is standard!
Downsides:
- Long options with arguments now need a
=
sign, e.g.,--library foo
is no longer recognized;--library=foo
(or-L foo
) should be used instead. Note that the--library=foo
style was already recognized before, so compatibility can be ensured.
Edited by Guillaume Melquiond