From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15453 invoked from network); 12 Feb 2002 17:16:28 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 Feb 2002 17:16:28 -0000 Received: (qmail 22032 invoked by alias); 12 Feb 2002 17:16:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16614 Received: (qmail 22021 invoked from network); 12 Feb 2002 17:16:21 -0000 Date: Tue, 12 Feb 2002 17:16:20 +0000 To: zsh-workers@sunsite.dk Subject: Re: PATCH: Re: zsh: can't find terminal definition on vt100 Message-ID: <20020212171620.GC17816@fysh.org> References: <1020212165549.ZM15901@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1020212165549.ZM15901@candle.brasslantern.com> User-Agent: Mutt/1.3.27i From: Zefram Bart Schaefer wrote: >--- Src/init.c 2001/10/22 17:03:58 1.7 >+++ Src/init.c 2002/02/12 16:40:47 >@@ -535,11 +535,15 @@ > > #ifdef TGETENT_ACCEPTS_NULL > /* If possible, we let tgetent allocate its own termcap buffer */ >- if (tgetent(NULL, term) != 1) { >+# ifdef TGETENT_ZERO_SUCCESS >+ if (tgetent(NULL, term) != 0) >+# else >+ if (tgetent(NULL, term) != 1) >+# endif > #else >- if (tgetent(termbuf, term) != 1) { >+ if (tgetent(termbuf, term) != 1) > #endif >- >+ { Surely these two conditions are orthogonal -- your configure tests are orthogonal -- so we really want code like if ( #ifdef TGETENT_ACCEPTS_NULL tgetent(NULL, term) #else tgetent(termbuf, term) #endif #ifdef TGETENT_ZERO_SUCCESS != 0 #else != 1 #endif ) { Or, of course, make it clearer by defining macros for TGETENT_SUCCESS etc. -zefram