aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2022-06-07 09:41:59 +0000
committerIngo Schwarze <schwarze@openbsd.org>2022-06-07 09:41:59 +0000
commit107fbb7280cf75642a3daa8ab3eea9a3974616b9 (patch)
treedf78e805ff791bcecd0c9d6350976664ffe6d8ca
parent3b824e03ce2e314aec22bc8be1326a216864d65f (diff)
downloadmandoc-107fbb7280cf75642a3daa8ab3eea9a3974616b9.tar.gz
mandoc-107fbb7280cf75642a3daa8ab3eea9a3974616b9.tar.zst
mandoc-107fbb7280cf75642a3daa8ab3eea9a3974616b9.zip
Purge duplicate error reporting from the .tr request parser:
the error was already reported earlier when roff_expand() called roff_escape().
-rw-r--r--roff.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/roff.c b/roff.c
index b78ef59e..ee0da3e6 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.393 2022/06/03 12:15:55 schwarze Exp $ */
+/* $Id: roff.c,v 1.394 2022/06/07 09:41:59 schwarze Exp $ */
/*
* Copyright (c) 2010-2015, 2017-2022 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -3740,7 +3740,6 @@ roff_tr(ROFF_ARGS)
{
const char *p, *first, *second;
size_t fsz, ssz;
- enum mandoc_esc esc;
p = buf->buf + pos;
@@ -3754,23 +3753,15 @@ roff_tr(ROFF_ARGS)
first = p++;
if (*first == '\\') {
- esc = mandoc_escape(&p, NULL, NULL);
- if (esc == ESCAPE_ERROR) {
- mandoc_msg(MANDOCERR_ESC_BAD, ln,
- (int)(p - buf->buf), "%s", first);
+ if (mandoc_escape(&p, NULL, NULL) == ESCAPE_ERROR)
return ROFF_IGN;
- }
fsz = (size_t)(p - first);
}
second = p++;
if (*second == '\\') {
- esc = mandoc_escape(&p, NULL, NULL);
- if (esc == ESCAPE_ERROR) {
- mandoc_msg(MANDOCERR_ESC_BAD, ln,
- (int)(p - buf->buf), "%s", second);
+ if (mandoc_escape(&p, NULL, NULL) == ESCAPE_ERROR)
return ROFF_IGN;
- }
ssz = (size_t)(p - second);
} else if (*second == '\0') {
mandoc_msg(MANDOCERR_TR_ODD, ln,