summaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_strings.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-04-12 19:24:10 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-04-12 19:24:10 +0000
commit47955b39aaa36fe123da6fa5e15e40e0061e40ae (patch)
tree74fa692fc88028fc79fac6ad2e7e2927f50c5036 /mdoc_strings.c
parent64f804892d86409e054d72a0a2fae9733b46ce16 (diff)
downloadmandoc-47955b39aaa36fe123da6fa5e15e40e0061e40ae.tar.gz
mandoc-47955b39aaa36fe123da6fa5e15e40e0061e40ae.tar.zst
mandoc-47955b39aaa36fe123da6fa5e15e40e0061e40ae.zip
Added \^ and \~ escapes (Joerg).
Diffstat (limited to 'mdoc_strings.c')
-rw-r--r--mdoc_strings.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mdoc_strings.c b/mdoc_strings.c
index b6708f85..64b834ec 100644
--- a/mdoc_strings.c
+++ b/mdoc_strings.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_strings.c,v 1.1 2009/03/31 13:50:19 kristaps Exp $ */
+/* $Id: mdoc_strings.c,v 1.2 2009/04/12 19:24:10 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -87,6 +87,10 @@ mdoc_isescape(const char *p)
/* FALLTHROUGH */
case ('-'):
/* FALLTHROUGH */
+ case ('~'):
+ /* FALLTHROUGH */
+ case ('^'):
+ /* FALLTHROUGH */
case ('%'):
/* FALLTHROUGH */
case ('0'):
@@ -212,9 +216,9 @@ mdoc_atotime(const char *p)
(void)memset(&tm, 0, sizeof(struct tm));
- if (0 == strcmp(p, "$Mdocdate: March 31 2009 $"))
+ if (0 == strcmp(p, "$Mdocdate: April 12 2009 $"))
return(time(NULL));
- if ((pp = strptime(p, "$Mdocdate: March 31 2009 $", &tm)) && 0 == *pp)
+ if ((pp = strptime(p, "$Mdocdate: April 12 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)