diff options
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r-- | mdoc_argv.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c index 9ad6a00a..b61c8b9a 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -44,7 +44,7 @@ #define MULTI_STEP 5 -static int argv_a2arg(int, const char *); +static int argv_a2arg(enum mdoct, const char *); static int args(struct mdoc *, int, int *, char *, int, char **); static int argv(struct mdoc *, int, @@ -218,7 +218,7 @@ static int mdoc_argflags[MDOC_MAX] = { * one mandatory value, an optional single value, or no value. */ int -mdoc_argv(struct mdoc *m, int line, int tok, +mdoc_argv(struct mdoc *m, int line, enum mdoct tok, struct mdoc_arg **v, int *pos, char *buf) { char *p, sv; @@ -330,13 +330,14 @@ mdoc_zargs(struct mdoc *m, int line, int *pos, int -mdoc_args(struct mdoc *m, int line, - int *pos, char *buf, int tok, char **v) +mdoc_args(struct mdoc *m, int line, int *pos, + char *buf, enum mdoct tok, char **v) { int fl, c, i; struct mdoc_node *n; - fl = (0 == tok) ? 0 : mdoc_argflags[tok]; + assert(tok && tok < MDOC_MAX); + fl = mdoc_argflags[tok]; if (MDOC_It != tok) return(args(m, line, pos, buf, fl, v)); @@ -552,7 +553,7 @@ args(struct mdoc *m, int line, int *pos, static int -argv_a2arg(int tok, const char *p) +argv_a2arg(enum mdoct tok, const char *p) { /* |