From: Wayne Davison <wayned@users.sourceforge.net>
To: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: Compilation error in Src/Modules/curses.c on HP-UX
Date: Sun, 16 Dec 2007 17:42:31 -0800 [thread overview]
Message-ID: <20071217014231.GF22518@blorf.net> (raw)
In-Reply-To: <20071217004133.GB11772@sverige>
[-- Attachment #1: Type: text/plain, Size: 481 bytes --]
On Mon, Dec 17, 2007 at 12:41:33AM +0000, Paul Ackersviller wrote:
> 1332 if (getyx(w->win, intarr[0], intarr[1]) == ERR ||
> 1333 getbegyx(w->win, intarr[2], intarr[3]) == ERR ||
> 1334 getmaxyx(w->win, intarr[4], intarr[5]) == ERR)
These are all defined as returning void in both the linux docs and hp
docs that I checked. So this checking of the return values is illegal.
I didn't check-in the attached patch because my zsh build isn't building
this code.
..wayne..
[-- Attachment #2: zcurses.patch --]
[-- Type: text/x-diff, Size: 705 bytes --]
--- Src/Modules/curses.c 14 Dec 2007 15:14:07 -0000 1.43
+++ Src/Modules/curses.c 17 Dec 2007 01:36:15 -0000
@@ -1329,9 +1329,14 @@ zccmd_position(const char *nam, char **a
w = (ZCWin)getdata(node);
/* Look no pointers: these are macros. */
- if (getyx(w->win, intarr[0], intarr[1]) == ERR ||
- getbegyx(w->win, intarr[2], intarr[3]) == ERR ||
- getmaxyx(w->win, intarr[4], intarr[5]) == ERR)
+ getyx(w->win, intarr[0], intarr[1]);
+ if (intarr[0] == -1)
+ return 1;
+ getbegyx(w->win, intarr[2], intarr[3]);
+ if (intarr[2] == -1)
+ return 1;
+ getmaxyx(w->win, intarr[4], intarr[5]);
+ if (intarr[4] == -1)
return 1;
array = (char **)zalloc(7*sizeof(char *));
next prev parent reply other threads:[~2007-12-17 1:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-16 14:08 Release status update Peter Stephenson
2007-12-16 17:37 ` Mutt mailbox completion with "=" (was: Release status update) Vincent Lefevre
2007-12-16 19:31 ` Peter Stephenson
2007-12-16 21:46 ` Vincent Lefevre
2007-12-17 0:41 ` Compilation error in Src/Modules/curses.c on HP-UX Paul Ackersviller
2007-12-17 1:42 ` Wayne Davison [this message]
2007-12-18 16:22 ` Paul Ackersviller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071217014231.GF22518@blorf.net \
--to=wayned@users.sourceforge.net \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).