From 04cc425ad5987ba914232718ff8bbd5ef418b4d6 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 7 Mar 2011 01:35:51 +0000 Subject: Clean up date handling, as a first step to get rid of the frequent petty warnings in this area: - always store dates as strings, not as seconds since the Epoch - for input, try the three most common formats everywhere - for unrecognized format, just pass the date though verbatim - when there is no date at all, still use the current date Originally triggered by a one-line patch from Tim van der Molen, , which is included here. Feedback and OK on manual parts from jmc@. "please check this in" kristaps@ --- libmandoc.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'libmandoc.h') diff --git a/libmandoc.h b/libmandoc.h index 0e9a7492..3a8559b9 100644 --- a/libmandoc.h +++ b/libmandoc.h @@ -1,4 +1,4 @@ -/* $Id: libmandoc.h,v 1.10 2011/01/03 22:42:37 schwarze Exp $ */ +/* $Id: libmandoc.h,v 1.11 2011/03/07 01:35:51 schwarze Exp $ */ /* * Copyright (c) 2009, 2010 Kristaps Dzonsons * @@ -25,11 +25,7 @@ char *mandoc_strdup(const char *); void *mandoc_malloc(size_t); void *mandoc_realloc(void *, size_t); char *mandoc_getarg(char **, mandocmsg, void *, int, int *); -time_t mandoc_a2time(int, const char *); -#define MTIME_CANONICAL (1 << 0) -#define MTIME_REDUCED (1 << 1) -#define MTIME_MDOCDATE (1 << 2) -#define MTIME_ISO_8601 (1 << 3) +char *mandoc_normdate(char *, mandocmsg, void *, int, int); int mandoc_eos(const char *, size_t, int); int mandoc_hyph(const char *, const char *); -- cgit v1.2.3-56-ge451