opt: add OPT_EARLY and opt_early_parse.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 1 Dec 2011 06:14:51 +0000 (16:44 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 1 Dec 2011 06:14:51 +0000 (16:44 +1030)
commit50212d0d271f967d9f5d14c116ec54c0050882a8
treeffb0f929e626182bc06fbc7e14b26481b43af94f
parentbb2a75f445f408e43730fc55a1a978581ebe9b96
opt: add OPT_EARLY and opt_early_parse.

Parsing options like --verbose and --debug can be a pain.  You need to
have everything set up before invoking parse_args(), but that may be a
significant amount of work, for which you may want verbose or
debugging enabled.

Thus the concept of "early" args: you can nominate arguments to be
parse before anything else, using opt_early_parse().
ccan/opt/opt.c
ccan/opt/opt.h
ccan/opt/parse.c
ccan/opt/private.h
ccan/opt/test/run-early.c [new file with mode: 0644]
ccan/opt/test/utils.c
ccan/opt/test/utils.h