-/* $Id: mdoc_action.c,v 1.48 2009/10/31 06:10:58 kristaps Exp $ */
+/* $Id: mdoc_action.c,v 1.51 2010/03/31 07:13:53 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#ifndef OSNAME
#include <sys/utsname.h>
#endif
const struct mdoc_node *, size_t);
static inline int order_rs(int);
-#ifdef __linux__
-extern size_t strlcat(char *, const char *, size_t);
-#endif
-
static int post_ar(POST_ARGS);
static int post_at(POST_ARGS);
static int post_bl(POST_ARGS);
post_bl_width(POST_ARGS)
{
size_t width;
- int i, tok;
+ int i;
+ enum mdoct tok;
char buf[NUMSIZ];
char *p;
/*
- * 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);