Polly 20.0.0git
|
#include <stddef.h>
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | isl_arg_choice |
struct | isl_arg_flags |
struct | isl_arg |
struct | isl_args |
Macros | |
#define | ISL_ARG_OFFSET_NONE ((size_t) -1) |
#define | ISL_ARG_SINGLE_DASH (1 << 0) |
#define | ISL_ARG_BOOL_ARG (1 << 1) |
#define | ISL_ARG_HIDDEN (1 << 2) |
#define | ISL_ARGS_START(s, name) |
#define | ISL_ARGS_END { isl_arg_end } }; |
#define | ISL_ARG_ALIAS(l) |
#define | ISL_ARG_ARG(st, f, a, d) |
#define | ISL_ARG_FOOTER(h) |
#define | ISL_ARG_CHOICE(st, f, s, l, c, d, h) |
#define | ISL_ARG_OPT_CHOICE(st, f, s, l, c, d, ds, h) |
#define | ISL_ARG_PHANTOM_USER_CHOICE_F(s, l, c, setter, d, h, fl) |
#define | ISL_ARG_USER_OPT_CHOICE(st, f, s, l, c, setter, d, ds, h) |
#define | _ISL_ARG_BOOL_F(o, s, l, setter, d, h, fl) |
#define | ISL_ARG_BOOL_F(st, f, s, l, d, h, fl) _ISL_ARG_BOOL_F(offsetof(st, f),s,l,NULL,d,h,fl) |
#define | ISL_ARG_BOOL(st, f, s, l, d, h) ISL_ARG_BOOL_F(st,f,s,l,d,h,0) |
#define | ISL_ARG_PHANTOM_BOOL_F(s, l, setter, h, fl) _ISL_ARG_BOOL_F(ISL_ARG_OFFSET_NONE,s,l,setter,0,h,fl) |
#define | ISL_ARG_PHANTOM_BOOL(s, l, setter, h) ISL_ARG_PHANTOM_BOOL_F(s,l,setter,h,0) |
#define | ISL_ARG_INT_F(st, f, s, l, a, d, h, fl) |
#define | ISL_ARG_INT(st, f, s, l, a, d, h) ISL_ARG_INT_F(st,f,s,l,a,d,h,0) |
#define | ISL_ARG_LONG(st, f, s, lo, d, h) |
#define | ISL_ARG_USER_LONG(st, f, s, lo, setter, d, h) |
#define | ISL_ARG_OPT_LONG(st, f, s, lo, d, ds, h) |
#define | ISL_ARG_ULONG(st, f, s, l, d, h) |
#define | ISL_ARG_STR_F(st, f, s, l, a, d, h, fl) |
#define | ISL_ARG_STR(st, f, s, l, a, d, h) ISL_ARG_STR_F(st,f,s,l,a,d,h,0) |
#define | ISL_ARG_STR_LIST(st, f_n, f_l, s, l, a, h) |
#define | _ISL_ARG_CHILD(o, l, c, h, fl) |
#define | ISL_ARG_CHILD(st, f, l, c, h) _ISL_ARG_CHILD(offsetof(st, f),l,c,h,0) |
#define | ISL_ARG_GROUP_F(l, c, h, fl) _ISL_ARG_CHILD(ISL_ARG_OFFSET_NONE,l,c,h,fl) |
#define | ISL_ARG_GROUP(l, c, h) ISL_ARG_GROUP_F(l,c,h,0) |
#define | ISL_ARG_FLAGS(st, f, s, l, c, d, h) |
#define | ISL_ARG_USER(st, f, i, c) |
#define | ISL_ARG_VERSION(print) |
#define | ISL_ARG_ALL (1 << 0) |
#define | ISL_ARG_SKIP_HELP (1 << 1) |
#define | ISL_ARG_DECL(prefix, st, args) |
#define | ISL_ARG_DEF(prefix, st, args) |
Enumerations | |
enum | isl_arg_type { isl_arg_end , isl_arg_alias , isl_arg_arg , isl_arg_bool , isl_arg_child , isl_arg_choice , isl_arg_flags , isl_arg_footer , isl_arg_int , isl_arg_user , isl_arg_long , isl_arg_ulong , isl_arg_str , isl_arg_str_list , isl_arg_version } |
Functions | |
void | isl_args_set_defaults (struct isl_args *args, void *opt) |
void | isl_args_free (struct isl_args *args, void *opt) |
int | isl_args_parse (struct isl_args *args, int argc, char **argv, void *opt, unsigned flags) |
#define _ISL_ARG_BOOL_F | ( | o, | |
s, | |||
l, | |||
setter, | |||
d, | |||
h, | |||
fl | |||
) |
#define _ISL_ARG_CHILD | ( | o, | |
l, | |||
c, | |||
h, | |||
fl | |||
) |
#define ISL_ARG_ALIAS | ( | l | ) |
#define ISL_ARG_BOOL | ( | st, | |
f, | |||
s, | |||
l, | |||
d, | |||
h | |||
) | ISL_ARG_BOOL_F(st,f,s,l,d,h,0) |
#define ISL_ARG_BOOL_F | ( | st, | |
f, | |||
s, | |||
l, | |||
d, | |||
h, | |||
fl | |||
) | _ISL_ARG_BOOL_F(offsetof(st, f),s,l,NULL,d,h,fl) |
#define ISL_ARG_CHILD | ( | st, | |
f, | |||
l, | |||
c, | |||
h | |||
) | _ISL_ARG_CHILD(offsetof(st, f),l,c,h,0) |
#define ISL_ARG_CHOICE | ( | st, | |
f, | |||
s, | |||
l, | |||
c, | |||
d, | |||
h | |||
) |
#define ISL_ARG_DECL | ( | prefix, | |
st, | |||
args | |||
) |
#define ISL_ARG_DEF | ( | prefix, | |
st, | |||
args | |||
) |
#define ISL_ARG_FLAGS | ( | st, | |
f, | |||
s, | |||
l, | |||
c, | |||
d, | |||
h | |||
) |
#define ISL_ARG_FOOTER | ( | h | ) |
#define ISL_ARG_GROUP | ( | l, | |
c, | |||
h | |||
) | ISL_ARG_GROUP_F(l,c,h,0) |
#define ISL_ARG_GROUP_F | ( | l, | |
c, | |||
h, | |||
fl | |||
) | _ISL_ARG_CHILD(ISL_ARG_OFFSET_NONE,l,c,h,fl) |
#define ISL_ARG_INT | ( | st, | |
f, | |||
s, | |||
l, | |||
a, | |||
d, | |||
h | |||
) | ISL_ARG_INT_F(st,f,s,l,a,d,h,0) |
#define ISL_ARG_LONG | ( | st, | |
f, | |||
s, | |||
lo, | |||
d, | |||
h | |||
) |
#define ISL_ARG_OPT_CHOICE | ( | st, | |
f, | |||
s, | |||
l, | |||
c, | |||
d, | |||
ds, | |||
h | |||
) |
#define ISL_ARG_OPT_LONG | ( | st, | |
f, | |||
s, | |||
lo, | |||
d, | |||
ds, | |||
h | |||
) |
#define ISL_ARG_PHANTOM_BOOL | ( | s, | |
l, | |||
setter, | |||
h | |||
) | ISL_ARG_PHANTOM_BOOL_F(s,l,setter,h,0) |
#define ISL_ARG_PHANTOM_BOOL_F | ( | s, | |
l, | |||
setter, | |||
h, | |||
fl | |||
) | _ISL_ARG_BOOL_F(ISL_ARG_OFFSET_NONE,s,l,setter,0,h,fl) |
#define ISL_ARG_PHANTOM_USER_CHOICE_F | ( | s, | |
l, | |||
c, | |||
setter, | |||
d, | |||
h, | |||
fl | |||
) |
#define ISL_ARG_STR | ( | st, | |
f, | |||
s, | |||
l, | |||
a, | |||
d, | |||
h | |||
) | ISL_ARG_STR_F(st,f,s,l,a,d,h,0) |
#define ISL_ARG_STR_LIST | ( | st, | |
f_n, | |||
f_l, | |||
s, | |||
l, | |||
a, | |||
h | |||
) |
#define ISL_ARG_ULONG | ( | st, | |
f, | |||
s, | |||
l, | |||
d, | |||
h | |||
) |
#define ISL_ARG_USER | ( | st, | |
f, | |||
i, | |||
c | |||
) |
#define ISL_ARG_USER_LONG | ( | st, | |
f, | |||
s, | |||
lo, | |||
setter, | |||
d, | |||
h | |||
) |
#define ISL_ARG_USER_OPT_CHOICE | ( | st, | |
f, | |||
s, | |||
l, | |||
c, | |||
setter, | |||
d, | |||
ds, | |||
h | |||
) |
#define ISL_ARG_VERSION | ( | ) |
#define ISL_ARGS_END { isl_arg_end } }; |
#define ISL_ARGS_START | ( | s, | |
name | |||
) |
enum isl_arg_type |
void isl_args_free | ( | struct isl_args * | args, |
void * | opt | ||
) |
Definition at line 199 of file isl_arg.c.
References isl_args::args, and free_args().
Referenced by free_child(), isl_ctx_alloc_with_options(), and isl_ctx_free().
int isl_args_parse | ( | struct isl_args * | args, |
int | argc, | ||
char ** | argv, | ||
void * | opt, | ||
unsigned | flags | ||
) |
Definition at line 1256 of file isl_arg.c.
References a(), any_version(), isl_args::args, check_help(), drop_argument(), ISL_ARG_ALL, ISL_FL_ISSET, n, n_arg(), next_arg(), isl_arg::offset, p, parse_option(), print_version_and_exit(), and prog_name().
Referenced by isl_ctx_parse_options().
void isl_args_set_defaults | ( | struct isl_args * | args, |
void * | opt | ||
) |
Definition at line 91 of file isl_arg.c.
References isl_args::args, isl_arg::i, isl_arg_alias, isl_arg_arg, isl_arg_bool, isl_arg_child, isl_arg_end, isl_arg_footer, isl_arg_int, isl_arg_long, isl_arg_str, isl_arg_str_list, isl_arg_ulong, isl_arg_user, isl_arg_version, set_default_bool(), set_default_child(), set_default_choice(), set_default_flags(), set_default_int(), set_default_long(), set_default_str(), set_default_str_list(), set_default_ulong(), set_default_user(), and isl_arg::type.
Referenced by set_default_child().