summaryrefslogtreecommitdiffstats
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
commit54bada649de2dc93dd974dabdb3c9a3c732571f5 (patch)
treec6232a3224f4c599fc64f935d85a38c77758952c /html.c
parent30fcd4b7eb064dd0029d7fc6e60afc9b973015cb (diff)
downloadmandoc-54bada649de2dc93dd974dabdb3c9a3c732571f5.tar.gz
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.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/html.c b/html.c
index 2b9e6057..cb175d88 100644
--- a/html.c
+++ b/html.c
@@ -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);
- }
}