aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2012-07-12 15:11:14 +0000
committerIngo Schwarze <schwarze@openbsd.org>2012-07-12 15:11:14 +0000
commita19c95fa6a0579b54387165ee1396f52a4f586df (patch)
treefe4387c9b2dd40fe521806867f53388a88512b1b /mandoc.h
parent5b96439af7b14f4fc13c1aa3249974a9ad9ddfd4 (diff)
downloadmandoc-a19c95fa6a0579b54387165ee1396f52a4f586df.tar.gz
mandoc-a19c95fa6a0579b54387165ee1396f52a4f586df.tar.zst
mandoc-a19c95fa6a0579b54387165ee1396f52a4f586df.zip
The post_nm() validation function crashed when the first .Nm child node
was a non-text node. Fix this by rewriting post_nm() to always set the meta name to UNKNOWN when the name is missing or unusable. While here, make MANDOCERR_NONAME an ERROR, as it usually renders the page content unintelligible. Bug reported by Maxim <Belooussov at gmail dot com>, thanks. OpenBSD rev. 1.105
Diffstat (limited to 'mandoc.h')
-rw-r--r--mandoc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/mandoc.h b/mandoc.h
index d0560cfc..0c19c4e7 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,4 +1,4 @@
-/* $Id: mandoc.h,v 1.102 2012/05/31 22:29:13 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.103 2012/07/12 15:11:14 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -61,7 +61,6 @@ enum mandocerr {
MANDOCERR_SO, /* .so is fragile, better use ln(1) */
MANDOCERR_NAMESECFIRST, /* NAME section must come first */
MANDOCERR_BADNAMESEC, /* bad NAME section contents */
- MANDOCERR_NONAME, /* manual name not yet set */
MANDOCERR_SECOOO, /* sections out of conventional order */
MANDOCERR_SECREP, /* duplicate section name */
MANDOCERR_SECMSEC, /* section not in conventional manual section */
@@ -129,6 +128,7 @@ enum mandocerr {
MANDOCERR_ROFFLOOP, /* input stack limit exceeded, infinite loop? */
MANDOCERR_BADCHAR, /* skipping bad character */
MANDOCERR_NAMESC, /* escaped character not allowed in a name */
+ MANDOCERR_NONAME, /* manual name not yet set */
MANDOCERR_NOTEXT, /* skipping text before the first section header */
MANDOCERR_MACRO, /* skipping unknown macro */
MANDOCERR_REQUEST, /* NOT IMPLEMENTED: skipping request */