bug-groff
[Top][All Lists]
Advanced

[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 09:46:39 -0500 (EST)
User-agent: Mozilla/5.0 (X11; OpenBSD amd64; rv:70.0) Gecko/20100101 Firefox/70.0

URL:
  <https://savannah.gnu.org/bugs/?57485>

                 Summary: [PATCH] accept any number of arguments for .Dd in
the groff_mdoc(7) macros
                 Project: GNU troff
            Submitted by: schwarze
            Submitted on: Thu 26 Dec 2019 02:46:37 PM UTC
                Category: Macro - mdoc
                Severity: 2 - Minor
              Item Group: Incorrect behaviour
                  Status: None
                 Privacy: Public
             Assigned to: schwarze
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

The .Dd macro behaved in a weird way:
 - Without arguments, it printed the string "Epoch".
 - With one, two, four, or more arguments, it ignored all arguments and used
the current date instead.
 - Only for exactly three arguments, it printed the arguments.

None of this made sense.  Giving the date as "Epoch" is absurd, and printing
the current date is just misleading: why should a document be considered
up-to-date when the author did not even bother to state the date of the last
change?

Admittedly, the behaviour for 0 and 4 or more arguments already appeared
4.3BSD-Reno, and the behaviour for 2 or 3 arguments in 4.4BSD.  But it was
already wrong even in those days: several manual pages in 4.4BSD gave .Dd a
single, quoted argument, e.g. .Dd "June 9, 1993": cap_mkdb(1), id(1), sed(1),
err(3), getcap(3), sysctl(3), amd(8), disklabel(8), and others.

Consequently, simply print all the arguments, no matter how many there are.

This bug was found by Jonathan Gray <address@hidden> while he looked at
4.xBSD manual pages.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 26 Dec 2019 02:46:37 PM UTC  Name: mdoc-Dd.patch  Size: 4KiB   By:
schwarze

<http://savannah.gnu.org/bugs/download.php?file_id=48120>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57485>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]