From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8925 invoked from network); 31 May 2000 06:12:37 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 May 2000 06:12:37 -0000 Received: (qmail 8205 invoked by alias); 31 May 2000 06:12:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11680 Received: (qmail 8180 invoked from network); 31 May 2000 06:12:28 -0000 Date: Tue, 30 May 2000 23:12:25 -0700 (PDT) From: Wayne Davison To: Zsh Workers Subject: Re: PATCH: fix for $var[1,0] expansion In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII One thing I just noticed is that the two "subscript too small/big" error messages have never output the correct array value for one- relative arrays. My just-released patch accidentally split the difference so that it was only half right in 1-relative mode, but also half right in ksh (0-relative) mode. This patch should fix it so that it works right all the time. Index: params.c @@ -1312,13 +1312,13 @@ if (v->start > MAX_ARRLEN || v->start < -MAX_ARRLEN) { zerr("subscript too %s: %d", (v->start < 0) ? "small" : "big", - v->start); + v->start + !isset(KSHARRAYS)); return NULL; } if (v->start + v->len > MAX_ARRLEN || v->start + v->len < -MAX_ARRLEN) { zerr("subscript too %s: %d", (v->len < 0) ? "small" : "big", - v->start + v->len); + v->start + v->len - !!isset(KSHARRAYS)); return NULL; } return v; ..wayne..