diff options
author | 2009-06-15 01:36:23 +0000 | |
---|---|---|
committer | 2009-06-15 01:36:23 +0000 | |
commit | 7afd2174b2328d1c587b6ee50697ee5e5ae12ede (patch) | |
tree | 25732b469cb3a41e99ed497c84bd75b1943e23d6 /usr.bin/mandoc/mdoc_strings.c | |
parent | sync to 1.7.16: adapt INDENT to groff conventions (diff) | |
download | wireguard-openbsd-7afd2174b2328d1c587b6ee50697ee5e5ae12ede.tar.xz wireguard-openbsd-7afd2174b2328d1c587b6ee50697ee5e5ae12ede.zip |
sync to 1.7.16: implement \~ and \^ escapes, and repair \(ss
Diffstat (limited to 'usr.bin/mandoc/mdoc_strings.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_strings.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_strings.c b/usr.bin/mandoc/mdoc_strings.c index 2d83c30af20..fce9e6f37fe 100644 --- a/usr.bin/mandoc/mdoc_strings.c +++ b/usr.bin/mandoc/mdoc_strings.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_strings.c,v 1.2 2009/06/14 23:00:57 schwarze Exp $ */ +/* $Id: mdoc_strings.c,v 1.3 2009/06/15 01:36:23 schwarze Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se> * @@ -81,6 +81,10 @@ mdoc_isescape(const char *p) /* FALLTHROUGH */ case ('-'): /* FALLTHROUGH */ + case ('~'): + /* FALLTHROUGH */ + case ('^'): + /* FALLTHROUGH */ case ('%'): /* FALLTHROUGH */ case ('0'): @@ -206,9 +210,9 @@ mdoc_atotime(const char *p) (void)memset(&tm, 0, sizeof(struct tm)); - if (0 == strcmp(p, "$Mdocdate: June 14 2009 $")) + if (0 == strcmp(p, "$Mdocdate: June 15 2009 $")) return(time(NULL)); - if ((pp = strptime(p, "$Mdocdate: June 14 2009 $", &tm)) && 0 == *pp) + if ((pp = strptime(p, "$Mdocdate: June 15 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) |