=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.128 retrieving revision 1.137 diff -u -p -r1.128 -r1.137 --- mandoc/main.c 2011/01/01 13:37:40 1.128 +++ mandoc/main.c 2011/01/11 00:11:45 1.137 @@ -1,6 +1,6 @@ -/* $Id: main.c,v 1.128 2011/01/01 13:37:40 kristaps Exp $ */ +/* $Id: main.c,v 1.137 2011/01/11 00:11:45 schwarze Exp $ */ /* - * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons + * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any @@ -153,6 +153,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = /* related to missing macro arguments */ "skipping empty macro", + "argument count wrong", "missing display type", "list type must come first", "tag lists require a width argument", @@ -176,15 +177,22 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "bad comment style", "unknown escape sequence", "unterminated quoted string", - + "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", + "ignoring extra data cells", + "input stack limit exceeded, infinite loop?", "skipping bad character", + "escaped character not allowed in a name", "skipping text before the first section header", "skipping unknown macro", "NOT IMPLEMENTED: skipping request", @@ -526,10 +534,7 @@ fdesc(struct curparse *curp) } assert(curp->roff); - if ( ! roff_endparse(curp->roff)) { - assert(MANDOCLEVEL_FATAL <= file_status); - goto cleanup; - } + roff_endparse(curp->roff); /* * With -Wstop and warnings or errors of at least @@ -801,6 +806,14 @@ rerun: default: break; } + + /* + * If we encounter errors in the recursive parsebuf() + * call, make sure we don't continue parsing. + */ + + if (MANDOCLEVEL_FATAL <= file_status) + break; /* * If input parsers have not been allocated, do so now.