Current-Users archive

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

Re: HEADS UP: terminfo imported into -current



On 02/05/10 19:35, Brian Buhrow wrote:
        Hello.  I wrote the wwterminfo.c file which exists in
/usr/src/usr.bin/window/wwterminfo.c when I ported the window(1) utility to
Solaris back in 1993 or so.  It relies on there being a captoinfo(1)
utility to function.  How would the window(1) utility be expected to work
in the new environment?  And, yes, this is a utility I use every day.

So, essentially you take termcap string, adjust the column and line numbers and then convert it to terminfo using captoinfo(1).

I would suggest using infocmp(1) to grab the existing terminfo entry for the terminal and adjust cols# and lines# accordingly, save to the file and then compile it with tic(1).

On the other hand, I do wonder just how useful that is in real world applications as many terminals say cols#80, lines#24 when they're really not that. Say like xterm or rxvt. If I were writing an app that relied on knowing the window size I would use the TIOCGWINSZ ioctl, query $COLUMNS, $LINES, or call `stty size` before looking at terminfo/termcap.

Thanks

Roy


Home | Main Index | Thread Index | Old Index