Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!elroy!gryphon!desint!geoff From: geoff@desint.UUCP (Geoff Kuenning) Newsgroups: comp.mail.elm Subject: Re: termcap and terminfo definitions for 43 line mode Summary: Perhaps elm should respect LINES/COLUMNS Keywords: termcap terminfo Message-ID: <14@desint.UUCP> Date: 8 Mar 89 04:49:05 GMT References: <323@wubios.wustl.edu> <480@ispi.UUCP> Reply-To: geoff@desint.UUCP (Geoff Kuenning) Organization: Interrupt Technology Corp., Manhattan Beach, CA Lines: 25 In article <480@ispi.UUCP> jbayer@ispi.UUCP (Jonathan Bayer) writes: > Below is a termcap entry for a vt-100, with the lines changed to 43 > lines instead of the normal 24. > > d1|vt100|vt-100|pt100|pt-100|dec vt100:\ > :am:co#80:li#43:cl=50\E[;H\E[2J:bs:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ > ^^^^^ > This was changed from 24 to 43 > ... Perhaps elm should respect the environment variables LINES and COLUMNS, even on termcap systems. Although these variables are technically defined only for terminfo, the idea seems to be very useful to me, and the implementation is simplicity itself: co = tgetnum ("co"); if (getenv ("COLUMNS") != NULL) co = atoi (getenv ("COLUMNS")); and similarly for LINES. The code above is just a sample taken from what I am going to do for ispell; it can be improved if the double call to getenv offends you. -- Geoff Kuenning geoff@ITcorp.com uunet!desint!geoff