X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/25dd5fca341866aad4ae182313bdf902ae4c349f..446eaf99d9987df7d312d3315e99646e91ada7fe:/mdoc_argv.c?ds=sidebyside diff --git a/mdoc_argv.c b/mdoc_argv.c index c55bcdd9..f68e55f5 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_argv.c,v 1.57 2010/07/21 09:08:26 kristaps Exp $ */ +/* $Id: mdoc_argv.c,v 1.62 2010/12/24 14:00:40 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -95,7 +95,7 @@ static int mdoc_argflags[MDOC_MAX] = { 0, /* Os */ 0, /* Sh */ 0, /* Ss */ - ARGS_DELIM, /* Pp */ + 0, /* Pp */ ARGS_DELIM, /* D1 */ ARGS_DELIM, /* Dl */ 0, /* Bd */ @@ -196,7 +196,7 @@ static int mdoc_argflags[MDOC_MAX] = { 0, /* Fr */ 0, /* Ud */ 0, /* Lb */ - ARGS_DELIM, /* Lp */ + 0, /* Lp */ ARGS_DELIM, /* Lk */ ARGS_DELIM, /* Mt */ ARGS_DELIM, /* Brq */ @@ -313,9 +313,11 @@ mdoc_argv_free(struct mdoc_arg *p) void mdoc_argn_free(struct mdoc_arg *p, int iarg) { - struct mdoc_argv *arg = &p->argv[iarg]; /* FIXME: decl/assign */ + 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]); @@ -359,8 +361,7 @@ mdoc_args(struct mdoc *m, int line, int *pos, if (MDOC_Bl == n->tok) break; - assert(n->data.Bl); - if (n && LIST_column == n->data.Bl->type) { + if (n && LIST_column == n->norm->Bl.type) { fl |= ARGS_TABSEP; fl &= ~ARGS_DELIM; }