From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17215 invoked from network); 18 Dec 1998 11:07:49 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 18 Dec 1998 11:07:49 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id GAA28235; Fri, 18 Dec 1998 06:00:38 -0500 (EST) Resent-Date: Fri, 18 Dec 1998 06:00:38 -0500 (EST) Date: Fri, 18 Dec 1998 11:59:03 +0100 (MET) Message-Id: <199812181059.LAA16690@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu In-reply-to: Peter Stephenson's message of Fri, 18 Dec 1998 11:24:50 +0100 Subject: Re: Identifier bug Resent-Message-ID: <"sIk913.0.6v6.LNZUs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4845 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Peter Stephenson wrote: > > I was just about to put together another development version when I > discovered this. > > % foo=(a b) > % foo[1]=c > zsh: not an identifier: foo[1] Ok, now I dare to propose this one. But note that this still has problems if the string inside the `[...]' contains unmatched opening or closing brackets. Bye Sven *** os/params.c Thu Dec 17 15:06:20 1998 --- Src/params.c Fri Dec 18 11:56:53 1998 *************** *** 661,669 **** return 0; /* Require balanced [ ] pairs */ ! for (s = ss; *(s += strcspn(++ss, "[]")) && s > ss; ss = s) ! ; ! return (*ss == ']' && !ss[1]); #endif } --- 661,669 ---- return 0; /* Require balanced [ ] pairs */ ! if (skipparens('[', ']', &ss)) ! return 0; ! return !*ss; #endif } -- Sven Wischnowsky wischnow@informatik.hu-berlin.de