Re: [PATCH] man*/: ffix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

On Mon, 2023-04-17 at 20:14:42 +0200, Alejandro Colomar wrote:
> On 4/17/23 01:51, G. Branden Robinson wrote:
> > At 2023-04-17T01:19:16+0200, Guillem Jover wrote:
> >> Escape dashes on dates, UUIDs, URLs, file and package names.
> > [...]
> > 
> > I'm a +1 on all of this except the dates (explanation below).
> > 
> >> diff --git a/man4/rtc.4 b/man4/rtc.4
> >> index 55dc1ff6b..b16be16c1 100644
> >> --- a/man4/rtc.4
> >> +++ b/man4/rtc.4
> >> @@ -43,7 +43,7 @@ and
> >>  .BR time (2),
> >>  as well as setting timestamps on files, and so on.
> >>  The system clock reports seconds and microseconds since a start point,
> >> -defined to be the POSIX Epoch: 1970-01-01 00:00:00 +0000 (UTC).
> >> +defined to be the POSIX Epoch: 1970\-01\-01 00:00:00 +0000 (UTC).
> >>  (One common implementation counts timer interrupts, once
> >>  per "jiffy", at a frequency of 100, 250, or 1000 Hz.)
> >>  That is, it is supposed to report wall clock time, which RTCs also do.
> > 
> >> diff --git a/man5/proc.5 b/man5/proc.5
> >> index dc5397a22..9c0b3e2ab 100644
> >> --- a/man5/proc.5
> >> +++ b/man5/proc.5
> >> @@ -4383,7 +4383,7 @@ Unnumbered interrupts are not shown, only summed into the total.
> >>  The number of context switches that the system underwent.
> >>  .TP
> >>  \fIbtime 769041601\fP
> >> -boot time, in seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
> >> +boot time, in seconds since the Epoch, 1970\-01\-01 00:00:00 +0000 (UTC).
> >>  .TP
> >>  \fIprocesses 86031\fP
> >>  Number of forks since boot.
> > 
> > These are parts of prose sentences and are themselves prose.  In the
> > groff man pages we neither model, nor recommend, the use of hyphen-minus
> > signs (escaped hyphens) in date strings, as one might commonly encounter
> > in `TH` calls to assign a revision date to a man page, for example.

AFAIR at the time I escaped these because they looked parseable dates,
pretty close to ISO 8601. And there is at least escaped versions of
the epoch in getspnam.3. But rechecking now it seems there are many
other instances of the same string, so these were perhaps newer than
my initial change, or I missed them at the time.

> > Similarly, we would not escape the hyphen in the sentence: "While I was
> > in Quebec, I met Yves St-Denis.".[1]

Sure, but I don't find these comparable. :)

> What do standards say about formatting dates?  Do they specify the
> character?  I read some RFCs, but didn't see it specified, other than
> calling it literally '"-"'.  No name of the character, or ASCII code.
> 
> However, date(1) only accepts hyphen-minus, so it would be nice to use a
> compatible format, even if standards didn't mandate it.
> 
> I'll hold the patch, to allow for some discussion, but I want to apply it.

In any case, while it's true that there are easier ways to get the epoch,
these still look like things that could end up being parsed? So my
instinct would be to escape them, but I don't think I care much either
way, so I'm happy to revert that patch and resend (or feel free to do
that yourself), or update all the other instances which I missed and
resend.

Thanks,
Guillem



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux