summaryrefslogtreecommitdiffstatshomepage
path: root/html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-10-03 15:08:09 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-10-03 15:08:09 +0000
commit224d010444ff10359e8d1c19e8739476b1e8f0f9 (patch)
tree6a6183a1dbc32d1b933007a67f7615cc989226d4 /html.c
parentccb56233c5986fe4875341405f85b15dcb2e946f (diff)
downloadmandoc-224d010444ff10359e8d1c19e8739476b1e8f0f9.tar.gz
mandoc-224d010444ff10359e8d1c19e8739476b1e8f0f9.tar.zst
mandoc-224d010444ff10359e8d1c19e8739476b1e8f0f9.zip
Element tag buffer is now part of struct html.
buffmt() can be called in sequence. Noted BUFSIZ-sized buffer in CAVEATS (attribute length for link formats). Added -oman=FMT -Thtml option for `Xr' manual links. Removed -obase=URI -Thtml option (obsolete).
Diffstat (limited to 'html.c')
-rw-r--r--html.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/html.c b/html.c
index 426624a4..ae7c50b8 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.52 2009/09/24 09:50:31 kristaps Exp $ */
+/* $Id: html.c,v 1.53 2009/10/03 15:08:09 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -83,10 +83,10 @@ void *
html_alloc(char *outopts)
{
struct html *h;
- char *toks[3], *v;
+ char *toks[4], *v;
toks[0] = "style";
- toks[1] = "base";
+ toks[1] = "man";
toks[2] = NULL;
if (NULL == (h = calloc(1, sizeof(struct html))))
@@ -100,13 +100,15 @@ html_alloc(char *outopts)
return(NULL);
}
+ h->base_man = "%N.%S.html";
+
while (outopts && *outopts)
switch (getsubopt(&outopts, toks, &v)) {
case (0):
h->style = v;
break;
case (1):
- h->base = v;
+ h->base_man = v;
break;
default:
break;
@@ -137,8 +139,11 @@ html_free(void *p)
free(tag);
}
+ if (h->buf)
+ free(h->buf);
if (h->symtab)
chars_free(h->symtab);
+
free(h);
}
@@ -171,12 +176,6 @@ print_gen_head(struct html *h)
tag[3].val = "all";
print_otag(h, TAG_LINK, 4, tag);
}
-
- if (h->base) {
- tag[0].key = ATTR_HREF;
- tag[1].val = h->base;
- print_otag(h, TAG_BASE, 1, tag);
- }
}