bug-ncurses
[Top][All Lists]
Advanced

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

Re: [PATCH 7/8] include/Caps*: Work around DWB 3.3 tbl limitation.


From: G. Branden Robinson
Subject: Re: [PATCH 7/8] include/Caps*: Work around DWB 3.3 tbl limitation.
Date: Sat, 2 Mar 2024 18:09:11 -0600

Hi Thomas,

At 2024-03-02T10:15:11-0500, Thomas Dickey wrote:
> On Sun, Feb 25, 2024 at 01:23:41AM -0600, G. Branden Robinson wrote:
> > AT&T troff's limited name space and tbl's use of a diversion for
> > each table entry using a text block means that tbl gives up on the
> > table if it "runs out of" diversions.
> > 
> > I get the same diagnostic, at a different line number, on the
> > version of terminfo(5) page from ncurses 6.2+20201114.
> > 
> > Work around this by breaking up the capability tables about every 62
> > lines.  I made parallel changes to all Caps* files (keeping in mind
> > the different column widths in Caps.uwin), but did not inspect them
> > all.
> 
> doing that does move the (unwanted) blank lines that groff produces in
> the tables

You shouldn't still be seeing that problem in groff 1.23.0.  As far as
I'm aware, the bug affected only terminal output on groff 1.22.4 and
earlier.

https://savannah.gnu.org/bugs/?57665

> - but since calculating the "best" places to insert table end/start
> depends on the number of wrapped lines,

I don't think that's the case.  The best place to insert table end/start
sequences is before DWB tbl runs out of (names for) text block
diversions.  Because of the structure of this tbl input, there's only
one of those per row.

But I didn't dig deeply into this to see exactly where DWB runs out.

> I guess there's no simple way to choose those places.

I don't know that it's worth the trouble to choose them carefully if no
other implementation has a problem.

> > If someone sees the diagnostic below with an AT&T tbl/troff, this is
> > the solution.
> > 
> > This produces cosmetic differences in groff Git and mandoc's
> > terminal output, but not groff 1.23.0 or 1.22.4 or Heirloom
> > Doctools.
> 
> actually with 1.22.4, it adds 4 blank lines (at some points in the
> output, that shows up as two blank lines in a row).

Somehow I missed that.  Re-reviewing it, I see the following changes to
the capability tables.

$ diff -U1000 ncurses-20240224.groff-1224 ncurses-20240224gbr.groff-1224
[...]
        insert_null_glitch         in        in  insert mode distinguishes nulls
+
+
        memory_above               da        da  display may be retained above
                                                 the screen
[...]
        dot_horz_spacing           spinh     Yc  spacing of dots horizontally in
                                                 dots per inch
-
        max_micro_address          maddr     Yd  maximum value in
                                                 micro_..._address
        clr_eos                    ed        cd  clear to end of screen (P*)
+
+
        column_address             hpa       ch  horizontal position #1, 
absolute
[...]
        key_sr                     kri       kR  scroll‐backward key
-
        key_stab                   khts      kT  set‐tab key
[...]
        parm_down_cursor           cud       DO  down #1 lines (P*)
+
        parm_ich                   ich       IC  insert #1 characters (P*)
[...]
        key_screate                kCRT      *3  shifted create key
-
        key_sdc                    kDC       *4  shifted delete‐character key
[...]
        key_f15                    kf15      F5  F15 function key
+
        key_f16                    kf16      F6  F16 function key
[...]
        change_res_vert            cvr       ZD  Change vertical resolution to 
#1
-
-
        define_char                defc      ZE  Define a character #1, #2 dots
                                                 wide, descender #3
[...]
        micro_right                mcuf1     Zb  Like cursor_right in micro mode
+
+
        micro_row_address          mvpa      Zc  Like row_address #1 in micro
                                                 mode
[...]
                                       Code
        String Capability Name     TI        TC  Description
        
──────────────────────────────────────────────────────────────────────────
-
        enter_horizontal_hl_mode   ehhlm     Xh  Enter horizontal highlight mode


I used scripts that generate and diffed output from several formatters.
I'm attaching them in case they are of some help.

> 1.23.0 shows no difference.

Regards,
Branden

Attachment: mancomp
Description: mancomp

Attachment: mandiff
Description: mandiff

Attachment: signature.asc
Description: PGP signature


reply via email to

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