From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24750 invoked from network); 27 Aug 2020 12:59:37 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 27 Aug 2020 12:59:37 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 9bda0d75 for ; Thu, 27 Aug 2020 07:59:32 -0500 (EST) Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id 70344bb5 for ; Thu, 27 Aug 2020 07:59:32 -0500 (EST) Date: Thu, 27 Aug 2020 07:59:32 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Avoid artifacts in the most common case of closing conditional X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: Log Message: ----------- Avoid artifacts in the most common case of closing conditional blocks when no arguments follow the closing brace, \}. For example, the line "'br\}" contained in the pod2man(1) preamble would throw a bogus "escaped character not allowed in a name" error. This issue was originally reported by Chris Bennett on ports@, and afresh1@ noticed it came from the pod2man(1) preamble. Modified Files: -------------- mandoc: roff.c Revision Data ------------- Index: roff.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/roff.c,v retrieving revision 1.375 retrieving revision 1.376 diff -Lroff.c -Lroff.c -u -p -r1.375 -r1.376 --- roff.c +++ roff.c @@ -2362,7 +2362,9 @@ roff_cond_checkend(ROFF_ARGS) while ((ep = strchr(ep, '\\')) != NULL) { switch (ep[1]) { case '}': - if (rr) + if (ep[2] == '\0') + ep[0] = '\0'; + else if (rr) ep[1] = '&'; else memmove(ep, ep + 2, strlen(ep + 2) + 1); -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv