opt: add new parse_early_args_incomplete.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 2 Nov 2018 01:27:57 +0000 (11:57 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 2 Nov 2018 01:29:52 +0000 (11:59 +1030)
commitc656dceb3f04c2e3da7af40824c97eff5119a0b9
tree78ae92921ca3c7c889cb33f5ff8d184716e7729c
parent97026cedabce510b2e2e547120f04fe0f6a5ecab
opt: add new parse_early_args_incomplete.

If we have plugins, and those can register args, we have a problem finding
the plugin dir!  So, do a best-effort incomplete parse.

Note that this can screw up in theory if we have "--unknown --foo" since we
don't know if unknown takes an argument (in which case, ignore --foo) or
not.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/opt/opt.c
ccan/opt/opt.h
ccan/opt/parse.c
ccan/opt/private.h
ccan/opt/test/run-early_incomplete.c [new file with mode: 0644]
ccan/opt/test/utils.c
ccan/opt/test/utils.h