Polly 20.0.0git
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <isl/arg.h>
#include <isl/ctx.h>
#include <isl_config.h>
Go to the source code of this file.
Classes | |
struct | isl_prefixes |
Functions | |
static void | set_default_choice (struct isl_arg *arg, void *opt) |
static void | set_default_flags (struct isl_arg *arg, void *opt) |
static void | set_default_bool (struct isl_arg *arg, void *opt) |
static void | set_default_child (struct isl_arg *arg, void *opt) |
static void | set_default_user (struct isl_arg *arg, void *opt) |
static void | set_default_int (struct isl_arg *arg, void *opt) |
static void | set_default_long (struct isl_arg *arg, void *opt) |
static void | set_default_ulong (struct isl_arg *arg, void *opt) |
static void | set_default_str (struct isl_arg *arg, void *opt) |
static void | set_default_str_list (struct isl_arg *arg, void *opt) |
void | isl_args_set_defaults (struct isl_args *args, void *opt) |
static void | free_args (struct isl_arg *arg, void *opt) |
static void | free_child (struct isl_arg *arg, void *opt) |
static void | free_str_list (struct isl_arg *arg, void *opt) |
static void | free_user (struct isl_arg *arg, void *opt) |
void | isl_args_free (struct isl_args *args, void *opt) |
static int | add_prefix (struct isl_prefixes *prefixes, const char *prefix) |
static void | drop_prefix (struct isl_prefixes *prefixes, int first) |
static int | print_prefixes (struct isl_prefixes *prefixes) |
static const char * | skip_prefixes (const char *name, struct isl_prefixes *prefixes, int *first) |
static int | print_arg_help (struct isl_arg *decl, struct isl_prefixes *prefixes, int no) |
const void * | isl_memrchr (const void *s, int c, size_t n) |
static int | wrap_msg (const char *s, int indent, int pos) |
static int | print_help_msg (struct isl_arg *decl, int pos) |
static void | print_default (struct isl_arg *decl, const char *def, int pos) |
static void | print_default_choice (struct isl_arg *decl, void *opt, int pos) |
static void | print_choice_help (struct isl_arg *decl, struct isl_prefixes *prefixes, void *opt) |
static void | print_default_flags (struct isl_arg *decl, void *opt, int pos) |
static void | print_flags_help (struct isl_arg *decl, struct isl_prefixes *prefixes, void *opt) |
static void | print_bool_help (struct isl_arg *decl, struct isl_prefixes *prefixes, void *opt) |
static int | print_argument_name (struct isl_arg *decl, const char *name, int pos) |
static void | print_int_help (struct isl_arg *decl, struct isl_prefixes *prefixes, void *opt) |
static void | print_long_help (struct isl_arg *decl, struct isl_prefixes *prefixes, void *opt) |
static void | print_ulong_help (struct isl_arg *decl, struct isl_prefixes *prefixes) |
static void | print_str_help (struct isl_arg *decl, struct isl_prefixes *prefixes, void *opt) |
static void | print_str_list_help (struct isl_arg *decl, struct isl_prefixes *prefixes) |
static void | print_help (struct isl_arg *arg, struct isl_prefixes *prefixes, void *opt) |
static const char * | prog_name (const char *prog) |
static int | any_version (struct isl_arg *decl) |
static void | print_help_and_exit (struct isl_arg *arg, const char *prog, void *opt) |
static int | match_long_name (struct isl_arg *decl, const char *start, const char *end) |
static const char * | skip_dash_dash (struct isl_arg *decl, const char *arg) |
static const char * | skip_name (struct isl_arg *decl, const char *arg, struct isl_prefixes *prefixes, int need_argument, int *has_argument) |
static int | parse_choice_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static int | set_flag (struct isl_arg *decl, unsigned *val, const char *flag, size_t len) |
static int | parse_flags_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static int | parse_bool_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static int | parse_str_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static int | isl_arg_str_list_append (struct isl_arg *decl, void *opt, const char *s) |
static int | parse_str_list_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static int | parse_int_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static int | parse_long_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static int | parse_ulong_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static int | parse_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static int | parse_child_option (struct isl_arg *decl, char **arg, struct isl_prefixes *prefixes, void *opt) |
static void | print_version (struct isl_arg *decl) |
static void | print_version_and_exit (struct isl_arg *decl) |
static int | drop_argument (int argc, char **argv, int drop, int n) |
static int | n_arg (struct isl_arg *arg) |
static int | next_arg (struct isl_arg *arg, int a) |
static void | check_help (struct isl_args *args, char *arg, char *prog, void *opt, unsigned flags) |
int | isl_args_parse (struct isl_args *args, int argc, char **argv, void *opt, unsigned flags) |
Variables | |
static struct isl_arg | help_arg [] |
|
static |
Definition at line 224 of file isl_arg.c.
References isl_prefixes::len, isl_prefixes::n, n, and isl_prefixes::prefix.
Referenced by parse_child_option(), and print_help().
|
static |
Definition at line 695 of file isl_arg.c.
References any_version(), isl_args::args, isl_arg::child, isl_arg_child, isl_arg_end, isl_arg_version, isl_arg::type, and type.
Referenced by any_version(), isl_args_parse(), and print_help_and_exit().
|
static |
Definition at line 1246 of file isl_arg.c.
References arg, isl_args::args, ISL_ARG_SKIP_HELP, ISL_FL_ISSET, and print_help_and_exit().
Referenced by isl_args_parse().
|
static |
Definition at line 1214 of file isl_arg.c.
Referenced by isl_args_parse().
|
static |
Definition at line 244 of file isl_arg.c.
References isl_prefixes::n.
Referenced by parse_child_option(), and print_help().
|
static |
Definition at line 165 of file isl_arg.c.
References arg, free_child(), free_str_list(), free_user(), 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, offset, and type.
Referenced by free_child(), and isl_args_free().
|
static |
Definition at line 139 of file isl_arg.c.
References arg, free_args(), ISL_ARG_OFFSET_NONE, and isl_args_free().
Referenced by free_args().
|
static |
Definition at line 148 of file isl_arg.c.
References arg, isl_arg::i, and n.
Referenced by free_args().
|
static |
Definition at line 159 of file isl_arg.c.
References arg.
Referenced by free_args(), and isl_id_set_free_user().
|
static |
Definition at line 977 of file isl_arg.c.
References n, isl_arg::offset, isl_arg::offset_n, isl_arg::str_list, and isl_arg::u.
Referenced by parse_str_list_option().
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().
const void * isl_memrchr | ( | const void * | s, |
int | c, | ||
size_t | n | ||
) |
|
static |
Definition at line 745 of file isl_arg.c.
References isl_arg_alias, isl_arg::long_name, and type.
Referenced by parse_bool_option(), and skip_name().
|
static |
Definition at line 1222 of file isl_arg.c.
References arg, isl_arg_arg, isl_arg_end, n_arg(), and type.
Referenced by isl_args_parse(), isl_ast_expr_alloc_op(), n_arg(), python_generator::print_callback(), print_callback_args(), python_generator::print_method_arguments(), and python_generator::print_method_header().
|
static |
Definition at line 1234 of file isl_arg.c.
References a(), arg, isl_arg_arg, isl_arg_end, and type.
Referenced by isl_args_parse().
|
static |
Definition at line 896 of file isl_arg.c.
References arg, isl_arg::b, isl_arg::flags, ISL_ARG_BOOL_ARG, ISL_ARG_OFFSET_NONE, isl_arg::long_name, match_long_name(), name, isl_arg::offset, p, isl_arg::set, skip_dash_dash(), skip_name(), skip_prefixes(), isl_arg::u, and val.
Referenced by parse_option().
|
static |
Definition at line 1114 of file isl_arg.c.
References add_prefix(), arg, isl_args::args, isl_arg::child, drop_prefix(), ISL_ARG_OFFSET_NONE, isl_arg::long_name, isl_arg::offset, parse_option(), and isl_arg::u.
Referenced by parse_option().
|
static |
Definition at line 803 of file isl_arg.c.
References arg, isl_arg::choice, ISL_ARG_OFFSET_NONE, isl_arg_choice::name, isl_arg::offset, skip_name(), isl_arg::u, and isl_arg_choice::value.
Referenced by parse_option().
|
static |
Definition at line 863 of file isl_arg.c.
References arg, isl_arg::offset, set_flag(), skip_name(), and val.
Referenced by parse_option().
|
static |
Definition at line 1015 of file isl_arg.c.
References arg, isl_arg::offset, p, skip_name(), and val.
Referenced by parse_option().
|
static |
Definition at line 1043 of file isl_arg.c.
References arg, isl_arg::default_selected, isl_arg::default_value, isl_arg::l, isl_arg::offset, p, isl_arg::set, skip_name(), isl_arg::u, and val.
Referenced by parse_option().
|
static |
Definition at line 1132 of file isl_arg.c.
References arg, 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, parse_bool_option(), parse_child_option(), parse_choice_option(), parse_flags_option(), parse_int_option(), parse_long_option(), parse_str_list_option(), parse_str_option(), parse_ulong_option(), isl_arg::type, and type.
Referenced by isl_args_parse(), and parse_child_option().
|
static |
Definition at line 992 of file isl_arg.c.
References arg, isl_arg_str_list_append(), and skip_name().
Referenced by parse_option().
|
static |
Definition at line 951 of file isl_arg.c.
References arg, isl_arg::offset, p, and skip_name().
Referenced by parse_option().
|
static |
Definition at line 1083 of file isl_arg.c.
References arg, isl_arg::offset, p, skip_name(), and val.
Referenced by parse_option().
|
static |
Definition at line 290 of file isl_arg.c.
References isl_arg::flags, isl_arg_alias, ISL_ARG_SINGLE_DASH, isl_arg::long_name, no(), print_prefixes(), isl_arg::short_name, and type.
Referenced by print_bool_help(), print_choice_help(), print_flags_help(), print_int_help(), print_long_help(), print_str_help(), print_str_list_help(), and print_ulong_help().
|
static |
Definition at line 529 of file isl_arg.c.
References isl_arg::long_name, name, and pos().
Referenced by print_int_help(), print_str_help(), and print_str_list_help().
|
static |
Definition at line 516 of file isl_arg.c.
References ISL_ARG_OFFSET_NONE, no(), isl_arg::offset, p, pos(), print_arg_help(), print_default(), and print_help_msg().
Referenced by print_help(), and print_help_and_exit().
|
static |
Definition at line 418 of file isl_arg.c.
References isl_arg::choice, isl_arg_choice::name, pos(), print_arg_help(), print_default_choice(), print_help_msg(), and isl_arg::u.
Referenced by print_help().
|
static |
Definition at line 380 of file isl_arg.c.
References isl_arg::help_msg, and pos().
Referenced by print_bool_help(), print_default_choice(), print_int_help(), and print_str_help().
|
static |
Definition at line 402 of file isl_arg.c.
References isl_arg::choice, isl_arg_choice::name, isl_arg::offset, p, pos(), print_default(), isl_arg::u, and isl_arg_choice::value.
Referenced by print_choice_help().
|
static |
Definition at line 443 of file isl_arg.c.
References isl_arg::flags, isl_arg::help_msg, isl_arg::offset, p, pos(), and isl_arg::u.
Referenced by print_flags_help().
|
static |
Definition at line 482 of file isl_arg.c.
References isl_arg::flags, pos(), print_arg_help(), print_default_flags(), print_help_msg(), and isl_arg::u.
Referenced by print_help().
|
static |
Definition at line 605 of file isl_arg.c.
References add_prefix(), any(), arg, drop_prefix(), isl_arg_alias, isl_arg_arg, isl_arg_bool, isl_arg_child, isl_arg_end, isl_arg_footer, ISL_ARG_HIDDEN, isl_arg_int, isl_arg_long, ISL_ARG_OFFSET_NONE, isl_arg_str, isl_arg_str_list, isl_arg_ulong, isl_arg_user, isl_arg_version, offset, print_bool_help(), print_choice_help(), print_flags_help(), print_help(), print_int_help(), print_long_help(), print_str_help(), print_str_list_help(), print_ulong_help(), and type.
Referenced by print_help(), and print_help_and_exit().
|
static |
Definition at line 715 of file isl_arg.c.
References any_version(), arg, help_arg, isl_arg_arg, isl_arg_end, isl_arg_footer, print_bool_help(), print_help(), prog_name(), type, and wrap_msg().
Referenced by check_help().
|
static |
Definition at line 372 of file isl_arg.c.
References isl_arg::help_msg, pos(), and wrap_msg().
Referenced by print_bool_help(), print_choice_help(), print_flags_help(), print_int_help(), print_long_help(), print_str_help(), print_str_list_help(), and print_ulong_help().
|
static |
Definition at line 535 of file isl_arg.c.
References isl_arg::argument_name, isl_arg::offset, p, pos(), print_arg_help(), print_argument_name(), print_default(), print_help_msg(), and val.
Referenced by print_help().
|
static |
Definition at line 549 of file isl_arg.c.
References isl_arg::default_selected, isl_arg::l, isl_arg::offset, p, pos(), print_arg_help(), print_help_msg(), and isl_arg::u.
Referenced by print_help().
|
static |
Definition at line 251 of file isl_arg.c.
References isl_prefixes::n, and isl_prefixes::prefix.
Referenced by print_arg_help().
|
static |
Definition at line 580 of file isl_arg.c.
References a(), isl_arg::argument_name, isl_arg::offset, p, pos(), print_arg_help(), print_argument_name(), print_default(), and print_help_msg().
Referenced by print_help().
|
static |
Definition at line 594 of file isl_arg.c.
References a(), isl_arg::argument_name, pos(), print_arg_help(), print_argument_name(), and print_help_msg().
Referenced by print_help().
|
static |
Definition at line 569 of file isl_arg.c.
References pos(), print_arg_help(), and print_help_msg().
Referenced by print_help().
|
static |
Definition at line 1189 of file isl_arg.c.
References isl_args::args, isl_arg::child, isl_arg_child, isl_arg_end, isl_arg_version, print_version(), isl_arg::print_version, isl_arg::type, type, isl_arg::u, and isl_arg::version.
|
static |
Definition at line 1207 of file isl_arg.c.
References print_version().
Referenced by isl_args_parse().
|
static |
Definition at line 682 of file isl_arg.c.
Referenced by isl_args_parse(), and print_help_and_exit().
|
static |
Definition at line 35 of file isl_arg.c.
References arg, and ISL_ARG_OFFSET_NONE.
Referenced by isl_args_set_defaults().
|
static |
Definition at line 42 of file isl_arg.c.
References arg, isl_arg::child, ISL_ARG_OFFSET_NONE, and isl_args_set_defaults().
Referenced by isl_args_set_defaults().
|
static |
Definition at line 23 of file isl_arg.c.
References arg, and ISL_ARG_OFFSET_NONE.
Referenced by isl_args_set_defaults().
|
static |
|
static |
|
static |
|
static |
Definition at line 77 of file isl_arg.c.
Referenced by isl_args_set_defaults().
|
static |
|
static |
|
static |
|
static |
Definition at line 845 of file isl_arg.c.
References isl_arg::flags, isl_prefixes::len, isl_arg::u, and val.
Referenced by parse_flags_option().
|
static |
Definition at line 757 of file isl_arg.c.
References arg, isl_arg::flags, and ISL_ARG_SINGLE_DASH.
Referenced by parse_bool_option(), and skip_name().
|
static |
Definition at line 766 of file isl_arg.c.
References arg, equal, isl_arg::long_name, match_long_name(), name, isl_arg::short_name, skip_dash_dash(), and skip_prefixes().
Referenced by parse_bool_option(), parse_choice_option(), parse_flags_option(), parse_int_option(), parse_long_option(), parse_str_list_option(), parse_str_option(), and parse_ulong_option().
|
static |
Definition at line 272 of file isl_arg.c.
References isl_prefixes::len, isl_prefixes::n, name, and isl_prefixes::prefix.
Referenced by parse_bool_option(), and skip_name().
|
static |
Definition at line 342 of file isl_arg.c.
References isl_memrchr(), and pos().
Referenced by print_help_and_exit(), and print_help_msg().
|
static |
Definition at line 18 of file isl_arg.c.
Referenced by print_help_and_exit().