=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/Attic/man_action.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/mandoc/Attic/man_action.c 2009/12/22 23:58:00 1.10 --- src/usr.bin/mandoc/Attic/man_action.c 2009/12/23 22:30:17 1.11 *************** *** 1,4 **** ! /* $Id: man_action.c,v 1.10 2009/12/22 23:58:00 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: man_action.c,v 1.11 2009/12/23 22:30:17 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * *************** *** 66,74 **** { NULL }, /* PD */ }; - static time_t man_atotime(const char *); - int man_action_post(struct man *m) { --- 66,72 ---- *************** *** 153,165 **** /* TITLE MSEC ->DATE<- SOURCE VOL */ ! if (NULL == (n = n->next)) m->meta.date = time(NULL); - else if (0 == (m->meta.date = man_atotime(n->string))) { - if ( ! man_nwarn(m, n, WDATE)) - return(0); - m->meta.date = time(NULL); - } /* TITLE MSEC DATE ->SOURCE<- VOL */ --- 151,168 ---- /* TITLE MSEC ->DATE<- SOURCE VOL */ ! n = n->next; ! if (n) { ! m->meta.date = mandoc_a2time ! (MTIME_ISO_8601, n->string); ! ! if (0 == m->meta.date) { ! if ( ! man_nwarn(m, n, WDATE)) ! return(0); ! m->meta.date = time(NULL); ! } ! } else m->meta.date = time(NULL); /* TITLE MSEC DATE ->SOURCE<- VOL */ *************** *** 191,215 **** man_node_freelist(n); return(1); - } - - - static time_t - man_atotime(const char *p) - { - struct tm tm; - char *pp; - - memset(&tm, 0, sizeof(struct tm)); - - if ((pp = strptime(p, "%b %d %Y", &tm)) && 0 == *pp) - return(mktime(&tm)); - if ((pp = strptime(p, "%d %b %Y", &tm)) && 0 == *pp) - return(mktime(&tm)); - if ((pp = strptime(p, "%b %d, %Y", &tm)) && 0 == *pp) - return(mktime(&tm)); - if ((pp = strptime(p, "%b %Y", &tm)) && 0 == *pp) - return(mktime(&tm)); - - return(0); } --- 194,197 ----