=================================================================== RCS file: /cvs/mandoc/read.c,v retrieving revision 1.84 retrieving revision 1.88 diff -u -p -r1.84 -r1.88 --- mandoc/read.c 2014/09/06 23:24:32 1.84 +++ mandoc/read.c 2014/09/12 00:54:10 1.88 @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.84 2014/09/06 23:24:32 schwarze Exp $ */ +/* $Id: read.c,v 1.88 2014/09/12 00:54:10 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -117,6 +117,9 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "sections out of conventional order", "duplicate section title", "unexpected section", + "unusual Xr order", + "unusual Xr punctuation", + "AUTHORS section without An macro", /* related to macros and nesting */ "obsolete macro", @@ -155,6 +158,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = "skipping duplicate list type", "skipping -width argument", "unknown AT&T UNIX version", + "comma in function argument", "invalid content in Rs block", "invalid Boolean argument", "unknown font, skipping request", @@ -262,7 +266,7 @@ choose_parser(struct mparse *curp) 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; @@ -712,6 +716,7 @@ mparse_end(struct mparse *curp) static void mparse_parse_buffer(struct mparse *curp, struct buf blk, const char *file) { + struct buf *svprimary; const char *svfile; static int recursion_depth; @@ -723,6 +728,7 @@ mparse_parse_buffer(struct mparse *curp, struct buf bl /* Line number is per-file. */ svfile = curp->file; curp->file = file; + svprimary = curp->primary; curp->primary = &blk; curp->line = 1; recursion_depth++; @@ -732,6 +738,7 @@ mparse_parse_buffer(struct mparse *curp, struct buf bl if (0 == --recursion_depth && MANDOCLEVEL_FATAL > curp->file_status) mparse_end(curp); + curp->primary = svprimary; curp->file = svfile; }