aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc_msg.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-06-05 13:54:09 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-06-05 13:54:09 +0000
commit3a43ce11ac1aec9b2c00d7c5f966919b71f5eda7 (patch)
treef1c2dbb9cb9eabff8877de71fea198ced3487b5e /mandoc_msg.c
parent2e4490e7023dd483d992df8eb6f75860fd445fe4 (diff)
downloadmandoc-3a43ce11ac1aec9b2c00d7c5f966919b71f5eda7.tar.gz
mandoc-3a43ce11ac1aec9b2c00d7c5f966919b71f5eda7.tar.zst
mandoc-3a43ce11ac1aec9b2c00d7c5f966919b71f5eda7.zip
With the improved escape sequence parser, it becomes easy to also improve
diagnostics. Distinguish "incomplete escape sequence", "invalid special character", and "unknown special character" from the generic "invalid escape sequence", also promoting them from WARNING to ERROR because incomplete escape sequences are severe syntax violations and because encountering an invalid or unknown special character makes it likely that part of the document content intended by the authors gets lost.
Diffstat (limited to 'mandoc_msg.c')
-rw-r--r--mandoc_msg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mandoc_msg.c b/mandoc_msg.c
index 80a49d1d..566a140e 100644
--- a/mandoc_msg.c
+++ b/mandoc_msg.c
@@ -236,6 +236,11 @@ static const char *const type_message[MANDOCERR_MAX] = {
"skipping excess arguments",
"divide by zero",
+ /* related to escape sequences */
+ "incomplete escape sequence",
+ "invalid special character",
+ "unknown special character",
+
"unsupported feature",
"input too large",
"unsupported control character",