=================================================================== RCS file: /cvs/mandoc/Attic/strings.c,v retrieving revision 1.12 retrieving revision 1.14 diff -u -p -r1.12 -r1.14 --- mandoc/Attic/strings.c 2009/02/20 23:35:36 1.12 +++ mandoc/Attic/strings.c 2009/02/23 12:45:19 1.14 @@ -1,4 +1,4 @@ -/* $Id: strings.c,v 1.12 2009/02/20 23:35:36 kristaps Exp $ */ +/* $Id: strings.c,v 1.14 2009/02/23 12:45:19 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -21,10 +21,14 @@ #include #include #include -#ifndef __OpenBSD__ +#ifdef __linux__ #include #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 20 2009 $")) + if (xstrcmp(p, "$Mdocdate: February 23 2009 $")) return(time(NULL)); - if ((pp = strptime(p, "$Mdocdate: February 20 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) @@ -336,7 +340,7 @@ mdoc_type2a(enum mdoc_type type) } -char * +const char * mdoc_arch2a(enum mdoc_arch arch) { @@ -404,7 +408,7 @@ mdoc_arch2a(enum mdoc_arch arch) } -char * +const char * mdoc_vol2a(enum mdoc_vol vol) { @@ -438,7 +442,7 @@ mdoc_vol2a(enum mdoc_vol vol) } -char * +const char * mdoc_msec2a(enum mdoc_msec msec) {