Remove "invalid argument" statuses
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 1 Jun 2021 16:09:19 +0000 (12:09 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 4 Jun 2021 17:59:12 +0000 (13:59 -0400)
commitd1f7bbdbd28b96b360e815f28697a2f81d699cb4
treefb99cef4ca51c9bf737ae0a4b5b4e799640c8e1e
parentdd757a651292048da829dd6fa085c1f107569bcc
Remove "invalid argument" statuses

This patch removes the only remaining "invalid argument" status, which
parse_long_opt() sets when the length of the name of a long option is
greater than the size of its temporary buffer.

To deal with this, `struct argpar_iter` contains a temporary buffer to
contain the long option name in parse_long_opt(). This temporary buffer
only grows.

`test_argpar.c` contains a new test which exercise the parsers with a
700-character, hipster-themed long option name.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ia5adcfc2bdd978d81841a19ceea4a02f44559eed
argpar/argpar.c
argpar/argpar.h
tests/test_argpar.c
This page took 0.023223 seconds and 4 git commands to generate.