source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Purge duplicate error reporting from the .tr request parser: the
@ 2022-06-07  9:42 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2022-06-07  9:42 UTC (permalink / raw)
  To: source

Log Message:
-----------
Purge duplicate error reporting from the .tr request parser:
the error was already reported earlier when roff_expand()
called roff_escape().

Modified Files:
--------------
    mandoc:
        roff.c

Revision Data
-------------
Index: roff.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/roff.c,v
retrieving revision 1.393
retrieving revision 1.394
diff -Lroff.c -Lroff.c -u -p -r1.393 -r1.394
--- roff.c
+++ roff.c
@@ -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,
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-07  9:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07  9:42 mandoc: Purge duplicate error reporting from the .tr request parser: the schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).