diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-16 12:23:25 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-01-16 12:23:25 +0000 |
commit | d460b17b87e787b48938270b20eb4088e5c343ab (patch) | |
tree | 327c0f9b78231c4427c0222aba82f007a6e28ba7 /action.c | |
parent | c3f113eda71022f3ea3245ce53f3878057139149 (diff) | |
download | mandoc-d460b17b87e787b48938270b20eb4088e5c343ab.tar.gz |
Clean-ups & documentation.
Diffstat (limited to 'action.c')
-rw-r--r-- | action.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -292,7 +292,7 @@ post_dd(struct mdoc *mdoc) if ( ! xstrlcat(date, n->data.text.string, sz)) return(mdoc_nerr(mdoc, n, "badly-formed manual date parameter")); - if ( ! xstrlcat(date, " ", sz)) + if (n->next && ! xstrlcat(date, " ", sz)) return(mdoc_nerr(mdoc, n, "badly-formed manual date parameter")); } @@ -300,6 +300,13 @@ post_dd(struct mdoc *mdoc) mdoc_msg(mdoc, "parsed time: %u since epoch", mdoc->meta.date); return(1); + } else if (n) + return(mdoc_err(mdoc, "badly-formed manual date")); + + if ((mdoc->meta.date = mdoc_atotime(date))) { + mdoc_msg(mdoc, "parsed time: %u since epoch", + mdoc->meta.date); + return(1); } return(mdoc_err(mdoc, "badly-formed manual date")); |