started by Sascha Wildner, 07/25/2010 06:30 AM.
-.\" $Id: mdoc.7,v 1.141 2010/07/26 12:51:56 kristaps Exp $
+.\" $Id: mdoc.7,v 1.142 2010/07/26 13:45:49 kristaps Exp $
.\"
.\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Copyright (c) 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
.It Sx \&Cd Ta Yes Ta Yes Ta >0
.It Sx \&Cm Ta Yes Ta Yes Ta n
.It Sx \&Db Ta \&No Ta \&No Ta 1
.It Sx \&Cd Ta Yes Ta Yes Ta >0
.It Sx \&Cm Ta Yes Ta Yes Ta n
.It Sx \&Db Ta \&No Ta \&No Ta 1
-.It Sx \&Dd Ta \&No Ta \&No Ta >0
+.It Sx \&Dd Ta \&No Ta \&No Ta n
.It Sx \&Dt Ta \&No Ta \&No Ta n
.It Sx \&Dv Ta Yes Ta Yes Ta n
.It Sx \&Dx Ta Yes Ta Yes Ta n
.It Sx \&Dt Ta \&No Ta \&No Ta n
.It Sx \&Dv Ta Yes Ta Yes Ta n
.It Sx \&Dx Ta Yes Ta Yes Ta n
manual.
Its syntax is as follows:
.Pp
manual.
Its syntax is as follows:
.Pp
-.D1 Pf \. Sx \&Dd Ar date
+.D1 Pf \. Sx \&Dd Op Ar date
.Xr cvs 1 ,
or instead a valid canonical date as specified by
.Sx Dates .
.Xr cvs 1 ,
or instead a valid canonical date as specified by
.Sx Dates .
-If a date does not conform, the current date is used instead.
+If a date does not conform or is empty, the current date is used.
.Pp
Examples:
.D1 \&.Dd $\&Mdocdate$
.Pp
Examples:
.D1 \&.Dd $\&Mdocdate$
.Pp
.Bl -dash -compact
.It
.Pp
.Bl -dash -compact
.It
+An empty
+.Sq \&Dd
+macro in groff prints
+.Dq Epoch .
+In mandoc, it resolves to the current date.
+.It
The \es (font size), \em (font colour), and \eM (font filling colour)
font decoration escapes are all discarded in mandoc.
.It
The \es (font size), \em (font colour), and \eM (font filling colour)
font decoration escapes are all discarded in mandoc.
.It
-/* $Id: mdoc_action.c,v 1.76 2010/07/13 23:53:20 schwarze Exp $ */
+/* $Id: mdoc_action.c,v 1.77 2010/07/26 13:45:49 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
+ if (NULL == n->child) {
+ m->meta.date = time(NULL);
+ return(post_prol(m, n));
+ }
+
if ( ! concat(m, buf, n->child, DATESIZ))
return(0);
if ( ! concat(m, buf, n->child, DATESIZ))
return(0);
-/* $Id: mdoc_validate.c,v 1.113 2010/07/21 09:08:26 kristaps Exp $ */
+/* $Id: mdoc_validate.c,v 1.114 2010/07/26 13:45:49 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
*
const struct valids mdoc_valids[MDOC_MAX] = {
{ NULL, NULL }, /* Ap */
const struct valids mdoc_valids[MDOC_MAX] = {
{ NULL, NULL }, /* Ap */
- { pres_dd, posts_text }, /* Dd */
+ { pres_dd, posts_wtext }, /* Dd */
{ pres_dt, posts_dt }, /* Dt */
{ pres_os, NULL }, /* Os */
{ pres_sh, posts_sh }, /* Sh */
{ pres_dt, posts_dt }, /* Dt */
{ pres_os, NULL }, /* Os */
{ pres_sh, posts_sh }, /* Sh */