-/* $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>
pp = h->base_includes;
+ bufinit(h);
while (NULL != (p = strchr(pp, '%'))) {
bufncat(h, pp, (size_t)(p - pp));
switch (*(p + 1)) {
pp = h->base_man;
- /* LINTED */
+ bufinit(h);
while (NULL != (p = strchr(pp, '%'))) {
bufncat(h, pp, (size_t)(p - pp));
switch (*(p + 1)) {
/* 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++);
}
-/* $Id: mdoc_html.c,v 1.168 2011/05/17 11:34:31 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.169 2011/05/17 11:38:18 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
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)