=================================================================== RCS file: /cvs/mandoc/read.c,v retrieving revision 1.150.2.4 retrieving revision 1.155 diff -u -p -r1.150.2.4 -r1.155 --- mandoc/read.c 2017/01/09 02:24:01 1.150.2.4 +++ mandoc/read.c 2016/12/28 17:34:18 1.155 @@ -1,7 +1,7 @@ -/* $Id: read.c,v 1.150.2.4 2017/01/09 02:24:01 schwarze Exp $ */ +/* $Id: read.c,v 1.155 2016/12/28 17:34:18 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2010-2017 Ingo Schwarze + * Copyright (c) 2010-2016 Ingo Schwarze * Copyright (c) 2010, 2012 Joerg Sonnenberger * * Permission to use, copy, modify, and distribute this software for any @@ -19,10 +19,8 @@ #include "config.h" #include -#if HAVE_MMAP #include #include -#endif #include #include @@ -110,11 +108,10 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "no document body", "content before first section header", "first section is not \"NAME\"", - "NAME section without Nm before Nd", + "NAME section without name", "NAME section without description", "description not at the end of NAME", "bad NAME section content", - "missing comma before name", "missing description line, using \"\"", "sections out of conventional order", "duplicate section title", @@ -608,7 +605,6 @@ read_whole_file(struct mparse *curp, const char *file, size_t off; ssize_t ssz; -#if HAVE_MMAP struct stat st; if (fstat(fd, &st) == -1) @@ -632,7 +628,6 @@ read_whole_file(struct mparse *curp, const char *file, if (fb->buf != MAP_FAILED) return 1; } -#endif if (curp->gzip) { if ((gz = gzdopen(fd, "rb")) == NULL) @@ -757,11 +752,9 @@ mparse_readfd(struct mparse *curp, int fd, const char (MPARSE_UTF8 | MPARSE_LATIN1); mparse_parse_buffer(curp, blk, file); curp->filenc = save_filenc; -#if HAVE_MMAP if (with_mmap) munmap(blk.buf, blk.sz); else -#endif free(blk.buf); } return curp->file_status;