util: improve the command line argument parsing in wmmenugen
commit0a009143c32064d47dc857ec50e95116b7c5b6be
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 23 May 2015 15:19:30 +0000 (23 17:19 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 23 May 2015 17:53:19 +0000 (23 18:53 +0100)
tree30e12db34577f6c32410a559a75621e5c28d5a17
parent8088dc1eabb743a1dbd594cb0908234c0721d61c
util: improve the command line argument parsing in wmmenugen

The code ignored the last argument provided on the command line;

It did not support the recommended '--version' and '--help' from GNU which
are often handy;

It used an unusual syntax to specify the parser, now it can also use more
usual "-parser=name" and "-parser name", the old syntax is still supported
to avoid breaking compatibility;

When a problem is found with an argument, the program stops instead of
printing an error message and continuing;

There's been updates on the exit codes in case of problem because it is an
information that could be useful for people calling the program from a
script;

Took the opportunity to provide more information in the man page and to
get it cross-checked against the program's option list during "make check".

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
doc/Makefile.am
doc/wmmenugen.1
util/wmmenugen.c