summaryrefslogtreecommitdiffstatshomepage
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
commit666e0d666a17110642c5f1ae87cb40d00173432a (patch)
treeaa3d6404b432111c434bd5973d2d9313ec761669 /mdoc_html.c
parent54ddd313a40e4bd0938e09253d80cf14064e78f6 (diff)
downloadmandoc-666e0d666a17110642c5f1ae87cb40d00173432a.tar.gz
mandoc-666e0d666a17110642c5f1ae87cb40d00173432a.tar.zst
mandoc-666e0d666a17110642c5f1ae87cb40d00173432a.zip
Added initial -man framework for -Thtml.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 7b472aeb..2a0b1529 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.19 2009/10/03 19:02:45 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.20 2009/10/03 19:57:53 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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);
}