X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fopt%2Fprivate.h;h=12c569311b4a62d880981323de1eac82aff8ca77;hp=5d9eca23a0ddf55b81f812009b2b09e0fed104d7;hb=926996e88c32445c874ff9c4f47f159db6b45995;hpb=d89e5744f30b584ac4909ce1164af1289c41359b diff --git a/ccan/opt/private.h b/ccan/opt/private.h index 5d9eca23..12c56931 100644 --- a/ccan/opt/private.h +++ b/ccan/opt/private.h @@ -1,3 +1,4 @@ +/* Licensed under GPLv3+ - see LICENSE file for details */ #ifndef CCAN_OPT_PRIVATE_H #define CCAN_OPT_PRIVATE_H @@ -6,9 +7,14 @@ extern unsigned int opt_count, opt_num_short, opt_num_short_arg, opt_num_long; extern const char *opt_argv0; -#define subtable_of(entry) ((struct opt_table *)((entry)->names)) +#define subtable_of(entry) ((const struct opt_table *)((entry)->names)) const char *first_sopt(unsigned *i); const char *next_sopt(const char *names, unsigned *i); +const char *first_lopt(unsigned *i, unsigned *len); +const char *next_lopt(const char *p, unsigned *i, unsigned *len); + +int parse_one(int *argc, char *argv[], enum opt_type is_early, unsigned *offset, + void (*errlog)(const char *fmt, ...)); #endif /* CCAN_OPT_PRIVATE_H */