From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s27IUBXk000493 for ; Fri, 7 Mar 2014 13:30:12 -0500 (EST) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s27IUBBs012259; Fri, 7 Mar 2014 13:30:11 -0500 (EST) Date: Fri, 7 Mar 2014 13:30:11 -0500 (EST) Message-Id: <201403071830.s27IUBBs012259@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Even on macro lines, \} must not cause whitespace. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Even on macro lines, \} must not cause whitespace. Modified Files: -------------- mdocml: roff.c Revision Data ------------- Index: roff.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v retrieving revision 1.195 retrieving revision 1.196 diff -Lroff.c -Lroff.c -u -p -r1.195 -r1.196 --- roff.c +++ roff.c @@ -1070,25 +1070,21 @@ roff_cond_sub(ROFF_ARGS) ln, ppos, pos, offs)); } + /* + * If `\}' occurs on a macro line without a preceding macro, + * drop the line completely. + */ + + ep = *bufp + pos; + if ('\\' == ep[0] && '}' == ep[1]) + rr = ROFFRULE_DENY; + /* Always check for the closing delimiter `\}'. */ - ep = &(*bufp)[pos]; while (NULL != (ep = strchr(ep, '\\'))) { if ('}' != *(++ep)) continue; - - /* - * If we're at the end of line, then just chop - * off the \} and resize the buffer. - * If we aren't, then convert it to spaces. - */ - - if ('\0' == *(ep + 1)) { - *--ep = '\0'; - *szp -= 2; - } else - *(ep - 1) = *ep = ' '; - + *ep = '&'; roff_ccond(r, ln, pos); } return(ROFFRULE_DENY == rr ? ROFF_IGN : ROFF_CONT); -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv