=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/main.c,v retrieving revision 1.73 retrieving revision 1.74 diff -c -r1.73 -r1.74 *** src/usr.bin/mandoc/main.c 2011/03/07 01:35:33 1.73 --- src/usr.bin/mandoc/main.c 2011/03/20 23:36:42 1.74 *************** *** 1,4 **** ! /* $Id: main.c,v 1.73 2011/03/07 01:35:33 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze --- 1,4 ---- ! /* $Id: main.c,v 1.74 2011/03/20 23:36:42 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze *************** *** 839,865 **** * 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); 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, curp->line, ln.buf, of) : mdoc_parseln(curp->mdoc, curp->line, ln.buf, of); ! if ( ! rc) { ! assert(MANDOCLEVEL_FATAL <= file_status); ! break; ! } } /* Temporary buffers typically are not full. */ --- 839,873 ---- * 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. + * Do the same for ROFF_EQN. */ ! rc = -1; ! ! if (ROFF_TBL == rr) while (NULL != (span = roff_span(curp->roff))) { ! rc = curp->man ? ! man_addspan(curp->man, span) : mdoc_addspan(curp->mdoc, span); + if (0 == rc) + break; } ! else if (ROFF_EQN == rr) ! rc = curp->mdoc ? ! mdoc_addeqn(curp->mdoc, ! roff_eqn(curp->roff)) : ! man_addeqn(curp->man, ! roff_eqn(curp->roff)); ! else if (curp->man || curp->mdoc) rc = curp->man ? man_parseln(curp->man, curp->line, ln.buf, of) : mdoc_parseln(curp->mdoc, curp->line, ln.buf, of); ! if (0 == rc) { ! assert(MANDOCLEVEL_FATAL <= file_status); ! break; } /* Temporary buffers typically are not full. */