From owner-freebsd-current Sun Mar 26 19:20:25 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id TAA01712 for current-outgoing; Sun, 26 Mar 1995 19:20:25 -0800 Received: from obiwan.pmr.com ([199.98.84.130]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id TAA01706 for ; Sun, 26 Mar 1995 19:20:19 -0800 Received: by obiwan.pmr.com (Smail3.1.29.1 #4) id m0rt5LG-00030fC; Sun, 26 Mar 95 21:19 CST Message-Id: From: bob@obiwan.pmr.com (Bob Willcox) Subject: Re: tgetnum wierdness on -current To: ache@astral.msk.su (Andrey A. Chernov Black Mage) Date: Sun, 26 Mar 1995 21:19:45 -0600 (CST) Cc: freebsd-current@freefall.cdrom.com In-Reply-To: from "Andrey A. Chernov, Black Mage" at Mar 27, 95 06:50:58 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 2207 Sender: current-owner@FreeBSD.org Precedence: bulk Andrey A. Chernov, Black Mage wrote: > > In message 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