On Sun, Jun 14, 2009 at 05:00:57PM -0600, Ingo Schwarze wrote:
> CVSROOT: /cvs
> Module name: src
> Changes by: [email protected] 2009/06/14 17:00:57
>
> Modified files:
> usr.bin/mandoc : arch.c arch.in ascii.c ascii.in att.c att.in
> lib.c lib.in libman.h libmdoc.h main.c man.3
> man.7 man.c man.h man_action.c man_hash.c
> man_macro.c man_term.c man_validate.c mandoc.1
> mandoc_char.7 manuals.7 mdoc.3 mdoc.7 mdoc.c
> mdoc.h mdoc_action.c mdoc_argv.c mdoc_hash.c
> mdoc_macro.c mdoc_strings.c mdoc_term.c
> mdoc_validate.c msec.c msec.in st.c st.in
> term.c term.h tree.c vol.c vol.in
>
> Log message:
> sync to 1.7.16: comments, whitespace and spelling fixes; no functional change
appears to be false.
--- src/usr.bin/mandoc/mdoc_strings.c 2009/04/06 21:30:40 1.1
+++ src/usr.bin/mandoc/mdoc_strings.c 2009/06/15 00:00:57 1.2
...
@@ -208,9 +206,9 @@ mdoc_atotime(const char *p)
(void)memset(&tm, 0, sizeof(struct tm));
- if (0 == strcmp(p, "$Mdocdate$"))
+ if (0 == strcmp(p, "$Mdocdate: April 6 2009 $"))
return(time(NULL));
- if ((pp = strptime(p, "$Mdocdate: %b %d %Y $", &tm)) && 0 == *pp)
+ if ((pp = strptime(p, "$Mdocdate: April 6 2009 $", &tm)) && 0 == *pp)
return(mktime(&tm));
/* XXX - this matches "June 1999", which is wrong. */
if ((pp = strptime(p, "%b %d %Y", &tm)) && 0 == *pp)
ok?
Index: mdoc_strings.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/mdoc_strings.c,v
retrieving revision 1.2
diff -u -d -p -8 -r1.2 mdoc_strings.c
--- mdoc_strings.c 14 Jun 2009 23:00:57 -0000 1.2
+++ mdoc_strings.c 15 Jun 2009 02:18:56 -0000
@@ -201,19 +201,19 @@ mdoc_atosec(const char *p)
time_t
mdoc_atotime(const char *p)
{
struct tm tm;
char *pp;
(void)memset(&tm, 0, sizeof(struct tm));
- if (0 == strcmp(p, "$Mdocdate: June 14 2009 $"))
+ if (0 == strcmp(p, "$" "Mdocdate$"))
return(time(NULL));
- if ((pp = strptime(p, "$Mdocdate: June 14 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)
return(mktime(&tm));
if ((pp = strptime(p, "%b %d, %Y", &tm)) && 0 == *pp)
return(mktime(&tm));
return(0);