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


Groups > gnu.groff.bug > #1586

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

Path csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Ingo Schwarze <INVALID.NOREPLY@gnu.org>
Newsgroups gnu.groff.bug
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)
Lines 68
Approved bug-groff@gnu.org
Message-ID <mailman.1454.1577371603.1979.bug-groff@gnu.org> (permalink)
References <20191226-144637.sv97361.2440@savannah.gnu.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain;charset=UTF-8
X-Trace usenet.stanford.edu 1577371604 31792 209.51.188.17 (26 Dec 2019 14:46:44 GMT)
X-Complaints-To action@cs.stanford.edu
To Ingo Schwarze <schwarze@usta.de>, bug-groff@gnu.org
Envelope-to bug-groff@gnu.org
X-PHP-Originating-Script 1001:sendmail.php
X-Savane-Server savannah.gnu.org:443 [209.51.188.79]
X-Savane-Project groff
X-Savane-Tracker bugs
X-Savane-Item-ID 57485
User-Agent Mozilla/5.0 (X11; OpenBSD amd64; rv:70.0) Gecko/20100101 Firefox/70.0
X-Apparently-From 84.177.239.181 (Savane authenticated user schwarze)
In-Reply-To
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From 209.51.188.79
X-BeenThere bug-groff@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id "Bug reports for the GNU version of nroff, troff et al" <bug-groff.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-groff>, <mailto:bug-groff-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-groff>
List-Post <mailto:bug-groff@gnu.org>
List-Help <mailto:bug-groff-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-groff>, <mailto:bug-groff-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <20191226-144637.sv97361.2440@savannah.gnu.org>
Xref csiph.com gnu.groff.bug:1586

Show key headers only | View raw


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 <jsg@openbsd.org> 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/

Back to gnu.groff.bug | Previous | Next | Find similar | Unroll thread


Thread

[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 09:46 -0500

csiph-web