aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.h
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 /mandoc.h
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 'mandoc.h')
-rw-r--r--mandoc.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/mandoc.h b/mandoc.h
index 448a3e04..89458d39 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,7 +1,7 @@
-/* $Id: mandoc.h,v 1.211 2016/12/28 17:34:18 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.212 2017/01/08 00:11:23 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2016 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2017 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -65,10 +65,11 @@ enum mandocerr {
MANDOCERR_DOC_EMPTY, /* no document body */
MANDOCERR_SEC_BEFORE, /* content before first section header: macro */
MANDOCERR_NAMESEC_FIRST, /* first section is not NAME: Sh title */
- MANDOCERR_NAMESEC_NONM, /* NAME section without name */
+ MANDOCERR_NAMESEC_NONM, /* NAME section without Nm before Nd */
MANDOCERR_NAMESEC_NOND, /* NAME section without description */
MANDOCERR_NAMESEC_ND, /* description not at the end of NAME */
MANDOCERR_NAMESEC_BAD, /* bad NAME section content: macro */
+ MANDOCERR_NAMESEC_PUNCT, /* missing comma before name: Nm name */
MANDOCERR_ND_EMPTY, /* missing description line, using "" */
MANDOCERR_SEC_ORDER, /* sections out of conventional order: Sh title */
MANDOCERR_SEC_REP, /* duplicate section title: Sh title */