diff options
author | 2011-01-25 12:24:27 +0000 | |
---|---|---|
committer | 2011-01-25 12:24:27 +0000 | |
commit | 32399be7a2c7f4d8b7d359d15e610a11b6788492 (patch) | |
tree | 5e14c0bee5740ae49dae7a97bdd106eda3cabb5e /main.c | |
parent | 0d8fbcc4ac721403309bd5d810f4a97a7474cf0a (diff) | |
download | mandoc-32399be7a2c7f4d8b7d359d15e610a11b6788492.tar.gz mandoc-32399be7a2c7f4d8b7d359d15e610a11b6788492.tar.zst mandoc-32399be7a2c7f4d8b7d359d15e610a11b6788492.zip |
Since tbl_data() can now produce multiple spans, let parsebuf()
generate man(7) or mdoc(7) nodes for all these spans,
not only for the last one.
Restores the horizontal lines in the cpu(4/hppa) tables.
ok kristaps@
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.140 2011/01/24 23:41:55 schwarze Exp $ */ +/* $Id: main.c,v 1.141 2011/01/25 12:24:27 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -656,6 +656,7 @@ pdesc(struct curparse *curp) static void parsebuf(struct curparse *curp, struct buf blk, int start) { + const struct tbl_span *span; struct buf ln; enum rofferr rr; int i, of, rc; @@ -855,11 +856,12 @@ rerun: if (ROFF_TBL == rr) { assert(curp->man || curp->mdoc); - if (curp->man) - man_addspan(curp->man, roff_span(curp->roff)); - else - mdoc_addspan(curp->mdoc, roff_span(curp->roff)); - + while (NULL != (span = roff_span(curp->roff))) { + if (curp->man) + man_addspan(curp->man, span); + else + mdoc_addspan(curp->mdoc, span); + } } else if (curp->man || curp->mdoc) { rc = curp->man ? man_parseln(curp->man, |