=================================================================== RCS file: /cvs/mandoc/read.c,v retrieving revision 1.78 retrieving revision 1.81 diff -u -p -r1.78 -r1.81 --- mandoc/read.c 2014/08/01 17:27:44 1.78 +++ mandoc/read.c 2014/08/16 19:00:01 1.81 @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.78 2014/08/01 17:27:44 schwarze Exp $ */ +/* $Id: read.c,v 1.81 2014/08/16 19:00:01 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -16,13 +16,12 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif -#ifdef HAVE_MMAP -# include -# include +#include +#if HAVE_MMAP +#include +#include #endif #include @@ -93,16 +92,19 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "generic warning", /* related to the prologue */ - "missing .TH macro, using \"unknown 1\"", + "missing manual title, using UNTITLED", + "missing manual title, using \"\"", "lower case character in document title", + "missing manual section, using \"\"", "unknown manual section", "unknown manual volume or arch", "missing date, using today's date", "cannot parse date, using it verbatim", - "prologue macros out of order", + "missing Os macro, using \"\"", "duplicate prologue macro", - "incomplete prologue, terminated by", - "skipping prologue macro in body", + "late prologue macro", + "skipping late title macro", + "prologue macros out of order", /* related to document structure */ ".so is fragile, better use ln(1)", @@ -588,7 +590,7 @@ read_whole_file(struct mparse *curp, const char *file, size_t off; ssize_t ssz; -#ifdef HAVE_MMAP +#if HAVE_MMAP struct stat st; if (-1 == fstat(fd, &st)) { curp->file_status = MANDOCLEVEL_SYSERR; @@ -761,7 +763,7 @@ mparse_readfd(struct mparse *curp, int fd, const char mparse_parse_buffer(curp, blk, file); -#ifdef HAVE_MMAP +#if HAVE_MMAP if (with_mmap) munmap(blk.buf, blk.sz); else