aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-08 00:11:23 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-08 00:11:23 +0000
commit4a5cf76e05bfa8c6f11863146fd01fe30a12eb82 (patch)
tree2358c0fe3d8e389cee811b9a5dc43d3a9d031c12 /read.c
parent510bf831302fd1a0fb51877b2eea20c58b2e7255 (diff)
downloadmandoc-4a5cf76e05bfa8c6f11863146fd01fe30a12eb82.tar.gz
mandoc-4a5cf76e05bfa8c6f11863146fd01fe30a12eb82.tar.zst
mandoc-4a5cf76e05bfa8c6f11863146fd01fe30a12eb82.zip
Stricter validation of the NAME section, in particular:
- require a comma between names - reject all other text nodes - reject all empty Nm below NAME, not only in the leading position - reject Nm after Nd
Diffstat (limited to 'read.c')
-rw-r--r--read.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/read.c b/read.c
index 1ebc7500..54cc8530 100644
--- a/read.c
+++ b/read.c
@@ -1,7 +1,7 @@
-/* $Id: read.c,v 1.155 2016/12/28 17:34:18 schwarze Exp $ */
+/* $Id: read.c,v 1.156 2017/01/08 00:11:24 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2016 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2010, 2012 Joerg Sonnenberger <joerg@netbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -108,10 +108,11 @@ static const char * const mandocerrs[MANDOCERR_MAX] = {
"no document body",
"content before first section header",
"first section is not \"NAME\"",
- "NAME section without name",
+ "NAME section without Nm before Nd",
"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",