summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_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/mdoc_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/mdoc_html.c')
-rw-r--r--usr.bin/mandoc/mdoc_html.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index 05f636d3008..dbe71377153 100644
--- a/usr.bin/mandoc/mdoc_html.c
+++ b/usr.bin/mandoc/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.52 2011/02/06 22:56:45 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.53 2011/03/07 01:35:33 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -488,9 +488,6 @@ mdoc_root_post(MDOC_ARGS)
{
struct htmlpair tag[3];
struct tag *t, *tt;
- char b[DATESIZ];
-
- time2a(m->date, b, DATESIZ);
PAIR_SUMMARY_INIT(&tag[0], "Document Footer");
PAIR_CLASS_INIT(&tag[1], "foot");
@@ -510,7 +507,7 @@ mdoc_root_post(MDOC_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");