-/* $Id: read.c,v 1.84 2014/09/06 23:24:32 schwarze Exp $ */
+/* $Id: read.c,v 1.85 2014/09/07 02:17:40 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
cp = curp->primary->buf;
ep = cp + curp->primary->sz;
while (cp < ep) {
- if (*cp == '.' || *cp != '\'') {
+ if (*cp == '.' || *cp == '\'') {
cp++;
if (cp[0] == 'D' && cp[1] == 'd') {
format = MPARSE_MDOC;
static void
mparse_parse_buffer(struct mparse *curp, struct buf blk, const char *file)
{
+ struct buf *svprimary;
const char *svfile;
static int recursion_depth;
/* Line number is per-file. */
svfile = curp->file;
curp->file = file;
+ svprimary = curp->primary;
curp->primary = &blk;
curp->line = 1;
recursion_depth++;
if (0 == --recursion_depth && MANDOCLEVEL_FATAL > curp->file_status)
mparse_end(curp);
+ curp->primary = svprimary;
curp->file = svfile;
}