aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-04-24 13:38:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-04-24 13:38:46 +0000
commit3b18ea9139a1bdd9183db6f3ac6d174ad93b3cb3 (patch)
tree45cef6947de3a407683fabc94f2ba1f4385da7fc /mandoc.h
parentc0ce7eb56abb536b1c8eaedec44f05b67e2bdf6a (diff)
downloadmandoc-3b18ea9139a1bdd9183db6f3ac6d174ad93b3cb3.tar.gz
mandoc-3b18ea9139a1bdd9183db6f3ac6d174ad93b3cb3.zip
If a .shift request has a negative argument, do not use a negative array
index but use 0 instead of the argument, just like groff. Warn about the invalid argument. While here, fix the column number in another warning message. Segfault reported by tb@, found with afl(1).
Diffstat (limited to 'mandoc.h')
-rw-r--r--mandoc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/mandoc.h b/mandoc.h
index 9837ff2a..32914deb 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -1,6 +1,6 @@
-/* $Id: mandoc.h,v 1.274 2021/08/14 13:53:08 schwarze Exp $ */
+/* $Id: mandoc.h,v 1.275 2022/04/24 13:38:46 schwarze Exp $ */
/*
- * Copyright (c) 2012-2021 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2012-2022 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -215,6 +215,7 @@ enum mandocerr {
MANDOCERR_NAMESC, /* escaped character not allowed in a name: name */
MANDOCERR_ARG_UNDEF, /* using macro argument outside macro */
MANDOCERR_ARG_NONUM, /* argument number is not numeric */
+ MANDOCERR_ARG_NEG, /* negative argument, using 0: request arg */
MANDOCERR_BD_FILE, /* NOT IMPLEMENTED: Bd -file */
MANDOCERR_BD_NOARG, /* skipping display without arguments: Bd */
MANDOCERR_BL_NOTYPE, /* missing list type, using -item: Bl */