+ for (v->sz = 0; v->sz < MDOC_LINEARG_MAX; v->sz++) {
+ if ('-' == buf[*pos])
+ break;
+ c = mdoc_args(mdoc, line, pos, buf, ARGS_QUOTED, &p);
+ if (ARGS_ERROR == c) {
+ free(v->value);
+ return(0);
+ } else if (ARGS_EOLN == c)
+ break;
+ v->value[v->sz] = p;
+ }
+
+ if (0 < v->sz && v->sz < MDOC_LINEARG_MAX)
+ return(1);
+
+ free(v->value);
+ return(mdoc_perr(mdoc, line, ppos, 0 == v->sz ?
+ "argument requires a value" :
+ "too many values to argument"));
+}
+
+
+static int
+parse_single(struct mdoc *mdoc, int line,
+ struct mdoc_arg *v, int *pos, char *buf)
+{
+ int c, ppos;
+ char *p;
+
+ ppos = *pos;
+
+ c = mdoc_args(mdoc, line, pos, buf, ARGS_QUOTED, &p);
+ if (ARGS_ERROR == c)
+ return(0);
+ if (ARGS_EOLN == c)
+ return(mdoc_perr(mdoc, line, ppos, "argument requires a value"));
+
+ v->sz = 1;
+ v->value = xcalloc(1, sizeof(char *));
+ v->value[0] = p;
+ return(1);
+}
+
+
+static int
+parse(struct mdoc *mdoc, int line,
+ struct mdoc_arg *v, int *pos, char *buf)
+{
+
+ v->sz = 0;
+ v->value = NULL;
+