source@mandoc.bsd.lv
 help / color / Atom feed
* mandoc: Align to the new, sane behaviour of the groff_mdoc(7) .Dd macro: 
@ 2020-01-19 16:45 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2020-01-19 16:45 UTC (permalink / raw)
  To: source

Log Message:
-----------
Align to the new, sane behaviour of the groff_mdoc(7) .Dd macro:
without an argument, use the empty string, and always concatenate
all arguments, no matter their number.
This allows reducing the number of arguments of mandoc_normdate()
and some other simplifications, at the same time polishing some
error messages by adding the name of the macro in question.

Modified Files:
--------------
    mandoc:
        libmandoc.h
        man_validate.c
        mandoc.1
        mandoc.c
        mandoc.h
        mandoc_msg.c
        mdoc_macro.c
        mdoc_validate.c
    mandoc/regress/man/TH:
        baddate.out_lint
        emptydate.out_lint
        longdate.out_lint
        noTH.out_lint
        noarg.out_lint
        onearg.out_lint
        twoargs.out_lint
    mandoc/regress/mdoc/Dd:
        Makefile
        badarg.out_lint
        dupe.out_lint
        long.out_lint
        manarg.out_lint
        noarg.out_lint
        order.out_lint
    mandoc/regress/mdoc/Os:
        dupe.in
        dupe.out_ascii
        dupe.out_lint
        dupe.out_markdown

Added Files:
-----------
    mandoc/regress/mdoc/Dd:
        noarg.out_ascii
        noarg.out_markdown

Revision Data
-------------
Index: twoargs.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/TH/twoargs.out_lint,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/TH/twoargs.out_lint -Lregress/man/TH/twoargs.out_lint -u -p -r1.2 -r1.3
--- regress/man/TH/twoargs.out_lint
+++ regress/man/TH/twoargs.out_lint
@@ -1,2 +1,2 @@
 mandoc: twoargs.in:2:2: WARNING: missing manual section, using "": TH TH-TWOARGS
-mandoc: twoargs.in:2:2: WARNING: missing date, using today's date: TH
+mandoc: twoargs.in:2:2: WARNING: missing date, using "": TH
Index: emptydate.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/TH/emptydate.out_lint,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/TH/emptydate.out_lint -Lregress/man/TH/emptydate.out_lint -u -p -r1.2 -r1.3
--- regress/man/TH/emptydate.out_lint
+++ regress/man/TH/emptydate.out_lint
@@ -1 +1 @@
-mandoc: emptydate.in:2:20: WARNING: missing date, using today's date: TH
+mandoc: emptydate.in:2:20: WARNING: missing date, using "": TH
Index: noTH.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/TH/noTH.out_lint,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lregress/man/TH/noTH.out_lint -Lregress/man/TH/noTH.out_lint -u -p -r1.1 -r1.2
--- regress/man/TH/noTH.out_lint
+++ regress/man/TH/noTH.out_lint
@@ -1,2 +1,2 @@
 mandoc: noTH.in: WARNING: missing manual title, using ""
-mandoc: noTH.in: WARNING: missing date, using today's date
+mandoc: noTH.in: WARNING: missing date, using ""
Index: baddate.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/TH/baddate.out_lint,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/TH/baddate.out_lint -Lregress/man/TH/baddate.out_lint -u -p -r1.2 -r1.3
--- regress/man/TH/baddate.out_lint
+++ regress/man/TH/baddate.out_lint
@@ -1 +1 @@
-mandoc: baddate.in:2:18: WARNING: cannot parse date, using it verbatim: three bad words
+mandoc: baddate.in:2:18: WARNING: cannot parse date, using it verbatim: TH three bad words
Index: longdate.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/TH/longdate.out_lint,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/TH/longdate.out_lint -Lregress/man/TH/longdate.out_lint -u -p -r1.2 -r1.3
--- regress/man/TH/longdate.out_lint
+++ regress/man/TH/longdate.out_lint
@@ -1 +1 @@
-mandoc: longdate.in:2:19: WARNING: cannot parse date, using it verbatim: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012
+mandoc: longdate.in:2:19: WARNING: cannot parse date, using it verbatim: TH 1234567890123456789012345678901234567890123456789012345678901234567890123456789012
Index: noarg.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/TH/noarg.out_lint,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/TH/noarg.out_lint -Lregress/man/TH/noarg.out_lint -u -p -r1.2 -r1.3
--- regress/man/TH/noarg.out_lint
+++ regress/man/TH/noarg.out_lint
@@ -1,3 +1,3 @@
 mandoc: noarg.in:2:2: WARNING: missing manual title, using "": TH
 mandoc: noarg.in:2:2: WARNING: missing manual section, using "": TH 
