aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/roff.c b/roff.c
index 1a317869..1b0d252c 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.218 2014/07/06 18:46:55 schwarze Exp $ */
+/* $Id: roff.c,v 1.219 2014/07/06 19:09:00 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -542,8 +542,9 @@ roff_res(struct roff *r, char **bufp, size_t *szp, int ln, int pos)
break;
default:
if (ESCAPE_ERROR == mandoc_escape(&cp, NULL, NULL))
- mandoc_msg(MANDOCERR_BADESCAPE, r->parse,
- ln, (int)(stesc - *bufp), NULL);
+ mandoc_vmsg(MANDOCERR_ESC_BAD,
+ r->parse, ln, (int)(stesc - *bufp),
+ "%.*s", (int)(cp - stesc), stesc);
continue;
}
@@ -588,8 +589,8 @@ roff_res(struct roff *r, char **bufp, size_t *szp, int ln, int pos)
arg_complete = 1;
for (naml = 0; 0 == maxl || naml < maxl; naml++, cp++) {
if ('\0' == *cp) {
- mandoc_msg(MANDOCERR_BADESCAPE, r->parse,
- ln, (int)(stesc - *bufp), NULL);
+ mandoc_msg(MANDOCERR_ESC_BAD, r->parse,
+ ln, (int)(stesc - *bufp), stesc);
arg_complete = 0;
break;
}
@@ -631,8 +632,9 @@ roff_res(struct roff *r, char **bufp, size_t *szp, int ln, int pos)
}
if (NULL == res) {
- mandoc_msg(MANDOCERR_BADESCAPE, r->parse,
- ln, (int)(stesc - *bufp), NULL);
+ mandoc_vmsg(MANDOCERR_STR_UNDEF,
+ r->parse, ln, (int)(stesc - *bufp),
+ "%.*s", (int)naml, stnam);
res = "";
}
@@ -1894,9 +1896,8 @@ roff_tr(ROFF_ARGS)
if ('\\' == *first) {
esc = mandoc_escape(&p, NULL, NULL);
if (ESCAPE_ERROR == esc) {
- mandoc_msg(MANDOCERR_BADESCAPE,
- r->parse, ln,
- (int)(p - *bufp), NULL);
+ mandoc_msg(MANDOCERR_ESC_BAD, r->parse,
+ ln, (int)(p - *bufp), first);
return(ROFF_IGN);
}
fsz = (size_t)(p - first);
@@ -1906,9 +1907,8 @@ roff_tr(ROFF_ARGS)
if ('\\' == *second) {
esc = mandoc_escape(&p, NULL, NULL);
if (ESCAPE_ERROR == esc) {
- mandoc_msg(MANDOCERR_BADESCAPE,
- r->parse, ln,
- (int)(p - *bufp), NULL);
+ mandoc_msg(MANDOCERR_ESC_BAD, r->parse,
+ ln, (int)(p - *bufp), second);
return(ROFF_IGN);
}
ssz = (size_t)(p - second);