diff options
Diffstat (limited to 'strings.c')
-rw-r--r-- | strings.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: strings.c,v 1.13 2009/02/21 21:00:06 kristaps Exp $ */ +/* $Id: strings.c,v 1.14 2009/02/23 12:45:19 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -21,10 +21,14 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -#ifndef __OpenBSD__ +#ifdef __linux__ #include <time.h> #endif +/* + * Convert scalars to and from string format. + */ + #include "private.h" #ifdef __linux__ @@ -128,9 +132,9 @@ mdoc_atotime(const char *p) (void)memset(&tm, 0, sizeof(struct tm)); - if (xstrcmp(p, "$Mdocdate: February 21 2009 $")) + if (xstrcmp(p, "$Mdocdate: February 23 2009 $")) return(time(NULL)); - if ((pp = strptime(p, "$Mdocdate: February 21 2009 $", &tm)) && 0 == *pp) + if ((pp = strptime(p, "$Mdocdate: February 23 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) |