=================================================================== RCS file: /cvs/mandoc/man_html.c,v retrieving revision 1.10 retrieving revision 1.13 diff -u -p -r1.10 -r1.13 --- mandoc/man_html.c 2009/10/13 10:57:25 1.10 +++ mandoc/man_html.c 2009/10/24 05:45:04 1.13 @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.10 2009/10/13 10:57:25 kristaps Exp $ */ +/* $Id: man_html.c,v 1.13 2009/10/24 05:45:04 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -30,6 +30,7 @@ #include "main.h" /* TODO: preserve ident widths. */ +/* FIXME: have PD set the default vspace width. */ #define INDENT 5 #define HALFINDENT 3 @@ -104,6 +105,7 @@ static const struct htmlman mans[MAN_MAX] = { { man_RS_pre, NULL }, /* RS */ { man_ign_pre, NULL }, /* DT */ { man_ign_pre, NULL }, /* UC */ + { man_ign_pre, NULL }, /* PD */ }; @@ -222,7 +224,7 @@ a2width(const struct man_node *n, struct roffsu *su) if (MAN_TEXT != n->type) return(0); - if (a2roffsu(n->string, su)) + if (a2roffsu(n->string, su, SCALE_BU)) return(1); return(0); @@ -281,16 +283,12 @@ man_root_pre(MAN_ARGS) static void man_root_post(MAN_ARGS) { - struct tm tm; struct htmlpair tag[2]; struct tag *t, *tt; - char b[BUFSIZ]; + char b[DATESIZ]; - (void)localtime_r(&m->date, &tm); + time2a(m->date, b, DATESIZ); - if (0 == strftime(b, BUFSIZ - 1, "%B %e, %Y", &tm)) - err(EXIT_FAILURE, "strftime"); - PAIR_CLASS_INIT(&tag[0], "footer"); bufcat_style(h, "width", "100%"); PAIR_STYLE_INIT(&tag[1], h); @@ -325,11 +323,9 @@ man_br_pre(MAN_ARGS) SCALE_VS_INIT(&su, 1); - if (MAN_sp == n->tok) { - su.scale = 1; - if (n->child) - a2roffsu(n->child->string, &su); - } else if (MAN_br == n->tok) + if (MAN_sp == n->tok && n->child) + a2roffsu(n->child->string, &su, SCALE_VS); + else if (MAN_br == n->tok) su.scale = 0; bufcat_su(h, "height", &su);