-mandoc: noarg.in:2:2: WARNING: missing date, using today's date: TH
+mandoc: noarg.in:2:2: WARNING: missing date, using "": TH
Index: onearg.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/man/TH/onearg.out_lint,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/man/TH/onearg.out_lint -Lregress/man/TH/onearg.out_lint -u -p -r1.2 -r1.3
--- regress/man/TH/onearg.out_lint
+++ regress/man/TH/onearg.out_lint
@@ -1,2 +1,2 @@
 mandoc: onearg.in:2:2: WARNING: missing manual section, using "": TH TH-ONEARG
-mandoc: onearg.in:2:2: WARNING: missing date, using today's date: TH
+mandoc: onearg.in:2:2: WARNING: missing date, using "": TH
Index: mandoc.h
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.h,v
retrieving revision 1.264
retrieving revision 1.265
diff -Lmandoc.h -Lmandoc.h -u -p -r1.264 -r1.265
--- mandoc.h
+++ mandoc.h
@@ -1,7 +1,7 @@
 /*	$Id$ */
 /*
  * Copyright (c) 2010, 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2012-2019 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2012-2020 Ingo Schwarze <schwarze@openbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -83,7 +83,7 @@ enum	mandocerr {
 	MANDOCERR_TH_NOTITLE, /* missing manual title, using "": [macro] */
 	MANDOCERR_MSEC_MISSING, /* missing manual section, using "": macro */
 	MANDOCERR_MSEC_BAD, /* unknown manual section: Dt ... section */
-	MANDOCERR_DATE_MISSING, /* missing date, using today's date */
+	MANDOCERR_DATE_MISSING, /* missing date, using "": [macro] */
 	MANDOCERR_DATE_BAD, /* cannot parse date, using it verbatim: date */
 	MANDOCERR_DATE_FUTURE, /* date in the future, using it anyway: date */
 	MANDOCERR_OS_MISSING, /* missing Os macro, using "" */
Index: mandoc_msg.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc_msg.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lmandoc_msg.c -Lmandoc_msg.c -u -p -r1.8 -r1.9
--- mandoc_msg.c
+++ mandoc_msg.c
@@ -1,7 +1,7 @@
 /*	$Id$ */
 /*
  * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2014-2020 Ingo Schwarze <schwarze@openbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -83,7 +83,7 @@ static	const char *const type_message[MA
 	"missing manual title, using \"\"",
 	"missing manual section, using \"\"",
 	"unknown manual section",
-	"missing date, using today's date",
+	"missing date, using \"\"",
 	"cannot parse date, using it verbatim",
 	"date in the future, using it anyway",
 	"missing Os macro, using \"\"",
Index: mdoc_validate.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_validate.c,v
retrieving revision 1.375
retrieving revision 1.376
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.375 -r1.376
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -1,7 +1,7 @@
 /*	$Id$ */
 /*
  * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2019 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2020 Ingo Schwarze <schwarze@openbsd.org>
  * Copyright (c) 2010 Joerg Sonnenberger <joerg@netbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -1909,7 +1909,7 @@ post_root(POST_ARGS)
 	/* Add missing prologue data. */
 
 	if (mdoc->meta.date == NULL)
