Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: termcap/terminfo support in modules
- X-seq: zsh-workers 13242
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: PATCH: termcap/terminfo support in modules
- Date: Tue, 5 Dec 2000 20:11:14 -0500
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxxxxxx>
- In-reply-to: <0G53002DHD17BT@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>; from pws@xxxxxxx on Tue, Dec 05, 2000 at 10:55:56AM +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <0G53002BKCE9BT@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <0G53002DHD17BT@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
> 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;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author