-/* $Id: mdoc_argv.c,v 1.56 2010/07/13 23:53:20 schwarze Exp $ */
+/* $Id: mdoc_argv.c,v 1.58 2010/07/21 09:36:41 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
#define MULTI_STEP 5
-static int argv_a2arg(enum mdoct, const char *);
+static enum mdocargt argv_a2arg(enum mdoct, const char *);
static enum margserr args(struct mdoc *, int, int *,
char *, int, char **);
static int argv(struct mdoc *, int,
void
mdoc_argn_free(struct mdoc_arg *p, int iarg)
{
- struct mdoc_argv *arg = &p->argv[iarg];
+ struct mdoc_argv *arg;
int j;
+ arg = &p->argv[iarg];
+
if (arg->sz && arg->value) {
for (j = (int)arg->sz - 1; j >= 0; j--)
free(arg->value[j]);
}
-static int
+static enum mdocargt
argv_a2arg(enum mdoct tok, const char *p)
{