llvm/polly/lib/External/isl/isl_arg.c

/*
 * Copyright 2008-2009 Katholieke Universiteit Leuven
 *
 * Use of this software is governed by the MIT license
 *
 * Written by Sven Verdoolaege, K.U.Leuven, Departement
 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <isl/arg.h>
#include <isl/ctx.h>
#include <isl_config.h>

static struct isl_arg help_arg[] =;

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)
{}

static void free_args(struct isl_arg *arg, void *opt)
{}

void isl_args_free(struct isl_args *args, void *opt)
{}

/* Data structure for collecting the prefixes of ancestor nodes.
 *
 * n is the number of prefixes.
 * prefix[i] for i < n is a prefix of an ancestor.
 * len[i] for i < n is the length of prefix[i].
 */
struct isl_prefixes {};

/* Add "prefix" to the list of prefixes and return the updated
 * number of prefixes.
 */
static int add_prefix(struct isl_prefixes *prefixes, const char *prefix)
{}

/* Drop all prefixes starting at "first".
 */
static void drop_prefix(struct isl_prefixes *prefixes, int first)
{}

/* Print the prefixes in "prefixes".
 */
static int print_prefixes(struct isl_prefixes *prefixes)
{}

/* Check if "name" starts with one or more of the prefixes in "prefixes",
 * starting at *first.  If so, advance the pointer beyond the prefixes
 * and return the updated pointer.  Additionally, update *first to
 * the index after the last prefix found.
 */
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 int parse_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)
{}

/* Unless ISL_ARG_SKIP_HELP is set, check if "arg" is
 * equal to "--help" or "-h" and if so call print_help_and_exit.
 */
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)
{}