summaryrefslogtreecommitdiffstatshomepage
path: root/strings.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-02-23 12:45:19 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-02-23 12:45:19 +0000
commit87afbc0e736c0c51230aed2a74f1f10684872d7e (patch)
tree6a17424d1de64387a59166cd7ba593b96bb279b0 /strings.c
parent7f0efa8fae853b8421869bf16da3d57b9b4d0da0 (diff)
downloadmandoc-87afbc0e736c0c51230aed2a74f1f10684872d7e.tar.gz
mandoc-87afbc0e736c0c51230aed2a74f1f10684872d7e.tar.zst
mandoc-87afbc0e736c0c51230aed2a74f1f10684872d7e.zip
More in-file documentation and Linux-isation.
Moved mdoc_macros table definition into macro.c, where it belongs.
Diffstat (limited to 'strings.c')
-rw-r--r--strings.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/strings.c b/strings.c
index d92f1f29..1d4fd305 100644
--- a/strings.c
+++ b/strings.c
@@ -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)