summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2011-03-07 01:35:33 +0000
committerschwarze <schwarze@openbsd.org>2011-03-07 01:35:33 +0000
commitb058e777acbf34e2fc7e3eb7c4d67c742d4c66ae (patch)
tree9bec3dc1880da1266da68c4e7bb56b092857c65e /usr.bin/mandoc/man_html.c
parentThe global_int information acpi collects is not used by amd64. (diff)
downloadwireguard-openbsd-b058e777acbf34e2fc7e3eb7c4d67c742d4c66ae.tar.xz
wireguard-openbsd-b058e777acbf34e2fc7e3eb7c4d67c742d4c66ae.zip
Clean up date handling,
as a first step to get rid of the frequent petty warnings in this area: - always store dates as strings, not as seconds since the Epoch - for input, try the three most common formats everywhere - for unrecognized format, just pass the date though verbatim - when there is no date at all, still use the current date Originally triggered by a one-line patch from Tim van der Molen, <tbvdm at xs4all dot nl>, which is included here. Feedback and OK on manual parts from jmc@. "please check this in" kristaps@
Diffstat (limited to 'usr.bin/mandoc/man_html.c')
-rw-r--r--usr.bin/mandoc/man_html.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c
index 046e22af34d..41550ff5048 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.34 2011/01/17 00:15:19 schwarze Exp $ */
+/* $Id: man_html.c,v 1.35 2011/03/07 01:35:33 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -330,12 +330,6 @@ man_root_post(MAN_ARGS)
{
struct htmlpair tag[3];
struct tag *t, *tt;
- char b[DATESIZ];
-
- if (m->rawdate)
- strlcpy(b, m->rawdate, DATESIZ);
- else
- time2a(m->date, b, DATESIZ);
PAIR_SUMMARY_INIT(&tag[0], "Document Footer");
PAIR_CLASS_INIT(&tag[1], "foot");
@@ -353,7 +347,7 @@ man_root_post(MAN_ARGS)
PAIR_CLASS_INIT(&tag[0], "foot-date");
print_otag(h, TAG_TD, 1, tag);
- print_text(h, b);
+ print_text(h, m->date);
print_stagq(h, tt);
PAIR_CLASS_INIT(&tag[0], "foot-os");