Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 1995 21:19:45 -0600 (CST)
From:      bob@obiwan.pmr.com (Bob Willcox)
To:        ache@astral.msk.su (Andrey A. Chernov Black Mage)
Cc:        freebsd-current@freefall.cdrom.com
Subject:   Re: tgetnum wierdness on -current
Message-ID:  <m0rt5LG-00030fC@obiwan.pmr.com>
In-Reply-To: <XLIWYTlCT1@astral.msk.su> from "Andrey A. Chernov, Black Mage" at Mar 27, 95 06:50:58 am

next in thread | previous in thread | raw e-mail | index | archive | help
Andrey A. Chernov, Black Mage wrote:
> 
> In message <m0rt26U-000300C@obiwan.pmr.com> Bob Willcox writes:
> >Except that here my xterm termcap entry specifies line number as
> >24, yet tgetnum("li") returns 65 when executed in a remote xterm,
> >regardless of window size or termcap setting.
> 
> What do you mean by "executed in a remote xterm"?
> As I understand, you need to check environment (TERM,TERMCAP)
> and termcap file on _remote_ system...

>From an xterm on one system (running FreeBSD 1.1.5.1) I am rlogining
into another system (running FreeBSD -current built today).  The
termcap file on the remote (-current) system looks ok and has a
line count of 24 (li#24).  However, if I do a tgetnum("li") (or
the tput li command) the output value is 65.  From a virtual console
or xterm on the -current system I get the correct output from
tgetnum("li").

> 
> >On a related problem I'm having, the ioctl call in setterm() in
> >curses is failing on the second and subquent calls to setterm().
> >(This is why I saw the tgetnum("li") problem.)  It works ok the
> >first time, but resizing the window exposes the failure when the
> >application does another initscr().  The application (and curses)
> >then thinks the window has 65 rows and misbehaves accordingly.
> 
> I don't think that application can use several initscr()s, only one.
> But you can use several endwin()s freely, next refresh() must
> restore screen modes after endwin().

The application in question is files-2.2p1 that I am trying to port
to run on FreeBSD.  Whenever it receives a SIGWINCH signal it
terminates the current window by calling endwin() then reinstates
it by calling initscr().  It also calls wrefresh() for each of its
logical windows plus a number of other initializations.

I can email you the file that handles all of this if you would like
(its about 1000 lines).  I have had little experience with curses
and can't really tell if what is being done is ligitmate or not.


-- 
Bob Willcox                ...!{rutgers|ames}!cs.utexas.edu!uudell!obiwan!bob
Austin, TX                                 or: @uudell.us.dell.com:obiwan!bob
512-258-4224 (home), 512-838-3914 (work)          or: obiwan%bob@uunet.uu.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0rt5LG-00030fC>