From 3b52bb8d03ff61274832867c905a80a2761859aa Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 2 Jun 2022 14:51:41 +0000 Subject: Since \. is not a character escape sequence, re-classify it from the wrong parsing class ESCAPE_SPECIAL to the better-suited parsing class ESCAPE_UNDEF, exactly like it is already done for the similar \\, which isn't a character escape sequence either. No formatting change is intended just yet, but this will matter for upcoming improvements in the parser for roff(7) macro, string, and register names. See the node "5.23.2 Copy Mode" in "info groff" regarding what \\ and \. really mean. --- roff_escape.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roff_escape.c') diff --git a/roff_escape.c b/roff_escape.c index 39011cde..9d02054d 100644 --- a/roff_escape.c +++ b/roff_escape.c @@ -127,6 +127,7 @@ roff_escape(const char *buf, const int ln, const int aesc, case '\0': iendarg = --iend; /* FALLTHROUGH */ + case '.': case '\\': default: iarg--; @@ -136,7 +137,6 @@ roff_escape(const char *buf, const int ln, const int aesc, case ' ': case '\'': case '-': - case '.': case '0': case ':': case '_': @@ -481,7 +481,7 @@ out: err = MANDOCERR_ESC_UNSUPP; break; case ESCAPE_UNDEF: - if (buf[inam] == '\\') + if (buf[inam] == '\\' || buf[inam] == '.') return rval; err = MANDOCERR_ESC_UNDEF; break; -- cgit v1.2.3-56-ge451