bug-ncurses
[Top][All Lists]
Advanced

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

Re: Different behavior in Linux and Mac OS X


From: Sebastiano Vigna
Subject: Re: Different behavior in Linux and Mac OS X
Date: Sun, 9 May 2021 10:01:07 +0100


> On 9 May 2021, at 03:34, Sebastiano Vigna <sebastiano.vigna@unimi.it> wrote:
> 
> 
> 
>> On 9 May 2021, at 03:20, Sebastiano Vigna <sebastiano.vigna@unimi.it> wrote:
>> 
>> No, that's the first thing I tried. It almost works, but not completely. The 
>> cursor is not always positioned correctly. There is some visible improvement 
>> from the no-setupterm() version, but still it does not work.
> 
> Let me be more precise:
> 
> - If I unset TERM, the behavior is identical to not calling setupterm()
> - If I set TERM to "dummy" , the behavior is identical to not calling 
> setupterm()
> - If I set TERM to "ansi", or leave it xterm-256color, some cursor placement 
> happens but, for example, when moving around the update of line and column 
> numbers happen in the middle of the screen, instead of the status bar.

Got it: if I call tgetent()/setupterm(), tgoto() works, but the parameters 
row,col are exchanged in Linux vs. Mac OS X. If I manually fix the code 
everything works (but then not on Mac OS X). Note that TERM=xterm-256color in 
both cases.

In any case, this does not work around the problem because I need the --ansi 
option to work even if the terminfo database is somehow broken. And calling 
tgetent()/setupterm() won't work with a non-existing terminal (in the sense 
that it does not set up anything).

Is there some way I can test the fixes? I'm OK even without a workaround if I 
know that in the future everything will work...

Ciao,

                                        seba




reply via email to

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