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 p4HBcJUc009666 for ; Tue, 17 May 2011 07:38:19 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id p4HBcIke022621; Tue, 17 May 2011 07:38:18 -0400 (EDT) Date: Tue, 17 May 2011 07:38:18 -0400 (EDT) Message-Id: <201105171138.p4HBcIke022621@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: Clean-up fallout: differentiate ID's and HREF's (where to put X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Clean-up fallout: differentiate ID's and HREF's (where to put the `#'). Make buffmt functions internally bufinit(), too. Modified Files: -------------- mdocml: html.c mdoc_html.c Revision Data ------------- Index: html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/html.c,v retrieving revision 1.142 retrieving revision 1.143 diff -Lhtml.c -Lhtml.c -u -p -r1.142 -r1.143 --- html.c +++ html.c @@ -656,6 +656,7 @@ buffmt_includes(struct html *h, const ch pp = h->base_includes; + bufinit(h); while (NULL != (p = strchr(pp, '%'))) { bufncat(h, pp, (size_t)(p - pp)); switch (*(p + 1)) { @@ -680,7 +681,7 @@ buffmt_man(struct html *h, pp = h->base_man; - /* LINTED */ + bufinit(h); while (NULL != (p = strchr(pp, '%'))) { bufncat(h, pp, (size_t)(p - pp)); switch (*(p + 1)) { @@ -718,8 +719,6 @@ bufcat_id(struct html *h, const char *sr /* Cf. . */ - if (0 == h->buflen) - bufcat(h, "#x"); while ('\0' != *src) bufcat_fmt(h, "%.2x", *src++); } Index: mdoc_html.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v retrieving revision 1.168 retrieving revision 1.169 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.168 -r1.169 --- mdoc_html.c +++ mdoc_html.c @@ -1171,6 +1171,7 @@ mdoc_sx_pre(MDOC_ARGS) struct htmlpair tag[2]; bufinit(h); + bufcat(h, "#x"); for (n = n->child; n; n = n->next) { bufcat_id(h, n->string); if (n->next) -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv