bug-ncurses
[Top][All Lists]
Advanced

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

Re: [PATCH 4/4] man/*.{1,1m,3x,5,7}: Soft-code ncurses version in `TH` c


From: G. Branden Robinson
Subject: Re: [PATCH 4/4] man/*.{1,1m,3x,5,7}: Soft-code ncurses version in `TH` call.
Date: Sat, 16 Mar 2024 16:10:23 -0500

Hi Thomas,

At 2024-03-16T16:59:44-0400, Thomas Dickey wrote:
> On Fri, Mar 15, 2024 at 11:49:29AM -0500, G. Branden Robinson wrote:
> 
> current groff (1.23.0) doesn't like the @'s in the .TH with this change.
> older (1.22.4) doesn't complain.

Unfortunately I can't reproduce this (on my branch where this change
came from, but I have nothing in it that I haven't already mailed).

$ ~/groff-stable/bin/nroff --version | head
GNU nroff (groff) version 1.23.0
$ sed -n '31p' man/tic.1m
.TH @TIC@ 1M 2023-12-30 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User 
commands"
$ ~/groff-stable/bin/nroff -mandoc ./man/tic.1m >/dev/null 2>&1 | grep . || 
echo no output
no output

> troff:./tic.1m:31: warning: missing closing delimiter in output comparison 
> operator (got a newline)
> troff:./tic.1m:31: warning: missing closing delimiter in output comparison 
> operator (got a newline)
> troff:./tic.1m:31: warning: missing closing delimiter in output comparison 
> operator (got a newline)
> troff:./tic.1m:31: warning: missing closing delimiter in output comparison 
> operator (got a newline)
> 
> line 31:
> .TH @TIC@ 1M 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "User 
> commands"

None of that is bad syntax.[1]  Please add the `-b` option to your nroff
command and share the results.  There is an output comparison operator
at work in the definition of `TH` macro, but I see nothing obviously
wrong with handing it this input.

Regards,
Branden

[1] It _will_ look weird to human readers, and maybe some scrapers.
    Months ago I took a lesson that the man pages in the ncurses source
    tree weren't to be formatted as-is, so I never do that.  I only
    render them from installed copies.

For what it's worth, here's what I get for headers and footers from this
input.

$ ~/groff-stable/bin/nroff -mandoc ./man/tic.1m | head -n 1
@TIC@(1M)                        User commands                       @TIC@(1M)
$ ~/groff-stable/bin/nroff -mandoc ./man/tic.1m | tail -n 1
ncurses @NCURSES_MAJOR@.@NCURS... 2023‐12‐30                         @TIC@(1M)

Attachment: signature.asc
Description: PGP signature


reply via email to

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