tech-userlevel archive

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

Re: recent terminfo changes



On 27/03/2020 14:32, Christos Zoulas wrote:
In article <431d1631-ef82-d1ec-98ff-e39b71418233%marples.name@localhost>,
Roy Marples  <roy%marples.name@localhost> wrote:
On 27/03/2020 13:15, Christos Zoulas wrote:


On Mar 27, 2020, at 4:05 AM, Roy Marples <roy%marples.name@localhost> wrote:

On 27/03/2020 02:06, Christos Zoulas wrote:
@@ -494,6 +530,7 @@
   	if (tic == NULL)
   		return NULL;
   +	tic->rtype = _ti_find_rtype(cap);
   	buf.buf = NULL;
   	buf.buflen = 0;

If I'm reading this patch correctly, it means that the old terminfo
library cannot read the records for at least screen-256color and
xterm-256color because they will be stored in version 3.

Yes, and I can fix that by implementing the full proposal with just a
few more lines of code:
1. create a v1 entry with clamped values
2. create a v3 entry called <name>@v3
3. always lookup for <name>@v3 first and if that fails, use <name>.

I am not sure if it is worth it, as the user can always export
TERM=xterm and export TERM=screen to get a slightly less functional and
working setup.
But if people feel otherwise, I will make my fingers even shorter and
implement it.

I think it's worthwhile not to break people working terminals.

Ok, done.

Next time please test your before and after changes.

Your import of newer terminfo descriptions broke numerics larger than int16_t.
I take equal blame for this because there should have been a check for this in the initial code.
But still you could have checked.

Likewise, this change didn't really help screen-256color or xterm-256color which I did ask you to test, but clearly you didn't because you would have spotted ncv having a numeric value greater than what a v1 record should hold in infocmp output for screen-256color. Also things like tetris and vifm were either in black and white or just didn't work due to not being a color terminal.

I was hoping to finish the final piece to import dhcpcd-9 this weekend, but instead I've spent my time fixing this fallout.

Roy


Home | Main Index | Thread Index | Old Index