=================================================================== RCS file: /cvs/mandoc/read.c,v retrieving revision 1.87 retrieving revision 1.91 diff -u -p -r1.87 -r1.91 --- mandoc/read.c 2014/09/11 23:53:30 1.87 +++ mandoc/read.c 2014/10/18 15:57:34 1.91 @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.87 2014/09/11 23:53:30 schwarze Exp $ */ +/* $Id: read.c,v 1.91 2014/10/18 15:57:34 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -149,6 +149,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "missing font type, using \\fR", "unknown font type, using \\fR", "missing -std argument, adding it", + "missing eqn box, using \"\"", /* related to bad macro arguments */ "unterminated quoted argument", @@ -158,6 +159,8 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "skipping duplicate list type", "skipping -width argument", "unknown AT&T UNIX version", + "comma in function argument", + "parenthesis in function name", "invalid content in Rs block", "invalid Boolean argument", "unknown font, skipping request", @@ -177,7 +180,6 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "equation scope open on exit", "overlapping equation scopes", "unexpected end of equation", - "equation syntax error", /* related to tables */ "bad table syntax", @@ -766,7 +768,7 @@ mparse_readfd(struct mparse *curp, int fd, const char (*curp->mmsg)(MANDOCERR_SYSOPEN, curp->file_status, file, 0, 0, strerror(errno)); - goto out; + return(curp->file_status); } /* @@ -776,21 +778,19 @@ mparse_readfd(struct mparse *curp, int fd, const char * the parse phase for the file. */ - if ( ! read_whole_file(curp, file, fd, &blk, &with_mmap)) - goto out; - - mparse_parse_buffer(curp, blk, file); - + if (read_whole_file(curp, file, fd, &blk, &with_mmap)) { + mparse_parse_buffer(curp, blk, file); #if HAVE_MMAP - if (with_mmap) - munmap(blk.buf, blk.sz); - else + if (with_mmap) + munmap(blk.buf, blk.sz); + else #endif - free(blk.buf); + free(blk.buf); + } if (STDIN_FILENO != fd && -1 == close(fd)) perror(file); -out: + return(curp->file_status); }