summaryrefslogtreecommitdiffstats
path: root/html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-17 11:38:18 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-17 11:38:18 +0000
commit8cd2f76125361d3c04dd2730e7748c925a33d2a2 (patch)
treec2be005cd67c0fd9170a7e3b36b5207b1eb9baf9 /html.c
parent76be1e51fc96ec5836c6a7b70dbb91beed5c8635 (diff)
downloadmandoc-8cd2f76125361d3c04dd2730e7748c925a33d2a2.tar.gz
Clean-up fallout: differentiate ID's and HREF's (where to put the `#').
Make buffmt functions internally bufinit(), too.
Diffstat (limited to 'html.c')
-rw-r--r--html.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/html.c b/html.c
index e8801610..6313e4c3 100644
--- a/html.c
+++ b/html.c
@@ -656,6 +656,7 @@ buffmt_includes(struct html *h, const char *name)
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 *src)
/* Cf. <http://www.w3.org/TR/html4/types.html#h-6.2>. */
- if (0 == h->buflen)
- bufcat(h, "#x");
while ('\0' != *src)
bufcat_fmt(h, "%.2x", *src++);
}