aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc_msg.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-04-24 12:02:33 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-04-24 12:02:33 +0000
commit1849b727a60f67043a27dc863e3f90e2dbb84dfe (patch)
treea125523ca4600295cc5a94e8ca0582a1d871427f /mandoc_msg.c
parentd75c48416eef7eb48487f6dc9a1bafa2c262b81c (diff)
downloadmandoc-1849b727a60f67043a27dc863e3f90e2dbb84dfe.tar.gz
mandoc-1849b727a60f67043a27dc863e3f90e2dbb84dfe.tar.zst
mandoc-1849b727a60f67043a27dc863e3f90e2dbb84dfe.zip
provide a STYLE message when mandoc knows the file name and the extension
disagrees with the section number given in the .Dt or .TH macro; feature suggested and patch tested by jmc@
Diffstat (limited to 'mandoc_msg.c')
-rw-r--r--mandoc_msg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mandoc_msg.c b/mandoc_msg.c
index 4a3e5203..318a219e 100644
--- a/mandoc_msg.c
+++ b/mandoc_msg.c
@@ -1,7 +1,7 @@
-/* $Id: mandoc_msg.c,v 1.10 2020/01/19 18:02:00 schwarze Exp $ */
+/* $OpenBSD: mandoc_msg.c,v 1.8 2020/01/19 17:59:01 schwarze Exp $ */
/*
- * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014-2020 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -14,6 +14,8 @@
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Implementation of warning and error messages for mandoc(1).
*/
#include "config.h"
@@ -83,6 +85,7 @@ static const char *const type_message[MANDOCERR_MAX] = {
"missing manual title, using \"\"",
"missing manual section, using \"\"",
"unknown manual section",
+ "filename/section mismatch",
"missing date, using \"\"",
"cannot parse date, using it verbatim",
"date in the future, using it anyway",