summaryrefslogtreecommitdiffstats
path: root/mdoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-06 19:09:00 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-06 19:09:00 +0000
commitf8af9067d4fce04d00f200ac8a73574b0e306f9d (patch)
tree1a3fc7d34cbd677e9114ee5ce220f5ae3afb1b28 /mdoc.c
parentfeee5d1a235960cd9737d8171d429d9e4acd27cb (diff)
downloadmandoc-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.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mdoc.c b/mdoc.c
index 1dfe8f51..74e19a2e 100644
--- a/mdoc.c
+++ b/mdoc.c
@@ -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