diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-17 23:57:06 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-05-17 23:57:06 +0000 |
commit | 26062711bedfc2a29550c2d705beb1d77d7ee0b3 (patch) | |
tree | 191667292c6c27bf1989ad6bb8654d7f6f94a4a9 /mdoc_validate.c | |
parent | 67ec6f950232a27295516acb54b9a80b5ddd08f0 (diff) | |
download | mandoc-26062711bedfc2a29550c2d705beb1d77d7ee0b3.tar.gz |
Increase performance by stashing the list type in struct mdoc_node.
This will eventually be used so that mdoc_macro can known whether to
dump list line arguments into the body (`Bl -column' overflowing).
Remove a2list() and arg_listtype() because of this.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 48dc1c88..f6c6297b 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -568,27 +568,19 @@ pre_bl(PRE_ARGS) case (MDOC_Inset): /* FALLTHROUGH */ case (MDOC_Column): - /* - * Note that if a duplicate is detected, we - * remove the duplicate instead of passing it - * over. If we don't do this, mdoc_action will - * become confused when it scans over multiple - * types whilst setting its bitmasks. - * - * FIXME: this should occur in mdoc_action.c. - */ - if (type >= 0) { - if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_LISTREP)) - return(0); - mdoc_argn_free(n->args, pos); + if (type < 0) { + type = n->args->argv[pos].arg; break; } - type = n->args->argv[pos].arg; - break; + if (mdoc_nmsg(mdoc, n, MANDOCERR_LISTREP)) + break; + return(0); case (MDOC_Compact): - if (type < 0 && ! mdoc_nmsg(mdoc, n, MANDOCERR_LISTFIRST)) - return(0); - break; + if (type >= 0) + break; + if (mdoc_nmsg(mdoc, n, MANDOCERR_LISTFIRST)) + break; + return(0); case (MDOC_Width): if (width >= 0) if ( ! mdoc_nmsg(mdoc, n, MANDOCERR_ARGVREP)) |