X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/52a50fec0924869c52803daed1f1d5dbf5f108af..fc974a57cd34bcbd149a89e1e5927d795492b4aa:/main.c diff --git a/main.c b/main.c index 6b101492..2289de8a 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,6 @@ -/* $Id: main.c,v 1.129 2011/01/01 15:45:18 kristaps Exp $ */ +/* $Id: main.c,v 1.133 2011/01/03 23:53:51 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,9 +177,13 @@ static const char * const mandocerrs[MANDOCERR_MAX] = { "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", @@ -527,10 +532,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 @@ -803,6 +805,14 @@ rerun: 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. * We keep these instanced betwen parsers, but set them