wei@princeton.UUCP (P Wei) (11/20/85)
In curses.h file , there is a external variable declaration : extern int LINES, COLS Can anyone tell me where they (LINES, COLS) are defined? Are they set by reading the termcap database ? How can I read the lines and colums information from that database? HP Wei (wei@princeton) Thanks!
jsdy@hadron.UUCP (Joseph S. D. Yao) (12/01/85)
Both Berkeley and System V have reasonably comprehensive, if not
always comprehensible, descriptions of curses routines. Warning:
System V Release 2.0 Version 1 & following refer to terminfo
curses, not termcap curses, which while much similar is not
exactly similar.
I believe one of the recent AT&T folks' books had a section on
using termcap and curses. Bourne? Kernighan & Pike?
Anyway, to answer your question, initscr() initialises LINES and
COLS. Warning: if you have a TTY 5620 (blit, jerq, whatever),
then you will have to modify initscr.c to include the
ioctl(JIOCTLwhatever) for the windows. The code can be found in
ex_tty.c for s5r1 (but not r2!). Also Warning: the terminfo
description for the 5620 delivered with the 5620 package is wrong:
it should have the nel=^J deleted.
--
Joe Yao hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}