From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o7TBTpLf002002 for ; Sun, 29 Aug 2010 07:29:52 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o7TBTpAI006784; Sun, 29 Aug 2010 07:29:51 -0400 (EDT) Date: Sun, 29 Aug 2010 07:29:51 -0400 (EDT) Message-Id: <201008291129.o7TBTpAI006784@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Allow `.xx\}' where xx is a macro (e.g., `.br\}') to close X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Allow `.xx\}' where xx is a macro (e.g., `.br\}') to close scope. This is experimental and hasn't been rigorously tested. It's only implemented in -mdoc for the time being. This is absolutely required for pod2man. It does, however, make the pod2man preamble be processed in full. Modified Files: -------------- mdocml: mdoc.c roff.c Revision Data ------------- Index: mdoc.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.c,v retrieving revision 1.163 retrieving revision 1.164 diff -Lmdoc.c -Lmdoc.c -u -p -r1.163 -r1.164 --- mdoc.c +++ mdoc.c @@ -758,11 +758,14 @@ mdoc_pmacro(struct mdoc *m, int ln, char /* * Copy the first word into a nil-terminated buffer. - * Stop copying when a tab, space, or eoln is encountered. + * Stop copying when a tab, space, backslash, or eoln is encountered. */ j = 0; - while (j < 4 && '\0' != buf[i] && ' ' != buf[i] && '\t' != buf[i]) + while (j < 4 && '\0' != buf[i] && + ' ' != buf[i] && + '\t' != buf[i] && + '\\' != buf[i]) mac[j++] = buf[i++]; mac[j] = '\0'; Index: roff.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v retrieving revision 1.99 retrieving revision 1.100 diff -Lroff.c -Lroff.c -u -p -r1.99 -r1.100 --- roff.c +++ roff.c @@ -59,7 +59,7 @@ enum rofft { ROFF_rm, ROFF_tr, ROFF_cblock, - ROFF_ccond, + ROFF_ccond, /* FIXME: remove this. */ ROFF_nr, ROFF_MAX }; @@ -764,8 +764,13 @@ roff_cond_sub(ROFF_ARGS) if (l != r->last) return(ROFFRULE_DENY == rr ? ROFF_IGN : ROFF_CONT); - if (ROFF_MAX == (t = roff_parse(*bufp, &pos))) + if (ROFF_MAX == (t = roff_parse(*bufp, &pos))) { + if ('\\' == (*bufp)[pos] && '}' == (*bufp)[pos + 1]) + return(roff_ccond + (r, ROFF_ccond, bufp, szp, + ln, pos, pos + 2, offs)); return(ROFFRULE_DENY == rr ? ROFF_IGN : ROFF_CONT); + } /* * A denied conditional must evaluate its children if and only @@ -796,6 +801,8 @@ roff_cond_text(ROFF_ARGS) * We display the value of the text if out current evaluation * scope permits us to do so. */ + + /* FIXME: use roff_ccond? */ st = &(*bufp)[pos]; if (NULL == (ep = strstr(st, "\\}"))) { -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv