Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: zsh: can't find terminal definition on vt100
- X-seq: zsh-workers 16614
- From: Zefram <zefram@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: Re: zsh: can't find terminal definition on vt100
- Date: Tue, 12 Feb 2002 17:16:20 +0000
- In-reply-to: <1020212165549.ZM15901@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <OFDD995582.DCFA00B7-ON86256B57.00686D2E@xxxxxxxxxxxxxxx> <1020212165549.ZM15901@xxxxxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author