diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-06 19:09:00 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-07-06 19:09:00 +0000 |
commit | f8af9067d4fce04d00f200ac8a73574b0e306f9d (patch) | |
tree | 1a3fc7d34cbd677e9114ee5ce220f5ae3afb1b28 /mdoc.c | |
parent | feee5d1a235960cd9737d8171d429d9e4acd27cb (diff) | |
download | mandoc-f8af9067d4fce04d00f200ac8a73574b0e306f9d.tar.gz |
Clean up messages related to plain text and to escape sequences.
* Mention invalid escape sequences and string names, and fallbacks.
* Hierarchical naming.
Diffstat (limited to 'mdoc.c')
-rw-r--r-- | mdoc.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -797,10 +797,12 @@ mdoc_ptext(struct mdoc *mdoc, int line, char *buf, int offs) *end = '\0'; if (ws) - mdoc_pmsg(mdoc, line, (int)(ws-buf), MANDOCERR_EOLNSPACE); + mandoc_msg(MANDOCERR_SPACE_EOL, mdoc->parse, + line, (int)(ws-buf), NULL); if ('\0' == buf[offs] && ! (MDOC_LITERAL & mdoc->flags)) { - mdoc_pmsg(mdoc, line, (int)(c-buf), MANDOCERR_NOBLANKLN); + mandoc_msg(MANDOCERR_FI_BLANK, mdoc->parse, + line, (int)(c - buf), NULL); /* * Insert a `sp' in the case of a blank line. Technically, @@ -850,7 +852,8 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int offs) /* Empty post-control lines are ignored. */ if ('"' == buf[offs]) { - mdoc_pmsg(mdoc, ln, offs, MANDOCERR_BADCOMMENT); + mandoc_msg(MANDOCERR_COMMENT_BAD, mdoc->parse, + ln, offs, NULL); return(1); } else if ('\0' == buf[offs]) return(1); @@ -893,7 +896,8 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int offs) */ if ('\0' == buf[offs] && ' ' == buf[offs - 1]) - mdoc_pmsg(mdoc, ln, offs - 1, MANDOCERR_EOLNSPACE); + mandoc_msg(MANDOCERR_SPACE_EOL, mdoc->parse, + ln, offs - 1, NULL); /* * If an initial macro or a list invocation, divert directly |