From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22470 invoked from network); 6 Dec 2000 01:11:48 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Dec 2000 01:11:48 -0000 Received: (qmail 25831 invoked by alias); 6 Dec 2000 01:11:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13242 Received: (qmail 25824 invoked from network); 6 Dec 2000 01:11:22 -0000 Date: Tue, 5 Dec 2000 20:11:14 -0500 From: Clint Adams To: Peter Stephenson Cc: Zsh hackers list Subject: Re: PATCH: termcap/terminfo support in modules Message-ID: <20001205201114.A14193@dman.com> References: <0G53002BKCE9BT@la-la.cambridgesiliconradio.com> <0G53002DHD17BT@la-la.cambridgesiliconradio.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <0G53002DHD17BT@la-la.cambridgesiliconradio.com>; from pws@csr.com on Tue, Dec 05, 2000 at 10:55:56AM +0000 > The culprit appears to be tigetstr(s) on Solaris 2.6 returning 0xffffffff, > which looks a lot like -1. Indeed, although the manual entry claims > blithely at the end `routines that return pointers always return NULL on > error', it seems this returns -1 to indicate `not a string value'. The same applies to $terminfo: Index: Src/Modules/terminfo.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/terminfo.c,v retrieving revision 1.3 diff -u -r1.3 terminfo.c --- Src/Modules/terminfo.c 2000/12/05 11:00:08 1.3 +++ Src/Modules/terminfo.c 2000/12/06 01:01:45 @@ -165,7 +165,7 @@ pm->u.str = num ? dupstring("yes") : dupstring("no"); pm->flags |= PM_SCALAR; } - else if ((tistr = (char *)tigetstr(name)) != NULL) + else if ((tistr = (char *)tigetstr(name)) != NULL && tistr != (char *)-1) { pm->u.str = dupstring(tistr); pm->flags |= PM_SCALAR;