summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-06-15 09:38:37 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-06-15 09:38:37 +0000
commitb955ea9093c1ade9ae232421ae55b82809cf9e4a (patch)
treecc8060a1fd04213ee67c3f11d4f3f18004597b21
parentd2280c862b0576241c723c71f40436361ca783d0 (diff)
downloadmandoc-b955ea9093c1ade9ae232421ae55b82809cf9e4a.tar.gz
mandoc-b955ea9093c1ade9ae232421ae55b82809cf9e4a.tar.zst
mandoc-b955ea9093c1ade9ae232421ae55b82809cf9e4a.zip
Mdocdate fix (literals being replaced) ({cnst,schwarze}@openbsd.org).
-rw-r--r--mdoc_strings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mdoc_strings.c b/mdoc_strings.c
index a9abe0bf..ba9701ef 100644
--- a/mdoc_strings.c
+++ b/mdoc_strings.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_strings.c,v 1.4 2009/06/12 12:40:44 kristaps Exp $ */
+/* $Id: mdoc_strings.c,v 1.5 2009/06/15 09:38:37 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -216,9 +216,9 @@ mdoc_atotime(const char *p)
(void)memset(&tm, 0, sizeof(struct tm));
- if (0 == strcmp(p, "$Mdocdate: June 12 2009 $"))
+ if (0 == strcmp(p, "$" "Mdocdate$"))
return(time(NULL));
- if ((pp = strptime(p, "$Mdocdate: June 12 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)