From 2b66c5c132641d27e718a7a8d4b01c9dce9e1ac8 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 1 Jan 2011 13:37:40 +0000 Subject: Switch on tbl rows being added to the parse stream. Here we go! --- main.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 5e5080cc..595a0a2b 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.127 2010/12/29 14:38:14 kristaps Exp $ */ +/* $Id: main.c,v 1.128 2011/01/01 13:37:40 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -798,7 +798,7 @@ rerun: continue; } else break; - case (ROFF_CONT): + default: break; } @@ -816,9 +816,20 @@ rerun: * Lastly, push down into the parsers themselves. One * of these will have already been set in the pset() * routine. + * If libroff returns ROFF_TBL, then add it to the + * currently open parse. Since we only get here if + * there does exist data (see tbl_data.c), we're + * guaranteed that something's been allocated. */ - if (curp->man || curp->mdoc) { + 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)); + + } else if (curp->man || curp->mdoc) { rc = curp->man ? man_parseln(curp->man, curp->line, ln.buf, of) : -- cgit v1.2.3