bug-ncurses
[Top][All Lists]
Advanced

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

Re: Tabstop width not reset by reset command, or hardcoded to wrong widt


From: Thomas Dickey
Subject: Re: Tabstop width not reset by reset command, or hardcoded to wrong width
Date: Sat, 25 May 2019 15:17:38 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, May 22, 2019 at 03:16:52PM +0545, Vincent Huisman wrote:
...
> Small remark on the original bug thread:
> > curses (SVr4 curses, ncurses, NetBSD)
> > all provide a library variable TABSIZE which an application could set to
> > reflect a tab-size which was set externally.  Otherwise, they all use the
> > initial-tabs value from the terminal database.
> I found that TABSIZE as well as init_tabs are used. In case
> TABSIZE!=init_tabs it is used to calculate where to place the cursor and
> that blows up when using hard tabs. I might be wrong, but this is my
> observation.

actually that's misleading: NetBSD tput doesn't initialize tabstops:

        
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/usr.bin/tput/tput.c?rev=1.26&content-type=text/plain&only_with_tag=MAIN

Interestingly enough, Solaris tput also doesn't:

        
https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/tput/tput.c
        
https://github.com/illumos/illumos-gate/blob/1f4c6dbc37f14382f7ff4575a74da056dbd34d66/usr/src/cmd/tput/tput.c#L509

But further,
the chunk in the ncurses source we're discussing was from ESR,
who adapted mytinfo, and according to the comment, got rid
of some extra logic using cursor-movement (which I see in mytinfo).

        
https://github.com/ThomasDickey/ncurses-snapshots/blob/5319a879ad316037c60c34b22a8442e7041dae17/progs/reset_cmd.c#L424

However, the code itself looks like the BSD code that Solaris uses.

Odd.

I rewrote the chunk, dropping the comment, and the result will be in today's
updates.

(by the way, your messages would be easier to read, with some whitespace)

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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