summaryrefslogtreecommitdiff
path: root/ccan/opt/parse.c
AgeCommit message (Collapse)Author
2014-02-24opt: relicense to GPLv2+ (from GPLv3+)Rusty Russell
Acked by contributors: Luke-Jr <luke@dashjr.org>: I don't have any objections Douglas Bagnall <douglas@halo.gen.nz>: Fine by me. Joel Stanley <joel@jms.id.au>: Fine with me. Brad Hards <bradh@frogmouth.net>: Ack. No response from Joey (trivial warning patch) or Andreas Schlick (one trivial patch, but he also wrote opt_free() (which was a 2 line function). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2013-10-02opt: add allocator setting.Rusty Russell
Good for tal usage. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-12-01opt: add OPT_EARLY and opt_early_parse.Rusty Russell
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().
2011-07-21various: add LICENSE comments.Rusty Russell
2011-03-22opt: allow const arguments.Rusty Russell
This need shows up most clearly with opt_usage_and_exit and gcc's -Wwrite-strings, where string literals become "const char *". Our callbacks should take const void *: since we overload the arg field already (to hold table size) it make sense to turn it into a proper union.
2010-10-26opt: wean off getopt_long, beef up tests.Rusty Russell
Doing our own parsing lost a few lines of code, too. Our coverage is over 99% now.