[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #57485] [PATCH] accept any number of arguments for .Dd in the groff
From: |
Ingo Schwarze |
Subject: |
[bug #57485] [PATCH] accept any number of arguments for .Dd in the groff_mdoc(7) macros |
Date: |
Thu, 26 Dec 2019 17:05:26 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; OpenBSD amd64; rv:70.0) Gecko/20100101 Firefox/70.0 |
Follow-up Comment #2, bug #57485 (project groff):
Another clarification: In addition to improving the formatting of the
original 4.4BSD manuals, this patch does not cause a single regression
in any modern BSD system. A manual page relying on the current weird
behaviour for != 3 arguments literally doesn't exist in any modern BSD
system:
Here is the complete list of manuals in FreeBSD 11.2
that call .Dd with != 3 arguments:
man3/xo_attr_h.3 .Dd July, 2014
man3/xo_attr_hv.3 .Dd July, 2014
man3/xo_attr.3 .Dd July, 2014
man7/ld.7 .Dd 2015-03-02
man7/ldint.7 .Dd 2015-03-02
man7/binutils.7 .Dd 2015-03-02
man7/diff.7 .Dd 2015-03-02
man7/as.7 .Dd 2015-03-02
Here is the same list for NetBSD 8.1, containing only a single page:
man1/dns-sd.1 .Dd April 2004
In DragonFly BSD 5.6.1, there isn't a single instance.
In conclusion, while the main idea of the patch is to improve
formatting of the original 4.4BSD manuals, it also improves formatting
of modern manual pages.
Just because somebody raised the point that all mdoc documentation
authors are used to the syntax ".Dd Month day, year": that is clearly
true, but completely irrelvant. I'm not proposing to change the
formatting for == 3 arguments. This is only about improved
formatting in the rare case of != 3 arguments, with the side
benefit of simplifying the macro implementation.
Because someone doubted that the mdoc(7) manual page from the
mandoc(1) package already documents the proposed behaviour:
It says:
"Other arguments are not portable; the mandoc(1) utility handles them
as follows:
- To have the date automatically filled in by the OpenBSD
version of cvs(1), the special string "$Mdocdate$" can be
given as an argument.
- The traditional, purely numeric man(7) format year-month-day
is accepted, too.
- If a date string cannot be parsed, it is used verbatim.
- If no date string is given, the current date is used."
Oh well, printing the current date is useless. I'll remove that
from mandoc(1) when this patch gets pushed. Right now, it happens
in mandoc(1) for *different* input than in groff, so removing it will
even improve compatibility...
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57485>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/