tech-userlevel archive

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

Re: terminfo vs termcap



On Friday 05 June 2009 16:48:31 Julian Coleman wrote:
> Hi,
>
> > So I looked into what we have, and I think we can do quite a bit by
> > providing libterminfo to read the terminfo db's and provide termcap
> > compat functions and a basic tic compiler to convert termcap(5) and
> > terminfo(5) sources into terminfo.dbs. curses(3) would have to be
> > re-tooled around libterminfo of course.
>
> I did wonder about creating a terminfo compatible part of our libterm. 
> This would allow us to support those extra terminfo calls that are not in
> the current libterm.  The most useful one to me was tparm().
>
> I was thinking of still using termcap as the back end.  Basically, the
> compatible part would have a mapping between terminfo and termcap
> capabilities.  For example, if you called:
>
>   tigetstr("cud");
>
> it would translate internally to:
>
>   t_getstr(tc, "DO", NULL, l);
>
> (Functions without a termcap mapping would be extra).  That wouldn't
> involve any changes to the curses library.

How would you cater for codes defined by terminfo but not by termcap?
How would >2 parameters to tparm be handled?

Thanks

Roy


Home | Main Index | Thread Index | Old Index