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.5/8.14.5) with ESMTP id s31BwXIu023510 for ; Tue, 1 Apr 2014 07:58:33 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s31BwWlV018421; Tue, 1 Apr 2014 07:58:32 -0400 (EDT) Date: Tue, 1 Apr 2014 07:58:32 -0400 (EDT) Message-Id: <201404011158.s31BwWlV018421@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: pod2mdoc: Remove a condition branch already accepted at the start of X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Remove a condition branch already accepted at the start of loop. Modified Files: -------------- pod2mdoc: pod2mdoc.c Revision Data ------------- Index: pod2mdoc.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/pod2mdoc/pod2mdoc.c,v retrieving revision 1.11 retrieving revision 1.12 diff -Lpod2mdoc.c -Lpod2mdoc.c -u -p -r1.11 -r1.12 --- pod2mdoc.c +++ pod2mdoc.c @@ -817,6 +817,26 @@ ordinary(struct state *st, const char *b printf("\\&"); else if ('\n' == last && '\'' == buf[start]) printf("\\&"); +#if notyet + /* + * If we're in the SYNOPSIS, have square + * brackets indicate that we're opening and + * closing an optional context. + */ + if (SECT_SYNOPSIS == st->sect) { + if ('[' == buf[start] || + ']' == buf[start]) { + if (last != '\n') + putchar('\n'); + if ('[' == buf[start]) + printf(".Oo\n"); + else + printf(".Oc\n"); + start++; + continue; + } + } +#endif putchar(last = buf[start++]); if ('\\' == last) putchar('e'); @@ -861,19 +881,7 @@ ordinary(struct state *st, const char *b for ( ; start < end; start++) if (' ' != buf[start] && '\t' != buf[start]) break; - } else if (start < end) { - /* - * Default: print the character. - * Escape initial control characters. - */ - if ('\n' == last && '.' == buf[start]) - printf("\\&"); - else if ('\n' == last && '\'' == buf[start]) - printf("\\&"); - putchar(last = buf[start++]); - if ('\\' == last) - putchar('e'); - } + } } if (last != '\n') -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv