=================================================================== RCS file: /cvs/mandoc/Attic/mdoc_strings.c,v retrieving revision 1.3 retrieving revision 1.6 diff -u -p -r1.3 -r1.6 --- mandoc/Attic/mdoc_strings.c 2009/04/12 19:45:26 1.3 +++ mandoc/Attic/mdoc_strings.c 2009/06/17 09:41:00 1.6 @@ -1,4 +1,4 @@ -/* $Id: mdoc_strings.c,v 1.3 2009/04/12 19:45:26 kristaps Exp $ */ +/* $Id: mdoc_strings.c,v 1.6 2009/06/17 09:41:00 kristaps Exp $ */ /* * Copyright (c) 2008 Kristaps Dzonsons * @@ -24,15 +24,10 @@ #include "libmdoc.h" -/* - * Various string-literal operations: converting scalars to and from - * strings, etc. - */ - struct mdoc_secname { - const char *name; + const char *name; /* Name of section. */ int flag; -#define MSECNAME_META (1 << 0) +#define MSECNAME_META (1 << 0)/* Logical section (not real). */ }; /* Section names corresponding to mdoc_sec. */ @@ -147,6 +142,8 @@ mdoc_iscdelim(char p) { switch (p) { + case('|'): + /* FALLTHROUGH */ case('.'): /* FALLTHROUGH */ case(','): @@ -214,9 +211,9 @@ mdoc_atotime(const char *p) (void)memset(&tm, 0, sizeof(struct tm)); - if (0 == strcmp(p, "$Mdocdate: April 12 2009 $")) + if (0 == strcmp(p, "$" "Mdocdate$")) return(time(NULL)); - if ((pp = strptime(p, "$Mdocdate: April 12 2009 $", &tm)) && 0 == *pp) + if ((pp = strptime(p, "$" "Mdocdate: %b %d %Y $", &tm)) && 0 == *pp) return(mktime(&tm)); /* XXX - this matches "June 1999", which is wrong. */ if ((pp = strptime(p, "%b %d %Y", &tm)) && 0 == *pp)