NetBSD-Bugs archive

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

Re: bin/39883: tput support for setaf terminfo sequence is broken

Yes, indeed, I misunderstood.  I should only have been using
tgetstr().  That's what I started out doing, then in trying to
diagnose the problem further I added the tgetnum() and tgetflag(),
which didn't do what I thought they did.

Yes, it's related to terminfo.  In fact, it came up when I was trying
to write code to support both terminfo and termcap systems, e.g.
    if tput setaf 0; then
        black=$(tput setaf 0)
        red=$(tput setaf 1)
    elif tput AF 0; then
        black=$(tput setaf 0)
        red=$(tput setaf 1)

And for some reason the code was entering the terminfo branch rather
than the termcap branch, inspite of my NetBSD system not really
supporting terminfo.

So you're saying the truncation is more of a "feature" than a bug and
I'll have to find another way?

I *think* putting the termcap branch first might work.  At least it
does on all the Linux and NetBSD systems I've tried so far.

Thanks John


Home | Main Index | Thread Index | Old Index