source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: During identifier parsing, handle undefined escape sequences in
@ 2022-06-03 12:16 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2022-06-03 12:16 UTC (permalink / raw)
  To: source

Log Message:
-----------
During identifier parsing, handle undefined escape sequences
in the same way as groff:
* \\ is always reduced to \
* \. is always reduced to .
* other undefined escape sequences are usually reduced to the escape name,
for example \G to G, except during the expansion of expanding escape
sequences having the standard argument form (in particular \* and \n),
in which case the backslash is preserved literally.

Yes, this is confusing indeed.
For example, the following have the same meaning:
* .ds \.   and   .ds .     which is not the same as   .ds \\.
* \*[\.]   and   \*[.]     which is not the same as   \*[\\.]
* .ds \G   and   .ds G     which is not the same as   .ds \\G
* \*[\G]   and   \*[\\G]   which is not the same as   \*[G]   <- sic!

To feel less dirty, have a leaning toothpick, if you are so inclined.

This patch also slightly improves the string shown by the "escaped
character not allowed in a name" error message.

Modified Files:
--------------
    mandoc:
        roff.c
    mandoc/regress/roff/args:
        man.out_lint
        mdoc.out_lint
    mandoc/regress/roff/cond:
        register.in
        register.out_ascii
        string.in
        string.out_ascii
    mandoc/regress/roff/de:
        escname.in
        escname.out_ascii
        escname.out_lint
    mandoc/regress/roff/ds:
        Makefile
    mandoc/regress/roff/nr:
        escname.in
        escname.out_ascii
        escname.out_lint
    mandoc/regress/roff/string:
        Makefile
        name.in
        name.out_ascii
        name.out_lint

Revision Data
-------------
Index: escname.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/nr/escname.out_ascii,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/roff/nr/escname.out_ascii -Lregress/roff/nr/escname.out_ascii -u -p -r1.2 -r1.3
--- regress/roff/nr/escname.out_ascii
+++ regress/roff/nr/escname.out_ascii
@@ -4,7 +4,7 @@ N\bNA\bAM\bME\bE
        nr-escname - escape sequences in register names
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
-       1 2 3
+       1 2 3 5 6
 
        0 2 3
 
@@ -12,4 +12,4 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        incomplete:
 
-OpenBSD                          June 29, 2014                   NR-ESCNAME(1)
+OpenBSD                          June 3, 2022                    NR-ESCNAME(1)
Index: escname.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/nr/escname.out_lint,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/roff/nr/escname.out_lint -Lregress/roff/nr/escname.out_lint -u -p -r1.5 -r1.6
--- regress/roff/nr/escname.out_lint
+++ regress/roff/nr/escname.out_lint
@@ -1,4 +1,5 @@
 mandoc: escname.in:9:5: ERROR: escaped character not allowed in a name: first\e
-mandoc: escname.in:12:5: ERROR: escaped character not allowed in a name: first\e
-mandoc: escname.in:18:13: WARNING: invalid escape sequence: \n[second
-mandoc: escname.in:18:12: STYLE: whitespace at end of input line
+mandoc: escname.in:11:10: WARNING: undefined escape, printing literally: \G
+mandoc: escname.in:14:5: ERROR: escaped character not allowed in a name: first\e
+mandoc: escname.in:20:13: WARNING: invalid escape sequence: \n[second
+mandoc: escname.in:20:12: STYLE: whitespace at end of input line
Index: escname.in
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/nr/escname.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/roff/nr/escname.in -Lregress/roff/nr/escname.in -u -p -r1.2 -r1.3
--- regress/roff/nr/escname.in
+++ regress/roff/nr/escname.in
@@ -1,5 +1,5 @@
-.\" $OpenBSD: escname.in,v 1.3 2017/07/04 14:53:27 schwarze Exp $
-.TH NR-ESCNAME 1 "June 29, 2014"
+.\" $OpenBSD: escname.in,v 1.4 2022/06/03 11:50:25 schwarze Exp $
+.TH NR-ESCNAME 1 "June 3, 2022"
 .SH NAME
 nr-escname \- escape sequences in register names
 .SH DESCRIPTION
@@ -7,7 +7,9 @@ nr-escname \- escape sequences in regist
 .nr second 2
 .nr first\\second 3
 .nr first\esecond 4
-\n[first] \n[second] \n[first\\second]
+.nr first\.second 5
+.nr first\Gsecond 6
+\n[first] \n[second] \n[first\\second] \n[first.second] \n[firstGsecond]
 .PP
 .rr first\esecond
 \n[first] \n[second] \n[first\\second]
Index: roff.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/roff.c,v
retrieving revision 1.392
retrieving revision 1.393
diff -Lroff.c -Lroff.c -u -p -r1.392 -r1.393
--- roff.c
+++ roff.c
@@ -1375,6 +1375,7 @@ roff_expand(struct roff *r, struct buf *
 	int		 iarg;		/* index beginning the argument */
 	int		 iendarg;	/* index right after the argument */
 	int		 iend;		/* index right after the sequence */
+	int		 isrc, idst;	/* to reduce \\ and \. in names */
 	int		 deftype;	/* type of definition to paste */
 	int		 argi;		/* macro argument index */
 	int		 quote_args;	/* true for \\$@, false for \\$* */
@@ -1428,6 +1429,21 @@ roff_expand(struct roff *r, struct buf *
 			continue;
 		}
 
+		/* Reduce \\ and \. in names. */
+
+		if (buf->buf[inam] == '*' || buf->buf[inam] == 'n') {
+			isrc = idst = iarg;
+			while (isrc < iendarg) {
+				if (isrc + 1 < iendarg &&
+				    buf->buf[isrc] == '\\' &&
+				    (buf->buf[isrc + 1] == '\\' ||
+				     buf->buf[isrc + 1] == '.'))
+					isrc++;
+				buf->buf[idst++] = buf->buf[isrc++];
+			}
+			iendarg -= isrc - idst;
+		}
+
 		/* Handle expansion. */
 
 		res = NULL;
@@ -4002,7 +4018,7 @@ static size_t
 roff_getname(struct roff *r, char **cpp, int ln, int pos)
 {
 	char	 *name, *cp;
-	size_t	  namesz;
+	int	  namesz, inam, iend;
 
 	name = *cpp;
 	if (*name == '\0')
@@ -4010,24 +4026,46 @@ roff_getname(struct roff *r, char **cpp,
 
 	/* Advance cp to the byte after the end of the name. */
 
-	for (cp = name; 1; cp++) {
-		namesz = cp - name;
+	cp = name;
+	namesz = 0;
+	for (;;) {
 		if (*cp == '\0')
 			break;
 		if (*cp == ' ' || *cp == '\t') {
 			cp++;
 			break;
 		}
-		if (*cp != '\\')
+		if (*cp != '\\') {
+			if (name + namesz < cp) {
+				name[namesz] = *cp;
+				*cp = ' ';
+			}
+			namesz++;
+			cp++;
 			continue;
+		}
 		if (cp[1] == '{' || cp[1] == '}')
 			break;
-		if (*++cp == '\\')
-			continue;
-		mandoc_msg(MANDOCERR_NAMESC, ln, pos,
-		    "%.*s", (int)(cp - name + 1), name);
-		mandoc_escape((const char **)&cp, NULL, NULL);
-		break;
+		if (roff_escape(cp, 0, 0, NULL, &inam,
+		    NULL, NULL, &iend) != ESCAPE_UNDEF) {
+			mandoc_msg(MANDOCERR_NAMESC, ln, pos,
+			    "%.*s%.*s", namesz, name, iend, cp);
+			cp += iend;
+			break;
+		}
+
+		/*
+		 * In an identifier, \\, \., \G and so on
+		 * are reduced to \, ., G and so on,
+		 * vaguely similar to copy mode.
+		 */
+
+		name[namesz++] = cp[inam];
+		while (iend--) {
+			if (cp >= name + namesz)
+				*cp = ' ';
+			cp++;
+		}
 	}
 
 	/* Read past spaces. */
Index: man.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/args/man.out_lint,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/roff/args/man.out_lint -Lregress/roff/args/man.out_lint -u -p -r1.5 -r1.6
--- regress/roff/args/man.out_lint
+++ regress/roff/args/man.out_lint
@@ -6,4 +6,4 @@ mandoc: man.in:87:26: STYLE: whitespace 
 mandoc: man.in:91:27: STYLE: whitespace at end of input line
 mandoc: man.in:104:5: STYLE: unterminated quoted argument
 mandoc: man.in:107:9: STYLE: unterminated quoted argument
-mandoc: man.in:131:1: ERROR: escaped character not allowed in a name: IB\(
+mandoc: man.in:131:1: ERROR: escaped character not allowed in a name: IB\(lq
Index: mdoc.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/args/mdoc.out_lint,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lregress/roff/args/mdoc.out_lint -Lregress/roff/args/mdoc.out_lint -u -p -r1.7 -r1.8
--- regress/roff/args/mdoc.out_lint
+++ regress/roff/args/mdoc.out_lint
@@ -14,4 +14,4 @@ mandoc: mdoc.in:112:5: STYLE: unterminat
 mandoc: mdoc.in:112:11: STYLE: whitespace at end of input line
 mandoc: mdoc.in:113:9: STYLE: unterminated quoted argument
 mandoc: mdoc.in:113:15: STYLE: whitespace at end of input line
-mandoc: mdoc.in:121:1: ERROR: escaped character not allowed in a name: Fl\(
+mandoc: mdoc.in:121:1: ERROR: escaped character not allowed in a name: Fl\(lq
Index: register.in
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/cond/register.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lregress/roff/cond/register.in -Lregress/roff/cond/register.in -u -p -r1.3 -r1.4
--- regress/roff/cond/register.in
+++ regress/roff/cond/register.in
@@ -1,5 +1,5 @@
-.\" $OpenBSD: register.in,v 1.3 2019/02/06 20:54:28 schwarze Exp $
-.TH REGISTER 1 "February 6, 2019"
+.\" $OpenBSD: register.in,v 1.4 2022/06/03 11:50:25 schwarze Exp $
+.TH REGISTER 1 "June 3, 2022"
 .SH NAME
 register \- conditional testing whether a register is defined
 .SH DESCRIPTION
@@ -11,10 +11,35 @@ register \- conditional testing whether 
 .el OOPS
 .if !rmyreg OOPS
 .PP
-identifier + identifier:
+tab after identifier:
 .ie rmyreg	myreg is defined
 .el OOPS
 .PP
 escape sequence after identifier:
 .ie rmyreg\(enmyreg is defined
 .el OOPS
+.PP
+backslash in name:
+.nr \\ 0
+.ie r\\ \e is defined
+.el OOPS
+.rr \\
+.if r\\ is still defined!?
+.PP
+dot in name:
+.nr . 0
+.ie r. \&. is defined
+.el OOPS
+.ie r\. \e. is defined
+.el OOPS
+.rr \.
+.if r. is still defined!?
+.PP
+invalid escape in name:
+.nr G 0
+.ie rG G is defined
+.el OOPS
+.ie r\G \eG is defined
+.el OOPS
+.rr \G
+.if rG is still defined!?
Index: string.in
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/cond/string.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lregress/roff/cond/string.in -Lregress/roff/cond/string.in -u -p -r1.4 -r1.5
--- regress/roff/cond/string.in
+++ regress/roff/cond/string.in
@@ -1,5 +1,5 @@
-.\" $OpenBSD: string.in,v 1.4 2019/02/06 20:54:28 schwarze Exp $
-.TH STRING 1 "February 6, 2019"
+.\" $OpenBSD: string.in,v 1.5 2022/06/03 11:50:25 schwarze Exp $
+.TH STRING 1 "June 3, 2022"
 .SH NAME
 string \- conditional testing whether a string is defined
 .SH DESCRIPTION
@@ -40,3 +40,28 @@ identifier and tab:
 escape sequence after identifier:
 .ie d mystr\(enmystr is defined
 .el OOPS
+.PP
+backslash in name:
+.ds \\ value
+.ie d \\ \e is defined
+.el OOPS
+.rm \\
+.if d \\ still defined!?
+.PP
+dot in name:
+.ds . value
+.ie d . \&. is defined
+.el OOPS
+.ie d \. \e. is defined
+.el OOPS
+.rm .
+.if d . still defined!?
+.PP
+invalid escape in name:
+.ds G value
+.ie d G G is defined
+.el OOPS
+.ie d \G \eG is defined
+.el OOPS
+.rm \G
+.if d G still defined!?
Index: string.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/cond/string.out_ascii,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lregress/roff/cond/string.out_ascii -Lregress/roff/cond/string.out_ascii -u -p -r1.4 -r1.5
--- regress/roff/cond/string.out_ascii
+++ regress/roff/cond/string.out_ascii
@@ -19,4 +19,10 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        escape sequence after identifier: -mystr is defined
 
-OpenBSD                        February 6, 2019                      STRING(1)
+       backslash in name: \ is defined
+
+       dot in name: . is defined \. is defined
+
+       invalid escape in name: G is defined \G is defined
+
+OpenBSD                          June 3, 2022                        STRING(1)
Index: register.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/cond/register.out_ascii,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lregress/roff/cond/register.out_ascii -Lregress/roff/cond/register.out_ascii -u -p -r1.3 -r1.4
--- regress/roff/cond/register.out_ascii
+++ regress/roff/cond/register.out_ascii
@@ -7,8 +7,14 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        not yet defined
        now defined
 
-       identifier + identifier:      myreg is defined
+       tab after identifier:    myreg is defined
 
        escape sequence after identifier: -myreg is defined
 
-OpenBSD                        February 6, 2019                    REGISTER(1)
+       backslash in name: \ is defined
+
+       dot in name: . is defined \. is defined
+
+       invalid escape in name: G is defined \G is defined
+
+OpenBSD                          June 3, 2022                      REGISTER(1)
Index: escname.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/de/escname.out_ascii,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lregress/roff/de/escname.out_ascii -Lregress/roff/de/escname.out_ascii -u -p -r1.3 -r1.4
--- regress/roff/de/escname.out_ascii
+++ regress/roff/de/escname.out_ascii
@@ -12,7 +12,18 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
      define first = val1
 
-     Values (first, second, first\second): val1 val2 val3
+     define first\.second = val_dot
+
+     define first\Gsecond = val_inval
+
+     Values:
+     first          val1
+     second         val2
+     first\second   val3
+     first.second   val_dot
+     first\.second  val_dot
+     firstGsecond   val_inval
+     first\Gsecond  val_inval
 
      Remove all but second: val2
 
@@ -20,4 +31,4 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
      final text
 
-OpenBSD                          July 4, 2017                          OpenBSD
+OpenBSD                          June 3, 2022                          OpenBSD
Index: escname.in
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/de/escname.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/roff/de/escname.in -Lregress/roff/de/escname.in -u -p -r1.2 -r1.3
--- regress/roff/de/escname.in
+++ regress/roff/de/escname.in
@@ -1,4 +1,4 @@
-.\" $OpenBSD: escname.in,v 1.4 2017/07/04 14:53:27 schwarze Exp $
+.\" $OpenBSD: escname.in,v 1.5 2022/06/03 11:50:25 schwarze Exp $
 .Dd $Mdocdate$
 .Dt DE-ESCNAME 1
 .Os
@@ -23,10 +23,33 @@ define first = val1
 val1
 ..
 .Pp
-Values (first, second, first\esecond):
+define first\e.second = val_dot
+.de first\.second
+val_dot
+..
+.Pp
+define first\eGsecond = val_inval
+.de first\Gsecond
+val_inval
+..
+.Pp
+Values:
+.Bl -tag -width first_.second -compact
+.It first
 .first
+.It second
 .second
+.It first\esecond
 .first\\second
+.It first.second
+.first.second
+.It first\e.second
+.first\.second
+.It firstGsecond
+.firstGsecond
+.It first\eGsecond
+.first\Gsecond
+.El
 .Pp
 Remove all but second:
 .rm first\\second first\esecond second
Index: escname.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/de/escname.out_lint,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lregress/roff/de/escname.out_lint -Lregress/roff/de/escname.out_lint -u -p -r1.6 -r1.7
--- regress/roff/de/escname.out_lint
+++ regress/roff/de/escname.out_lint
@@ -1,8 +1,10 @@
 mandoc: escname.in:22:2: ERROR: escaped character not allowed in a name: first\e
-mandoc: escname.in:32:19: ERROR: escaped character not allowed in a name: first\e
-mandoc: escname.in:33:2: ERROR: skipping unknown macro: .first
-mandoc: escname.in:35:2: ERROR: skipping unknown macro: .first\\second
-mandoc: escname.in:38:5: ERROR: skipping excess arguments: .de ... excess arguments
-mandoc: escname.in:41:1: ERROR: escaped character not allowed in a name: witharg\(
-mandoc: escname.in:43:1: ERROR: escaped character not allowed in a name: de\e
-mandoc: escname.in:43:2: WARNING: skipping empty request: de
+mandoc: escname.in:32:10: WARNING: undefined escape, printing literally: \G
+mandoc: escname.in:51:7: WARNING: undefined escape, printing literally: \G
+mandoc: escname.in:55:19: ERROR: escaped character not allowed in a name: first\e
+mandoc: escname.in:56:2: ERROR: skipping unknown macro: .first
+mandoc: escname.in:58:2: ERROR: skipping unknown macro: .first\second 
+mandoc: escname.in:61:5: ERROR: skipping excess arguments: .de ... excess arguments
+mandoc: escname.in:64:1: ERROR: escaped character not allowed in a name: witharg\(en
+mandoc: escname.in:66:1: ERROR: escaped character not allowed in a name: de\e
+mandoc: escname.in:66:2: WARNING: skipping empty request: de
Index: Makefile
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/ds/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/roff/ds/Makefile -Lregress/roff/ds/Makefile -u -p -r1.2 -r1.3
--- regress/roff/ds/Makefile
+++ regress/roff/ds/Makefile
@@ -1,4 +1,9 @@
-# $OpenBSD: Makefile,v 1.6 2019/02/06 20:54:28 schwarze Exp $
+# $OpenBSD: Makefile,v 1.7 2022/06/03 11:50:25 schwarze Exp $
+#
+# This directory is intended for tests of string *definitions*,
+# in particular testing the behaviour of the .ds and .as macros.
+# Tests of string *expansion* are better placed in the roff/string
+# directory.
 
 REGRESS_TARGETS = append escname nested quoting tab
 
Index: Makefile
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/string/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lregress/roff/string/Makefile -Lregress/roff/string/Makefile -u -p -r1.4 -r1.5
--- regress/roff/string/Makefile
+++ regress/roff/string/Makefile
@@ -1,4 +1,9 @@
-# $OpenBSD: Makefile,v 1.6 2014/07/06 19:08:57 schwarze Exp $
+# $OpenBSD: Makefile,v 1.10 2022/06/03 11:50:25 schwarze Exp $
+#
+# This directory is intended for tests of string *expansion*,
+# in particular testing the behaviour of the \* escape sequence.
+# Tests of string *definitions* are better placed in the roff/ds
+# directory.
 
 REGRESS_TARGETS	 = dotT escape infinite name std undef zerolength
 LINT_TARGETS	 = name std undef
Index: name.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/string/name.out_lint,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lregress/roff/string/name.out_lint -Lregress/roff/string/name.out_lint -u -p -r1.7 -r1.8
--- regress/roff/string/name.out_lint
+++ regress/roff/string/name.out_lint
@@ -1,16 +1,17 @@
 mandoc: name.in:11:5: ERROR: escaped character not allowed in a name: bs\e
-mandoc: name.in:13:5: ERROR: escaped character not allowed in a name: bl\ 
-mandoc: name.in:16:29: WARNING: invalid escape sequence: \*[norm
-mandoc: name.in:16:28: STYLE: whitespace at end of input line
-mandoc: name.in:18:7: WARNING: undefined string, using "": quot
-mandoc: name.in:18:6: STYLE: whitespace at end of input line
-mandoc: name.in:26:6: WARNING: undefined string, using "": bse
-mandoc: name.in:26:5: STYLE: whitespace at end of input line
-mandoc: name.in:28:5: WARNING: undefined string, using "": bs
-mandoc: name.in:28:4: STYLE: whitespace at end of input line
-mandoc: name.in:32:7: WARNING: undefined string, using "": bl e
-mandoc: name.in:32:6: STYLE: whitespace at end of input line
-mandoc: name.in:34:6: WARNING: undefined string, using "": ble
-mandoc: name.in:34:5: STYLE: whitespace at end of input line
-mandoc: name.in:36:5: WARNING: undefined string, using "": bl
-mandoc: name.in:36:4: STYLE: whitespace at end of input line
+mandoc: name.in:14:5: ERROR: escaped character not allowed in a name: bl\ 
+mandoc: name.in:18:29: WARNING: invalid escape sequence: \*[norm
+mandoc: name.in:18:28: STYLE: whitespace at end of input line
+mandoc: name.in:20:7: WARNING: undefined string, using "": quot
+mandoc: name.in:20:6: STYLE: whitespace at end of input line
+mandoc: name.in:28:6: WARNING: undefined string, using "": bse
+mandoc: name.in:28:5: STYLE: whitespace at end of input line
+mandoc: name.in:30:5: WARNING: undefined string, using "": bs
+mandoc: name.in:30:4: STYLE: whitespace at end of input line
+mandoc: name.in:38:7: WARNING: undefined string, using "": bl e
+mandoc: name.in:38:6: STYLE: whitespace at end of input line
+mandoc: name.in:40:6: WARNING: undefined string, using "": ble
+mandoc: name.in:40:5: STYLE: whitespace at end of input line
+mandoc: name.in:42:5: WARNING: undefined string, using "": bl
+mandoc: name.in:42:4: STYLE: whitespace at end of input line
+mandoc: name.in:46:19: WARNING: undefined escape, printing literally: \G
Index: name.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/string/name.out_ascii,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/roff/string/name.out_ascii -Lregress/roff/string/name.out_ascii -u -p -r1.2 -r1.3
--- regress/roff/string/name.out_ascii
+++ regress/roff/string/name.out_ascii
@@ -11,8 +11,12 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
      bs\\e: value of bs\\e
      bse:
      bs:
+     dot.: value of dot.
+     dot\.: value of dot.
      bl e:
      ble:
      bl:
+     inval\\G: value of inval\G
+     inval\G: value of inval\G
 
-OpenBSD                          July 4, 2017                          OpenBSD
+OpenBSD                          June 3, 2022                          OpenBSD
Index: name.in
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/roff/string/name.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/roff/string/name.in -Lregress/roff/string/name.in -u -p -r1.2 -r1.3
--- regress/roff/string/name.in
+++ regress/roff/string/name.in
@@ -1,4 +1,4 @@
-.\" $OpenBSD: name.in,v 1.4 2017/07/04 14:53:27 schwarze Exp $
+.\" $OpenBSD: name.in,v 1.5 2022/06/03 11:50:25 schwarze Exp $
 .Dd $Mdocdate$
 .Dt STRING-NAME 1
 .Os
@@ -10,7 +10,9 @@
 .ds "quot" value of "quot"
 .ds bs\e value of bs\ee
 .ds bs\\e value of bs\e\ee
+.ds dot. value of dot.
 .ds bl\ e value of bl\e e
+.ds inval\\G value of inval\eG
 norm: \*[norm]
 .br
 norm without closing brace: \*[norm
@@ -26,6 +28,10 @@ bs\e\ee: \*[bs\\e]
 bse: \*[bse]
 .br
 bs: \*[bs]
+.br
+dot.: \*[dot.]
+.br
+dot\e.: \*[dot\.]
 .\".br
 .\"bl\e e: \*[bl\ e]
 .br
@@ -34,3 +40,7 @@ bl e: \*[bl e]
 ble: \*[ble]
 .br
 bl: \*[bl]
+.br
+inval\e\eG: \*[inval\\G]
+.br
+inval\eG: \*[inval\G]
--
 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-03 12:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03 12:16 mandoc: During identifier parsing, handle undefined escape sequences in 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).