=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.124 retrieving revision 1.129 diff -u -p -r1.124 -r1.129 --- mandoc/main.c 2010/12/21 01:22:03 1.124 +++ mandoc/main.c 2011/01/01 15:45:18 1.129 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.124 2010/12/21 01:22:03 schwarze Exp $ */ +/* $Id: main.c,v 1.129 2011/01/01 15:45:18 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -145,6 +145,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = /* related to macros and nesting */ "skipping obsolete macro", + "skipping paragraph macro", "blocks badly nested", "child violates parent syntax", "nested displays are not portable", @@ -178,11 +179,15 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "generic error", + "bad table syntax", + "bad table option", + "bad table layout", + "no table layout cells specified", + "no table data cells specified", "input stack limit exceeded, infinite loop?", "skipping bad character", "skipping text before the first section header", "skipping unknown macro", - "skipping paragraph macro", "NOT IMPLEMENTED: skipping request", "line scope broken", "argument count wrong", @@ -794,7 +799,7 @@ rerun: continue; } else break; - case (ROFF_CONT): + default: break; } @@ -812,9 +817,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) :