CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2022/06/03 05:50:25
Modified files: usr.bin/mandoc : roff.c regress/usr.bin/mandoc/roff/args: man.out_lint mdoc.out_lint regress/usr.bin/mandoc/roff/cond: register.in register.out_ascii string.in string.out_ascii regress/usr.bin/mandoc/roff/de: escname.in escname.out_ascii escname.out_lint regress/usr.bin/mandoc/roff/ds: Makefile regress/usr.bin/mandoc/roff/nr: escname.in escname.out_ascii escname.out_lint regress/usr.bin/mandoc/roff/string: Makefile name.in name.out_ascii name.out_lint 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.