Re: bad CHECKSTYLE diagnostic from groff man(7) (was: bpf-helpers.7: .TH line is... meh)

2022-08-02 Thread G. Branden Robinson
At 2022-08-02T22:57:34-0500, G. Branden Robinson wrote: > Here's a patch (attached). I haven't pushed this yet because my > regression tests are _also_ irascible, and this caused 6 of them fail. > All spuriously, I think, but nevertheless I can't push this fix without > satisfying myself that I've

bad CHECKSTYLE diagnostic from groff man(7) (was: bpf-helpers.7: .TH line is... meh)

2022-08-02 Thread G. Branden Robinson
At 2022-08-02T10:13:29-0500, G. Branden Robinson wrote: > No, I don't think groff's man(7) is in a disordered state, it is just > that one of the recent changes is, like its author, a little bit _too_ > irascible. [...] > I'll have a look and see what I can do. Here's a patch (attached). I haven'

Re: Counterexamples in C programming and library documentation (was: [PATCH v3] NULL.3const: Add documentation for NULL)

2022-08-02 Thread Alejandro Colomar
Hi Branden, On 8/2/22 21:06, G. Branden Robinson wrote: [content warning: yet another long software engineering rant] [this one took me many hours to read completely, including links, but was funny] At 2022-08-02T13:38:22+0200, Alejandro Colomar wrote: On 7/27/22 15:23, Douglas McIlroy w

Re: All caps .TH page title

2022-08-02 Thread DJ Chase
On Tue Aug 2, 2022 at 12:19 PM EDT, Alejandro Colomar wrote: > On 8/2/22 17:51, DJ Chase wrote: > > You could swap mandoc’s stderr and stdout, then filter it with sed and > > redirect sed to stderr: > > > > mandoc -W 3>&2 2>&1 1>&3 | sed '/reg/ex/d' >&2 > > > > Of course if mandoc also norma

Counterexamples in C programming and library documentation (was: [PATCH v3] NULL.3const: Add documentation for NULL)

2022-08-02 Thread G. Branden Robinson
[content warning: yet another long software engineering rant] At 2022-08-02T13:38:22+0200, Alejandro Colomar wrote: > On 7/27/22 15:23, Douglas McIlroy wrote: > > > > Incidentally, I personally don't use NULL. Why, when C provides a > > crisp notation, 0, should one want to haul in an extra inclu

Re: TAB character in groff output

2022-08-02 Thread Deri
On Tuesday, 2 August 2022 17:58:38 BST Ingo Schwarze wrote: > Then again, the wording > > "Typeset the glyph with code n in the current font ..." > > does provide an *implicit* hint that this can hardly be expected to > be device-independent. > > > when attempting it on a platform that uses IB

Re: TAB character in groff output

2022-08-02 Thread Alejandro Colomar
Hi Ingo, On 8/2/22 18:58, Ingo Schwarze wrote: [...] when attempting it on a platform that uses IBM code page 1047 as its input encoding. ;-) I would have expected the *output* font numbering to cause even more serious trouble than the *input* encoding. Besides, not being a masochist to that

Re: TAB character in groff output

2022-08-02 Thread Ingo Schwarze
Hi Branden, G. Branden Robinson wrote on Tue, Aug 02, 2022 at 10:42:45AM -0500: > At 2022-08-02T15:44:21+0200, Ingo Schwarze wrote: >> In groff, this works for me: >> >> $ printf "aN'9'b" | groff -T ascii | hexdump -C | head -n 1 >> 61 09 62 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a

Re: All caps .TH page title

2022-08-02 Thread Alejandro Colomar
Hi DJ Chase, On 8/2/22 17:51, DJ Chase wrote: On Tue Aug 2, 2022 at 5:55 AM EDT, Alejandro Colomar wrote: The thing is that I'm running mandoc(1) from a Makefile, which means that not only stdout/stderr is important, but also the exit status. There's no trivial way to ignore mandoc(1)'s error c

Re: All caps .TH page title

2022-08-02 Thread Alejandro Colomar
Hi Ingo, On 8/2/22 14:55, Ingo Schwarze wrote: Hi Alejandro, Alejandro Colomar wrote on Tue, Aug 02, 2022 at 12:58:41AM +0200: Would you mind disabling the following warning?: mandoc: man3type/regex_t.3type:7:5: STYLE: lower case character in document title: TH regex_t Yes. [...] Good.

Re: All caps .TH page title

2022-08-02 Thread DJ Chase
On Tue Aug 2, 2022 at 5:55 AM EDT, Alejandro Colomar wrote: > The thing is that I'm running mandoc(1) from a Makefile, which means > that not only stdout/stderr is important, but also the exit status. > There's no trivial way to ignore mandoc(1)'s error code for certain > warnings. Also, I run

Re: TAB character in groff output

2022-08-02 Thread G. Branden Robinson
At 2022-08-02T15:44:21+0200, Ingo Schwarze wrote: > In groff, this works for me: > > $ printf "aN'9'b" | groff -T ascii | hexdump -C | head -n 1 > 61 09 62 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a |a.b.| > > Mandoc behaves differently and treats \N'9' exactly like a lit

Re: TAB character in groff output

2022-08-02 Thread G. Branden Robinson
At 2022-08-02T14:14:58+0200, Alejandro Colomar wrote: > I'd like to be able to produce ASCII HT ('\t' - horizontal tab) in man > pages output. I don't want to align things; I do want a tab > character. Rationale: examples in fstab(5). > > Is that possible? I didn't find anything in groff_char(7)

Re: groff(7): ESCq: slanted quote (closing quote)

