summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_strings.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2009-06-15 03:42:51 +0000
committerschwarze <schwarze@openbsd.org>2009-06-15 03:42:51 +0000
commitb8f4080da07c6b9d2724f930cdf59fe14d1fbc9a (patch)
treeac569f73afb50a84cafe2ca57d016c02ecf1c232 /usr.bin/mandoc/mdoc_strings.c
parentsync to 1.7.16: an output function is the wrong place for validation code (diff)
downloadwireguard-openbsd-b8f4080da07c6b9d2724f930cdf59fe14d1fbc9a.tar.xz
wireguard-openbsd-b8f4080da07c6b9d2724f930cdf59fe14d1fbc9a.zip
fix Mdocdate broken in rev 1.2;
noticed by and patch from cnst@, thanks! ok sthen@
Diffstat (limited to 'usr.bin/mandoc/mdoc_strings.c')
-rw-r--r--usr.bin/mandoc/mdoc_strings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_strings.c b/usr.bin/mandoc/mdoc_strings.c
index fce9e6f37fe..8efb68018cf 100644
--- a/usr.bin/mandoc/mdoc_strings.c
+++ b/usr.bin/mandoc/mdoc_strings.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_strings.c,v 1.3 2009/06/15 01:36:23 schwarze Exp $ */
+/* $Id: mdoc_strings.c,v 1.4 2009/06/15 03:42:51 schwarze Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -210,9 +210,9 @@ mdoc_atotime(const char *p)
(void)memset(&tm, 0, sizeof(struct tm));
- if (0 == strcmp(p, "$Mdocdate: June 15 2009 $"))
+ if (0 == strcmp(p, "$" "Mdocdate$"))
return(time(NULL));
- if ((pp = strptime(p, "$Mdocdate: June 15 2009 $", &tm)) && 0 == *pp)
+ if ((pp = strptime(p, "$" "Mdocdate: %b %d %Y $", &tm)) && 0 == *pp)
return(mktime(&tm));
/* XXX - this matches "June 1999", which is wrong. */
if ((pp = strptime(p, "%b %d %Y", &tm)) && 0 == *pp)