summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-03 19:57:53 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-03 19:57:53 +0000
commitbb9117cebf92c336a1e35630fabcf98352ffda47 (patch)
tree708e4094eb82c6ba3f6b28c2d1e0ac9aecbd1234 /mdoc_html.c
parenta2f67c7d18ceda8536106b49b654d813a881dbd0 (diff)
downloadmandoc-bb9117cebf92c336a1e35630fabcf98352ffda47.tar.gz
Added initial -man framework for -Thtml.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 71808ddf..9d55ed2b 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -35,9 +35,6 @@
#define MDOC_ARGS const struct mdoc_meta *m, \
const struct mdoc_node *n, \
struct html *h
-#define MAN_ARGS const struct man_meta *m, \
- const struct man_node *n, \
- struct html *h
struct htmlmdoc {
int (*pre)(MDOC_ARGS);
@@ -385,21 +382,19 @@ print_mdoc(MDOC_ARGS)
static void
print_mdoc_head(MDOC_ARGS)
{
- char b[BUFSIZ];
print_gen_head(h);
-
- (void)snprintf(b, BUFSIZ - 1,
- "%s(%d)", m->title, m->msec);
+ bufinit(h);
+ buffmt(h, "%s(%d)", m->title, m->msec);
if (m->arch) {
- (void)strlcat(b, " (", BUFSIZ);
- (void)strlcat(b, m->arch, BUFSIZ);
- (void)strlcat(b, ")", BUFSIZ);
+ bufcat(h, " (");
+ bufcat(h, m->arch);
+ bufcat(h, ")");
}
print_otag(h, TAG_TITLE, 0, NULL);
- print_text(h, b);
+ print_text(h, h->buf);
}