diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-17 11:38:18 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-17 11:38:18 +0000 |
commit | 6fcb5ea18d95e1cc79dd37b4e2860f4e8c898346 (patch) | |
tree | 001b9509866a90900caff140d31ce5554f3cfd79 /html.c | |
parent | ed7b34daec8f64113849ed8b3d816f617cdf3983 (diff) | |
download | mandoc-6fcb5ea18d95e1cc79dd37b4e2860f4e8c898346.tar.gz mandoc-6fcb5ea18d95e1cc79dd37b4e2860f4e8c898346.tar.zst mandoc-6fcb5ea18d95e1cc79dd37b4e2860f4e8c898346.zip |
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.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.142 2011/05/17 11:34:31 kristaps Exp $ */ +/* $Id: html.c,v 1.143 2011/05/17 11:38:18 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -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++); } |