summaryrefslogtreecommitdiffstats
path: root/mandoc.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-04-28 16:21:09 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-04-28 16:21:09 +0000
commitc0667bb0674363961e21650dd6fa239e4696d039 (patch)
treec2a9b64e56f4ac90b6b29932d5b5df55c2c8d762 /mandoc.h
parentae95bf4c9468b176445f464bec4255eb69978cfa (diff)
downloadmandoc-c0667bb0674363961e21650dd6fa239e4696d039.tar.gz
The syntax of the roff(7) .mc request is quite special
and the roff_onearg() parsing function is too generic, so provide a dedicated parsing function instead. This fixes an assertion failure when an \o escape sequence is passed as the argument; the bug was found by tb@ using afl(1). It also makes mandoc output more similar to groff in various cases.
Diffstat (limited to 'mandoc.h')
-rw-r--r--mandoc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mandoc.h b/mandoc.h
index 72c402d7..37e948d0 100644
--- a/mandoc.h
+++ b/mandoc.h
@@ -165,6 +165,7 @@ enum mandocerr {
MANDOCERR_SM_BAD, /* invalid Boolean argument: macro arg */
MANDOCERR_CHAR_FONT, /* argument contains two font escapes */
MANDOCERR_FT_BAD, /* unknown font, skipping request: ft font */
+ MANDOCERR_MC_DIST, /* ignoring distance argument: mc ... arg */
MANDOCERR_TR_ODD, /* odd number of characters in request: tr char */
/* related to plain text */
@@ -221,6 +222,7 @@ enum mandocerr {
MANDOCERR_BL_NOTYPE, /* missing list type, using -item: Bl */
MANDOCERR_CE_NONUM, /* argument is not numeric, using 1: ce ... */
MANDOCERR_CHAR_ARG, /* argument is not a character: char ... */
+ MANDOCERR_MC_ESC, /* skipping unusable escape sequence: mc arg */
MANDOCERR_NM_NONAME, /* missing manual name, using "": Nm */
MANDOCERR_OS_UNAME, /* uname(3) system call failed, using UNKNOWN */
MANDOCERR_ST_BAD, /* unknown standard specifier: St standard */