=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.131 retrieving revision 1.136 diff -u -p -r1.131 -r1.136 --- mandoc/main.c 2011/01/01 22:27:08 1.131 +++ mandoc/main.c 2011/01/10 14:40:30 1.136 @@ -1,6 +1,6 @@ -/* $Id: main.c,v 1.131 2011/01/01 22:27:08 kristaps Exp $ */ +/* $Id: main.c,v 1.136 2011/01/10 14:40:30 kristaps 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", @@ -177,9 +178,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "unknown escape sequence", "unterminated quoted string", - /* related to tables */ - "extra data cells", - "generic error", /* related to tables */ @@ -188,6 +186,10 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "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", "skipping text before the first section header", @@ -803,6 +805,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.