2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
4 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
24 unsigned int argv_step
;
25 const struct arg_def
*def
;
28 struct arg_enum_list
{
32 #define ARG_ENUM_LIST_END \
35 typedef struct arg_def
{
36 const char *short_name
;
37 const char *long_name
;
40 const struct arg_enum_list
*enums
;
42 #define ARG_DEF(s, l, v, d) \
44 #define ARG_DEF_ENUM(s, l, v, d, e) \
46 #define ARG_DEF_LIST_END \
49 struct arg
arg_init(char **argv
);
50 int arg_match(struct arg
*arg_
, const struct arg_def
*def
, char **argv
);
51 const char *arg_next(struct arg
*arg
);
52 void arg_show_usage(FILE *fp
, const struct arg_def
*const *defs
);
53 char **argv_dup(int argc
, const char **argv
);
55 unsigned int arg_parse_uint(const struct arg
*arg
);
56 int arg_parse_int(const struct arg
*arg
);
57 struct aom_rational
arg_parse_rational(const struct arg
*arg
);
58 int arg_parse_enum(const struct arg
*arg
);
59 int arg_parse_enum_or_int(const struct arg
*arg
);
60 int arg_parse_list(const struct arg
*arg
, int *list
, int n
);