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

Re: RHS: libterm-ansicolor-ruby



Adam Borowski <kilobyte@angband.pl> wrote:

> I'm afraid the very concept of termcap/terminfo is thoroughly broken. 
> It makes the following assumptions:

> * all TERM strings are known to all machines.  Mere ssh will break
>   otherwise.  And even after all these years, Solaris still doesn't
>   know what TERM="linux" means (the last time I checked it didn't, at
>   least).

That's not a technical problem...

> In other words, "TERM" is totally useless.  How is it supposed to
> tell me that I have to write spaces to every position instead of
> usual means of clearing the screen if bgcolor isn't transparent

man terminfo (on Solaris btw, the termcap equivalent doesn't match anyone
else's, but since Sun's provided terminfo is deficient, you may as well
install ncurses' terminfo):

     back_color_erase            bce       be        Screen erased with background color

> (older putties) -- and even if it could, neither termcap nor terminfo
> have means to convey this info.  Or, do I need to restore the \e[???m
> attrs after moving the cursor (libvt in some cases)?  Or, what are

ditto (msgr).

> the effects of \n on the line right to the cursor?  Or, how to be
> told if arrow keys pressed are Kpad ones or the new-style "gray"
> ones?

I'm afraid terminfo libraries cannot see your keyboard (but they can 
keep a list of the possibilities much better than a hand-crafted table
in a script ;-)

>>From my own experience, the only way to get decent portability is,
> ironically, hard-coding a certain subset of vt100ish codes.  Querying
> termcap/terminfo tends to lose rather fast in comparison.

oh.  Then you'll have to give up on color, since vt100's never did that.

bye

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Reply to: