-/* $Id: mdoc_action.c,v 1.46 2009/10/29 04:34:38 kristaps Exp $ */
+/* $Id: mdoc_action.c,v 1.49 2009/11/02 06:22:45 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
#endif
#include <assert.h>
-#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
if (cp) {
/* FIXME: where is strtonum!? */
m->meta.vol = mandoc_strdup(cp);
- errno = 0;
lval = strtol(nn->string, &ep, 10);
if (nn->string[0] != '\0' && *ep == '\0')
m->meta.msec = (int)lval;
/*
- * Parse the date field in `Dd', primarily through mdoc_atotime().
- * FIXME: push mdoc_atotime() into here.
+ * Parse the date field in `Dd'.
*/
static int
post_dd(POST_ARGS)
if ( ! concat(m, buf, n->child, DATESIZ))
return(0);
- m->meta.date = mdoc_atotime(buf);
+ m->meta.date = mandoc_a2time
+ (MTIME_MDOCDATE | MTIME_CANONICAL, buf);
+
if (0 == m->meta.date) {
if ( ! mdoc_nwarn(m, n, EBADDATE))
return(0);
}
+/* ARGSUSED */
static int
pre_offset(PRE_ARGS)
{