=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/main.c,v retrieving revision 1.63 retrieving revision 1.64 diff -c -r1.63 -r1.64 *** src/usr.bin/mandoc/main.c 2011/01/03 23:39:27 1.63 --- src/usr.bin/mandoc/main.c 2011/01/04 22:28:17 1.64 *************** *** 1,6 **** ! /* $Id: main.c,v 1.63 2011/01/03 23:39:27 schwarze Exp $ */ /* ! * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any --- 1,6 ---- ! /* $Id: main.c,v 1.64 2011/01/04 22:28:17 schwarze Exp $ */ /* ! * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any *************** *** 162,170 **** --- 162,182 ---- "bad comment style", "unknown escape sequence", "unterminated quoted string", + + /* related to tables */ + "extra data cells", "generic error", + /* related to tables */ + "bad table syntax", + "bad table option", + "bad table layout", + "no table layout cells specified", + "no table data cells specified", + "ignore data in cell", + "data block still open", + "input stack limit exceeded, infinite loop?", "skipping bad character", "skipping text before the first section header", *************** *** 182,188 **** "missing list type", "line argument(s) will be lost", "body argument(s) will be lost", - "tbl(1) error", "generic fatal error", --- 194,199 ---- *************** *** 509,518 **** } assert(curp->roff); ! if ( ! roff_endparse(curp->roff)) { ! assert(MANDOCLEVEL_FATAL <= file_status); ! goto cleanup; ! } /* * With -Wstop and warnings or errors of at least --- 520,526 ---- } assert(curp->roff); ! roff_endparse(curp->roff); /* * With -Wstop and warnings or errors of at least *************** *** 781,787 **** continue; } else break; ! case (ROFF_CONT): break; } --- 789,795 ---- continue; } else break; ! default: break; } *************** *** 799,807 **** * Lastly, push down into the parsers themselves. One * of these will have already been set in the pset() * routine. */ ! if (curp->man || curp->mdoc) { rc = curp->man ? man_parseln(curp->man, curp->line, ln.buf, of) : --- 807,826 ---- * 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 (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) :