From 47955b39aaa36fe123da6fa5e15e40e0061e40ae Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sun, 12 Apr 2009 19:24:10 +0000 Subject: Added \^ and \~ escapes (Joerg). --- mdoc_strings.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'mdoc_strings.c') 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 * @@ -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) -- cgit v1.2.3