From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2072 invoked from network); 5 Dec 2000 10:56:30 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Dec 2000 10:56:30 -0000 Received: (qmail 21644 invoked by alias); 5 Dec 2000 10:56:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13234 Received: (qmail 21636 invoked from network); 5 Dec 2000 10:56:23 -0000 Date: Tue, 05 Dec 2000 10:55:56 +0000 From: Peter Stephenson Subject: Re: PATCH: termcap/terminfo support in modules In-reply-to: "Your message of Tue, 05 Dec 2000 10:42:09 GMT." <0G53002BKCE9BT@la-la.cambridgesiliconradio.com> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Message-id: <0G53002DHD17BT@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT > A bigger problem is that the configure variable is wrongly named. Sorry to keep sending short messages on the same thing, but: % echoti foo zsh: segmentation fault (core dumped) zsh 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'. Index: Src/Modules/terminfo.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/terminfo.c,v retrieving revision 1.2 diff -u -r1.2 terminfo.c --- Src/Modules/terminfo.c 2000/12/05 00:28:46 1.2 +++ Src/Modules/terminfo.c 2000/12/05 10:55:33 @@ -67,7 +67,7 @@ /* get a string-type capability */ t = (char *)tigetstr(s); - if (!t || !*t) { + if (!t || t == (char *)-1 || !*t) { /* capability doesn't exist, or (if boolean) is off */ zwarnnam(name, "no such terminfo capability: %s", s, 0); return 1; -- Peter Stephenson Software Engineer Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070