diff options
author | 2009-10-27 21:40:07 +0000 | |
---|---|---|
committer | 2009-10-27 21:40:07 +0000 | |
commit | b822ca0d77807d44eec5a00444afad079a24e43c (patch) | |
tree | 61739724919c5c74eb5ced4fd954890ec97056bc /usr.bin/mandoc/man_html.c | |
parent | update moduli file; ok deraadt (diff) | |
download | wireguard-openbsd-b822ca0d77807d44eec5a00444afad079a24e43c.tar.xz wireguard-openbsd-b822ca0d77807d44eec5a00444afad079a24e43c.zip |
sync to 1.9.11: adapt printing of dates to groff conventions,
NetBSD portability fixes and some minor bugfixes and feature enhancements;
also checked that my hyphenation code still works on top of this
Diffstat (limited to 'usr.bin/mandoc/man_html.c')
-rw-r--r-- | usr.bin/mandoc/man_html.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c index 15349ccb28c..d01bc1619e8 100644 --- a/usr.bin/mandoc/man_html.c +++ b/usr.bin/mandoc/man_html.c @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.1 2009/10/21 19:13:50 schwarze Exp $ */ +/* $Id: man_html.c,v 1.2 2009/10/27 21:40:07 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -15,7 +15,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include <sys/types.h> -#include <sys/queue.h> #include <assert.h> #include <ctype.h> @@ -30,6 +29,7 @@ #include "main.h" /* TODO: preserve ident widths. */ +/* FIXME: have PD set the default vspace width. */ #define INDENT 5 #define HALFINDENT 3 @@ -99,6 +99,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 */ }; @@ -173,7 +174,7 @@ print_man_node(MAN_ARGS) struct tag *t; child = 1; - t = SLIST_FIRST(&h->tags); + t = h->tags.head; bufinit(h); @@ -276,15 +277,11 @@ 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); - - if (0 == strftime(b, BUFSIZ - 1, "%B %e, %Y", &tm)) - err(EXIT_FAILURE, "strftime"); + time2a(m->date, b, DATESIZ); PAIR_CLASS_INIT(&tag[0], "footer"); bufcat_style(h, "width", "100%"); |