From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27258 invoked by alias); 4 Aug 2014 18:36:35 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32952 Received: (qmail 18343 invoked from network); 4 Aug 2014 18:36:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140804113631.ZM1047@torch.brasslantern.com> Date: Mon, 04 Aug 2014 11:36:31 -0700 In-reply-to: <1407171088-8740-1-git-send-email-mikachu@gmail.com> Comments: In reply to Mikael Magnusson "PATCH: Add :^ syntax for zipping two arrays (v3)" (Aug 4, 6:51pm) References: <20140804170737.401d8a75@pwslap01u.europe.root.pri> <1407171088-8740-1-git-send-email-mikachu@gmail.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: PATCH: Add :^ syntax for zipping two arrays (v3) MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Aug 4, 6:51pm, Mikael Magnusson wrote: } Subject: PATCH: Add :^ syntax for zipping two arrays (v3) } } This includes tests, updated docs to mention the "${a:^a}" thing, and } fixes a crash discovered by adding tests. (When either of the arrays } were empty, the :^^ form attempted to divide by 0). Src/subst.c: In function `paramsubst': Src/subst.c:2882: warning: unused variable `ap' Src/subst.c:2882: warning: unused variable `apsrc' diff --git a/Src/subst.c b/Src/subst.c index fc1be7d..4a5fe3a 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -2879,7 +2879,7 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) break; } } else if (inbrace && (*s == '^' || *s == Hat)) { - char **zip, **ap, **apsrc; + char **zip; int shortest = 1; ++s; if (*s == '^' || *s == Hat) {