2022-08-02 Thread Dave Kemper
On 8/2/22, Alejandro Colomar wrote: > it might be better to show examples with \(aq. 2020 Branden agreed with you and made that change in commit 2bd31bb3 (http://git.savannah.gnu.org/cgit/groff.git/commit/?id=2bd31bb3).

Re: groff(7): ESCq: slanted quote (closing quote)

2022-08-02 Thread Alejandro Colomar
Hi Dave, On 8/2/22 17:31, Dave Kemper wrote: On 8/2/22, Alejandro Colomar wrote: it might be better to show examples with \(aq. 2020 Branden agreed with you and made that change in commit 2bd31bb3 (http://git.savannah.gnu.org/cgit/groff.git/commit/?id=2bd31bb3). Ahhh, it's true. I removed

Re: TAB character in groff output

2022-08-02 Thread Alejandro Colomar
Hi Ingo, On 8/2/22 15:44, Ingo Schwarze wrote: Hi Alejandro, Alejandro Colomar wrote on Tue, Aug 02, 2022 at 02:14:58PM +0200: I'd like to be able to produce ASCII HT ('\t' - horizontal tab) in man pages output. I don't want to align things; I do want a tab character. Rationale: examples in

Re: bpf-helpers.7: .TH line is... meh (was: [PATCH] bpf_doc.py: Use SPDX-License-Identifier)

2022-08-02 Thread G. Branden Robinson
Hi Alex, At 2022-08-02T13:07:29+0200, Alejandro Colomar wrote: > On 8/2/22 12:28, Quentin Monnet wrote: > > On 01/08/2022 23:13, Alejandro Colomar wrote: > > > > > > I've been running a linter on the man-pages, and had this > > > triggered from bpf-helpers.7: > > > > > > [ > > > $ make lint V=1

groff(7): ESCq: slanted quote (closing quote)

2022-08-02 Thread Alejandro Colomar
Hi Branden, After Ingo mentioned \N'9' for writing a tab (ASCII HT), I read the docs about it, which surprisingly show: \N’n’ Caused by: .de ESCq . Text "\f[CB]\e\\$1\[cq]\f[]\,\f[I]\\$2\/\f[]\f[CB]\[cq]\f[]" .. I guessed groff(1) expects one to use unslanted quotes, and that pasting that

Re: TAB character in groff output

2022-08-02 Thread Ingo Schwarze
Hi Alejandro, Alejandro Colomar wrote on Tue, Aug 02, 2022 at 02:14:58PM +0200: > I'd like to be able to produce ASCII HT ('\t' - horizontal tab) in man > pages output. I don't want to align things; I do want a tab character. > Rationale: examples in fstab(5). I don't understand. On Debian,

Re: All caps .TH page title

2022-08-02 Thread Ingo Schwarze
Hi Alejandro, Alejandro Colomar wrote on Tue, Aug 02, 2022 at 12:58:41AM +0200: > Would you mind disabling the following warning?: > > mandoc: man3type/regex_t.3type:7:5: STYLE: lower case character > in document title: TH regex_t Yes. Deleting that style recommendation is definitely one of th

Re: .so colophon.man

2022-08-02 Thread Bernd Petrovitsch
Hi all! On 31/07/2022 14:38, Alejandro Colomar (man-pages) wrote: [...] I think I'll remove the COLOPHON.  One less problem. Or add another preprocessing step which resolves another type of include for such cases. Idk if resolving the /^\.so / with a simple perl/whatever script seems useful s

TAB character in groff output

2022-08-02 Thread Alejandro Colomar
Hi Branden, I'd like to be able to produce ASCII HT ('\t' - horizontal tab) in man pages output. I don't want to align things; I do want a tab character. Rationale: examples in fstab(5). Is that possible? I didn't find anything in groff_char(7). Cheers, Alex -- Alejandro Colomar

Re: [PATCH v3] NULL.3const: Add documentation for NULL

2022-08-02 Thread Alejandro Colomar
Hi Doug, On 7/27/22 15:23, Douglas McIlroy wrote: Incidentally, I personally don't use NULL. Why, when C provides a crisp notation, 0, should one want to haul in an extra include file to activate a shouty version of it? Because I don't know what foo(a, b, 0, 0) is, and I don't know from mem

Re: bpf-helpers.7: .TH line is... meh (was: [PATCH] bpf_doc.py: Use SPDX-License-Identifier)

2022-08-02 Thread Alejandro Colomar
Hi Branden, On 8/2/22 12:28, Quentin Monnet wrote: On 01/08/2022 23:13, Alejandro Colomar wrote: I've been running a linter on the man-pages, and had this triggered from bpf-helpers.7: [ $ make lint V=1 LINT (groff)    tmp/lint/man7/bpf-helpers.7.lint-man.groff.touch groff -man -t -M ./etc/gr

Bug#1016527: rst2man: --date should be used to form the .TH title heading

2022-08-02 Thread Alejandro Colomar
Package: python3-docutils Version: 0.17.1+dfsg-2 Severity: normal Tags: upstream X-Debbugs-Cc: Alejandro Colomar , , Quentin Monnet Hi, The --date argument to rst2man(1) produces the following text: Generated on: -MM-DD And that text is put in the NAME section of the manual page. Tha

Re: .so colophon.man

2022-08-02 Thread Alejandro Colomar
Hi Bernd, On 8/2/22 12:24, Bernd Petrovitsch wrote: Hi all! On 31/07/2022 14:38, Alejandro Colomar (man-pages) wrote: [...] I think I'll remove the COLOPHON.  One less problem. Or add another preprocessing step which resolves another type of include for such cases. Idk if resolving the /^\.

Re: All caps .TH page title

2022-08-02 Thread Alejandro Colomar
Hi Bjarni, On 8/2/22 02:13, Bjarni Ingi Gislason wrote: It is simpler to use a filter, like #!/bin/dash mandoc -T lint $* | sed -e '/cannot parse date, using it verbatim:/d' \ -e '/empty block: UR$/d' \ -e '/: \.so is fragile, better use ln/,+3 d' \ -e '/: ignoring macro in table: /d' \ -e