]> git.ozlabs.org Git - ccan/blob - ccan/opt/private.h
e4ad24a2be9e7947f862d295bef76b330c735c90
[ccan] / ccan / opt / private.h
1 /* Licensed under GPLv3+ - see LICENSE file for details */
2 #ifndef CCAN_OPT_PRIVATE_H
3 #define CCAN_OPT_PRIVATE_H
4
5 extern struct opt_table *opt_table;
6 extern unsigned int opt_count, opt_num_short, opt_num_short_arg, opt_num_long;
7
8 extern const char *opt_argv0;
9
10 #define subtable_of(entry) ((struct opt_table *)((entry)->names))
11
12 const char *first_sopt(unsigned *i);
13 const char *next_sopt(const char *names, unsigned *i);
14 const char *first_lopt(unsigned *i, unsigned *len);
15 const char *next_lopt(const char *p, unsigned *i, unsigned *len);
16
17 int parse_one(int *argc, char *argv[], enum opt_type is_early, unsigned *offset,
18               void (*errlog)(const char *fmt, ...));
19
20 #endif /* CCAN_OPT_PRIVATE_H */