Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.groff.bug > #1590 > unrolled thread

[bug #57485] [PATCH] accept any number of arguments for .Dd in the groff_mdoc(7) macros

Started byIngo Schwarze <INVALID.NOREPLY@gnu.org>
First post2019-12-26 17:05 -0500
Last post2019-12-26 17:05 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.groff.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [bug #57485] [PATCH] accept any number of arguments for .Dd in the groff_mdoc(7) macros Ingo Schwarze <INVALID.NOREPLY@gnu.org> - 2019-12-26 17:05 -0500

#1590 — [bug #57485] [PATCH] accept any number of arguments for .Dd in the groff_mdoc(7) macros

FromIngo Schwarze <INVALID.NOREPLY@gnu.org>
Date2019-12-26 17:05 -0500
Subject[bug #57485] [PATCH] accept any number of arguments for .Dd in the groff_mdoc(7) macros
Message-ID<mailman.1480.1577397934.1979.bug-groff@gnu.org>
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/

[toc] | [standalone]


Back to top | Article view | gnu.groff.bug


csiph-web