-static void mparse_parse_buffer(struct mparse *, struct buf,
- const char *);
-
-static const enum mandocerr mandoclimits[MANDOCLEVEL_MAX] = {
- MANDOCERR_OK,
- MANDOCERR_WARNING,
- MANDOCERR_WARNING,
- MANDOCERR_ERROR,
- MANDOCERR_UNSUPP,
- MANDOCERR_MAX,
- MANDOCERR_MAX
-};
-
-static const char * const mandocerrs[MANDOCERR_MAX] = {
- "ok",
-
- "generic warning",
-
- /* related to the prologue */
- "missing manual title, using UNTITLED",
- "missing manual title, using \"\"",
- "lower case character in document title",
- "missing manual section, using \"\"",
- "unknown manual section",
- "missing date, using today's date",
- "cannot parse date, using it verbatim",
- "missing Os macro, using \"\"",
- "duplicate prologue macro",
- "late prologue macro",
- "skipping late title macro",
- "prologue macros out of order",
-
- /* related to document structure */
- ".so is fragile, better use ln(1)",
- "no document body",
- "content before first section header",
- "first section is not \"NAME\"",
- "bad NAME section contents",
- "missing description line, using \"\"",
- "sections out of conventional order",
- "duplicate section title",
- "unexpected section",
- "unusual Xr order",
- "unusual Xr punctuation",
- "AUTHORS section without An macro",
-
- /* related to macros and nesting */
- "obsolete macro",
- "macro neither callable nor escaped",
- "skipping paragraph macro",
- "moving paragraph macro out of list",
- "skipping no-space macro",
- "blocks badly nested",
- "nested displays are not portable",
- "moving content out of list",
- ".Vt block has child macro",
- "fill mode already enabled, skipping",
- "fill mode already disabled, skipping",
- "line scope broken",
-
- /* related to missing macro arguments */
- "skipping empty request",
- "conditional request controls empty scope",
- "skipping empty macro",
- "empty block",
- "empty argument, using 0n",
- "missing display type, using -ragged",
- "list type is not the first argument",
- "missing -width in -tag list, using 8n",
- "missing utility name, using \"\"",
- "missing function name, using \"\"",
- "empty head in list item",
- "empty list item",
- "missing font type, using \\fR",
- "unknown font type, using \\fR",
- "nothing follows prefix",
- "empty reference block",
- "missing -std argument, adding it",
- "missing eqn box, using \"\"",
-
- /* related to bad macro arguments */
- "unterminated quoted argument",
- "duplicate argument",
- "skipping duplicate argument",
- "skipping duplicate display type",
- "skipping duplicate list type",
- "skipping -width argument",
- "unknown AT&T UNIX version",
- "comma in function argument",
- "parenthesis in function name",
- "invalid content in Rs block",
- "invalid Boolean argument",
- "unknown font, skipping request",
-
- /* related to plain text */
- "blank line in fill mode, using .sp",
- "tab in filled text",
- "whitespace at end of input line",
- "bad comment style",
- "invalid escape sequence",
- "undefined string, using \"\"",
-
- /* related to tables */
- "tbl line starts with span",
- "tbl column starts with span",
- "skipping vertical bar in tbl layout",
-
- "generic error",
-
- /* related to tables */
- "non-alphabetic character in tbl options",
- "skipping unknown tbl option",
- "missing tbl option argument",
- "wrong tbl option argument size",
- "empty tbl layout",
- "invalid character in tbl layout",
- "unmatched parenthesis in tbl layout",
- "tbl without any data cells",
- "ignoring data in spanned tbl cell",
- "ignoring extra tbl data cells",
- "data block open at end of tbl",
-
- /* related to document structure and macros */
- NULL,
- "input stack limit exceeded, infinite loop?",
- "skipping bad character",
- "skipping unknown macro",
- "skipping insecure request",
- "skipping item outside list",
- "skipping column outside column list",
- "skipping end of block that is not open",
- "fewer RS blocks open, skipping",
- "inserting missing end of block",
- "appending missing end of block",
-
- /* related to request and macro arguments */
- "escaped character not allowed in a name",
- "argument count wrong",
- "NOT IMPLEMENTED: Bd -file",
- "missing list type, using -item",
- "missing manual name, using \"\"",
- "uname(3) system call failed, using UNKNOWN",
- "unknown standard specifier",
- "skipping request without numeric argument",
- "NOT IMPLEMENTED: .so with absolute path or \"..\"",
- ".so request failed",
- "skipping all arguments",
- "skipping excess arguments",
- "divide by zero",
-
- "unsupported feature",
- "input too large",
- "unsupported control character",
- "unsupported roff request",
- "eqn delim option in tbl",
- "unsupported tbl layout modifier",
- "ignoring macro in table",
-};
-
-static const char * const mandoclevels[MANDOCLEVEL_MAX] = {
- "SUCCESS",
- "RESERVED",
- "WARNING",
- "ERROR",
- "UNSUPP",
- "BADARG",
- "SYSERR"
-};