]> git.tuebingen.mpg.de Git - lopsub.git/commit - lopsub.c
Improve diagnostics of lls_check_arg_count().
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 6 Feb 2019 17:49:06 +0000 (18:49 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 28 Mar 2019 09:48:41 +0000 (10:48 +0100)
commit4636c7a90e91633d0196860f5f5531a633f782b7
treeb5630ec31655cd64587f819924a89cca3717b8fc
parent0cfd2b26c29859490b67351266b90702f7aac0ff
Improve diagnostics of lls_check_arg_count().

The old code could return an error message like

at least 1 non-option args required, 0 given

even if exactly 1 arg is required. So check this case and print

exactly 1 non-option args required, 0 given

instead. The check for the upper bound has the same issue. It is
considered a bug in the application if min_argc > max_argc, so check
for this case as well.
lopsub.c