-		mdoc->meta.date = mandoc_normdate(mdoc, NULL, 0, 0);
+		mdoc->meta.date = mandoc_normdate(NULL, NULL);
 
 	if (mdoc->meta.title == NULL) {
 		mandoc_msg(MANDOCERR_DT_NOTITLE, 0, 0, "EOF");
@@ -2507,7 +2507,6 @@ static void
 post_dd(POST_ARGS)
 {
 	struct roff_node *n;
-	char		 *datestr;
 
 	n = mdoc->last;
 	n->flags |= NODE_NOPRT;
@@ -2524,10 +2523,10 @@ post_dd(POST_ARGS)
 		mandoc_msg(MANDOCERR_PROLOG_ORDER,
 		    n->line, n->pos, "Dd after Os");
 
-	datestr = NULL;
-	deroff(&datestr, n);
-	mdoc->meta.date = mandoc_normdate(mdoc, datestr, n->line, n->pos);
-	free(datestr);
+	if (mdoc->quick && n != NULL)
+		mdoc->meta.date = mandoc_strdup("");
+	else
+		mdoc->meta.date = mandoc_normdate(n->child, n);
 }
 
 static void
Index: libmandoc.h
===================================================================
RCS file: /home/cvs/mandoc/mandoc/libmandoc.h,v
retrieving revision 1.77
retrieving revision 1.78
diff -Llibmandoc.h -Llibmandoc.h -u -p -r1.77 -r1.78
--- libmandoc.h
+++ libmandoc.h
@@ -1,7 +1,7 @@
 /*	$Id$ */
 /*
  * Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2013,2014,2015,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2013-2015,2017,2018,2020 Ingo Schwarze <schwarze@openbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -47,8 +47,9 @@ struct	buf {
 
 struct	roff;
 struct	roff_man;
+struct	roff_node;
 
-char		*mandoc_normdate(struct roff_man *, char *, int, int);
+char		*mandoc_normdate(struct roff_node *, struct roff_node *);
 int		 mandoc_eos(const char *, size_t);
 int		 mandoc_strntoi(const char *, size_t, int);
 const char	*mandoc_a2msec(const char*);
Index: mandoc.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -Lmandoc.c -Lmandoc.c -u -p -r1.116 -r1.117
--- mandoc.c
+++ mandoc.c
@@ -1,7 +1,7 @@
 /*	$Id$ */
 /*
  * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2011-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -536,45 +536,59 @@ fail:
 }
 
 char *
-mandoc_normdate(struct roff_man *man, char *in, int ln, int pos)
+mandoc_normdate(struct roff_node *nch, struct roff_node *nbl)
 {
 	char		*cp;
 	time_t		 t;
 
-	if (man->quick)
-		return mandoc_strdup(in == NULL ? "" : in);
+	/* No date specified. */
 
-	/* No date specified: use today's date. */
-
-	if (in == NULL || *in == '\0')
-		mandoc_msg(MANDOCERR_DATE_MISSING, ln, pos, NULL);
-	if (in == NULL || *in == '\0' || strcmp(in, "$" "Mdocdate$") == 0)
+	if (nch == NULL) {
+		if (nbl == NULL)
+			mandoc_msg(MANDOCERR_DATE_MISSING, 0, 0, NULL);
+		else
+			mandoc_msg(MANDOCERR_DATE_MISSING, nbl->line,
+			    nbl->pos, "%s", roff_name[nbl->tok]);
+		return mandoc_strdup("");
+	}
+	if (*nch->string == '\0') {
+		mandoc_msg(MANDOCERR_DATE_MISSING, nch->line,
+		    nch->pos, "%s", roff_name[nbl->tok]);
+		return mandoc_strdup("");
+	}
+	if (strcmp(nch->string, "$" "Mdocdate$") == 0)
 		return time2a(time(NULL));
 
 	/* Valid mdoc(7) date format. */
 
-	if (a2time(&t, "$" "Mdocdate: %b %d %Y $", in) ||
-	    a2time(&t, "%b %d, %Y", in)) {
+	if (a2time(&t, "$" "Mdocdate: %b %d %Y $", nch->string) ||
+	    a2time(&t, "%b %d, %Y", nch->string)) {
 		cp = time2a(t);
 		if (t > time(NULL) + 86400)
-			mandoc_msg(MANDOCERR_DATE_FUTURE, ln, pos, "%s", cp);
-		else if (*in != '$' && strcmp(in, cp) != 0)
-			mandoc_msg(MANDOCERR_DATE_NORM, ln, pos, "%s", cp);
+			mandoc_msg(MANDOCERR_DATE_FUTURE, nch->line,
+			    nch->pos, "%s %s", roff_name[nbl->tok], cp);
+		else if (*nch->string != '$' &&
+		    strcmp(nch->string, cp) != 0)
+			mandoc_msg(MANDOCERR_DATE_NORM, nch->line,
+			    nch->pos, "%s %s", roff_name[nbl->tok], cp);
 		return cp;
 	}
 
 	/* In man(7), do not warn about the legacy format. */
 
-	if (a2time(&t, "%Y-%m-%d", in) == 0)
-		mandoc_msg(MANDOCERR_DATE_BAD, ln, pos, "%s", in);
+	if (a2time(&t, "%Y-%m-%d", nch->string) == 0)
+		mandoc_msg(MANDOCERR_DATE_BAD, nch->line, nch->pos,
+		    "%s %s", roff_name[nbl->tok], nch->string);
 	else if (t > time(NULL) + 86400)
-		mandoc_msg(MANDOCERR_DATE_FUTURE, ln, pos, "%s", in);
-	else if (man->meta.macroset == MACROSET_MDOC)
-		mandoc_msg(MANDOCERR_DATE_LEGACY, ln, pos, "Dd %s", in);
+		mandoc_msg(MANDOCERR_DATE_FUTURE, nch->line, nch->pos,
+		    "%s %s", roff_name[nbl->tok], nch->string);
+	else if (nbl->tok == MDOC_Dd)
+		mandoc_msg(MANDOCERR_DATE_LEGACY, nch->line, nch->pos,
+		    "Dd %s", nch->string);
 
 	/* Use any non-mdoc(7) date verbatim. */
 
-	return mandoc_strdup(in);
+	return mandoc_strdup(nch->string);
 }
 
 int
Index: mandoc.1
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mandoc.1,v
retrieving revision 1.240
retrieving revision 1.241
diff -Lmandoc.1 -Lmandoc.1 -u -p -r1.240 -r1.241
--- mandoc.1
+++ mandoc.1
@@ -1073,7 +1073,7 @@ macro lacks the mandatory section argume
 The section number in a
 .Ic \&Dt
 line is invalid, but still used.
-.It Sy "missing date, using today's date"
+.It Sy "missing date, using \(dq\(dq"
 .Pq mdoc, man
 The document was parsed as
 .Xr mdoc 7
Index: man_validate.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/man_validate.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -Lman_validate.c -Lman_validate.c -u -p -r1.149 -r1.150
--- man_validate.c
+++ man_validate.c
@@ -1,7 +1,7 @@
 /*	$Id$ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010, 2012-2018 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010, 2012-2020 Ingo Schwarze <schwarze@openbsd.org>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -185,7 +185,7 @@ check_root(CHKARGS)
 
 		man->meta.title = mandoc_strdup("");
 		man->meta.msec = mandoc_strdup("");
-		man->meta.date = mandoc_normdate(man, NULL, n->line, n->pos);
+		man->meta.date = mandoc_normdate(NULL, NULL);
 	}
 
 	if (man->meta.os_e &&
@@ -401,15 +401,10 @@ post_TH(CHKARGS)
 
 	if (n != NULL)
 		n = n->next;
-	if (n != NULL && n->string != NULL && n->string[0] != '\0')
-		man->meta.date = mandoc_normdate(man,
-		    n->string, n->line, n->pos);
-	else {
+	if (man->quick && n != NULL)
 		man->meta.date = mandoc_strdup("");
-		mandoc_msg(MANDOCERR_DATE_MISSING,
-		    n == NULL ? nb->line : n->line,
-		    n == NULL ? nb->pos : n->pos, "TH");
-	}
+	else
+		man->meta.date = mandoc_normdate(n, nb);
 
 	/* TITLE MSEC DATE ->OS<- VOL */
 
Index: mdoc_macro.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/mdoc_macro.c,v
retrieving revision 1.232
retrieving revision 1.233
diff -Lmdoc_macro.c -Lmdoc_macro.c -u -p -r1.232 -r1.233
--- mdoc_macro.c
+++ mdoc_macro.c
@@ -61,7 +61,7 @@ static	void		rew_pending(struct roff_man
 				const struct roff_node *);
 
 static const struct mdoc_macro mdoc_macros[MDOC_MAX - MDOC_Dd] = {
-	{ in_line_eoln, MDOC_PROLOGUE }, /* Dd */
+	{ in_line_eoln, MDOC_PROLOGUE | MDOC_JOIN }, /* Dd */
 	{ in_line_eoln, MDOC_PROLOGUE }, /* Dt */
 	{ in_line_eoln, MDOC_PROLOGUE }, /* Os */
 	{ blk_full, MDOC_PARSED | MDOC_JOIN }, /* Sh */
--- /dev/null
+++ regress/mdoc/Dd/noarg.out_markdown
@@ -0,0 +1,11 @@
+DD-NOARG(1) - General Commands Manual
+
+# NAME
+
+**Dd-noarg** - date macro without an argument
+
+# DESCRIPTION
+
+some text
+
+OpenBSD - 
Index: Makefile
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dd/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lregress/mdoc/Dd/Makefile -Lregress/mdoc/Dd/Makefile -u -p -r1.4 -r1.5
--- regress/mdoc/Dd/Makefile
+++ regress/mdoc/Dd/Makefile
@@ -1,20 +1,12 @@
-# $OpenBSD: Makefile,v 1.5 2020/01/08 10:17:15 schwarze Exp $
+# $OpenBSD: Makefile,v 1.6 2020/01/19 16:16:33 schwarze Exp $
 
 REGRESS_TARGETS	 = badarg dupe late long manarg noarg order
 LINT_TARGETS	 = badarg dupe late long manarg noarg order
 
-# noarg output contains the date when the file is formatted
+# groff-1.22.4 prints footer fields of excessive length on top of
+# each other rather than breaking the output line.
 
-SKIP_ASCII	?= noarg
-SKIP_MARKDOWN	?= noarg
-
-# If groff finds exactly three arguments, it assumes they are month,
-# day and year without further checking.  If there are no arguments,
-# groff uses the string "Epoch".  Otherwise, it silently falls back
-# to today's date.
-# That is not at all sane behaviour, we are not going to imitate it.
-
-SKIP_GROFF	 = badarg long manarg noarg
+SKIP_GROFF	 = long
 
 # Autodetection fails for late .Dd, so specify -mdoc explicitly.
 
--- /dev/null
+++ regress/mdoc/Dd/noarg.out_ascii
@@ -0,0 +1,9 @@
+DD-NOARG(1)                 General Commands Manual                DD-NOARG(1)
+
+N\bNA\bAM\bME\bE
+     D\bDd\bd-\b-n\bno\boa\bar\brg\bg - date macro without an argument
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+     some text
+
+OpenBSD                                                                OpenBSD
Index: badarg.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dd/badarg.out_lint,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/mdoc/Dd/badarg.out_lint -Lregress/mdoc/Dd/badarg.out_lint -u -p -r1.5 -r1.6
--- regress/mdoc/Dd/badarg.out_lint
+++ regress/mdoc/Dd/badarg.out_lint
@@ -1,2 +1,2 @@
-mandoc: badarg.in:2:2: WARNING: cannot parse date, using it verbatim: bad date
+mandoc: badarg.in:2:5: WARNING: cannot parse date, using it verbatim: Dd bad date
 mandoc: badarg.in:2:5: STYLE: Mdocdate missing: Dd bad date (OpenBSD)
Index: dupe.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dd/dupe.out_lint,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lregress/mdoc/Dd/dupe.out_lint -Lregress/mdoc/Dd/dupe.out_lint -u -p -r1.6 -r1.7
--- regress/mdoc/Dd/dupe.out_lint
+++ regress/mdoc/Dd/dupe.out_lint
@@ -1,3 +1,3 @@
-mandoc: dupe.in:2:5: STYLE: Mdocdate missing: Dd August (OpenBSD)
+mandoc: dupe.in:2:5: STYLE: Mdocdate missing: Dd August 1, 2014 (OpenBSD)
 mandoc: dupe.in:5:2: ERROR: duplicate prologue macro: Dd
 mandoc: dupe.in:11:2: ERROR: duplicate prologue macro: Dd
Index: noarg.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dd/noarg.out_lint,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lregress/mdoc/Dd/noarg.out_lint -Lregress/mdoc/Dd/noarg.out_lint -u -p -r1.4 -r1.5
--- regress/mdoc/Dd/noarg.out_lint
+++ regress/mdoc/Dd/noarg.out_lint
@@ -1 +1 @@
-mandoc: noarg.in:2:2: WARNING: missing date, using today's date
+mandoc: noarg.in:2:2: WARNING: missing date, using "": Dd
Index: order.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dd/order.out_lint,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/mdoc/Dd/order.out_lint -Lregress/mdoc/Dd/order.out_lint -u -p -r1.5 -r1.6
--- regress/mdoc/Dd/order.out_lint
+++ regress/mdoc/Dd/order.out_lint
@@ -1,2 +1,2 @@
 mandoc: order.in:3:2: WARNING: prologue macros out of order: Dd after Dt
-mandoc: order.in:3:5: STYLE: Mdocdate missing: Dd August (OpenBSD)
+mandoc: order.in:3:5: STYLE: Mdocdate missing: Dd August 5, 2014 (OpenBSD)
Index: manarg.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dd/manarg.out_lint,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/mdoc/Dd/manarg.out_lint -Lregress/mdoc/Dd/manarg.out_lint -u -p -r1.5 -r1.6
--- regress/mdoc/Dd/manarg.out_lint
+++ regress/mdoc/Dd/manarg.out_lint
@@ -1,2 +1,2 @@
-mandoc: manarg.in:2:2: STYLE: legacy man(7) date format: Dd 2014-08-07
+mandoc: manarg.in:2:5: STYLE: legacy man(7) date format: Dd 2014-08-07
 mandoc: manarg.in:2:5: STYLE: Mdocdate missing: Dd 2014-08-07 (OpenBSD)
Index: long.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dd/long.out_lint,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/mdoc/Dd/long.out_lint -Lregress/mdoc/Dd/long.out_lint -u -p -r1.5 -r1.6
--- regress/mdoc/Dd/long.out_lint
+++ regress/mdoc/Dd/long.out_lint
@@ -1,2 +1,2 @@
-mandoc: long.in:2:2: WARNING: cannot parse date, using it verbatim: 1234567890123456789012345678901234567890123456789012345678901234567890123456789
+mandoc: long.in:2:5: WARNING: cannot parse date, using it verbatim: Dd 1234567890123456789012345678901234567890123456789012345678901234567890123456789
 mandoc: long.in:2:5: STYLE: Mdocdate missing: Dd 1234567890123456789012345678901234567890123456789012345678901234567890123456789 (OpenBSD)
Index: dupe.out_markdown
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Os/dupe.out_markdown,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/mdoc/Os/dupe.out_markdown -Lregress/mdoc/Os/dupe.out_markdown -u -p -r1.2 -r1.3
--- regress/mdoc/Os/dupe.out_markdown
+++ regress/mdoc/Os/dupe.out_markdown
@@ -9,4 +9,4 @@ OS-DUPE(1) - General Commands Manual
 initial text
 final text
 
-OpenBSD - July 4, 2017
+OpenBSD - January 19, 2020
Index: dupe.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Os/dupe.out_lint,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/mdoc/Os/dupe.out_lint -Lregress/mdoc/Os/dupe.out_lint -u -p -r1.5 -r1.6
--- regress/mdoc/Os/dupe.out_lint
+++ regress/mdoc/Os/dupe.out_lint
@@ -1,9 +1,9 @@
 mandoc: dupe.in:3:5: STYLE: operating system explicitly specified: Os NetBSD (NetBSD)
-mandoc: dupe.in:2:5: STYLE: Mdocdate found: Dd $Mdocdate: (NetBSD)
+mandoc: dupe.in:2:5: STYLE: Mdocdate found: Dd $Mdocdate$ (NetBSD)
 mandoc: dupe.in:4:2: WARNING: prologue macros out of order: Dt after Os
 mandoc: dupe.in:5:2: ERROR: duplicate prologue macro: Os
 mandoc: dupe.in:5:5: STYLE: operating system explicitly specified: Os FreeBSD (NetBSD)
-mandoc: dupe.in:2:5: STYLE: Mdocdate found: Dd $Mdocdate: (NetBSD)
+mandoc: dupe.in:2:5: STYLE: Mdocdate found: Dd $Mdocdate$ (NetBSD)
 mandoc: dupe.in:11:2: ERROR: duplicate prologue macro: Os
 mandoc: dupe.in:11:5: STYLE: operating system explicitly specified: Os OpenBSD (NetBSD)
 mandoc: dupe.in: STYLE: RCS id missing: (NetBSD)
Index: dupe.in
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Os/dupe.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/mdoc/Os/dupe.in -Lregress/mdoc/Os/dupe.in -u -p -r1.2 -r1.3
--- regress/mdoc/Os/dupe.in
+++ regress/mdoc/Os/dupe.in
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dupe.in,v 1.2 2017/07/04 14:53:26 schwarze Exp $
+.\" $OpenBSD: dupe.in,v 1.3 2020/01/19 16:36:47 schwarze Exp $
 .Dd $Mdocdate$
 .Os NetBSD
 .Dt OS-DUPE 1
Index: dupe.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Os/dupe.out_ascii,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/mdoc/Os/dupe.out_ascii -Lregress/mdoc/Os/dupe.out_ascii -u -p -r1.2 -r1.3
--- regress/mdoc/Os/dupe.out_ascii
+++ regress/mdoc/Os/dupe.out_ascii
@@ -6,4 +6,4 @@ N\bNA\bAM\bME\bE
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
      initial text final text
 
-OpenBSD                          July 4, 2017                          OpenBSD
+OpenBSD                        January 19, 2020                        OpenBSD
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-19 16:45 mandoc: Align to the new, sane behaviour of the groff_mdoc(7) .Dd macro: schwarze

source@mandoc.bsd.lv

Archives are clonable: git clone --mirror http://inbox.vuxu.org/mandoc-source

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.mandoc.source


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git