From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19267 invoked from network); 19 Mar 1998 17:21:48 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 19 Mar 1998 17:21:48 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id MAA27307; Thu, 19 Mar 1998 12:07:21 -0500 (EST) Resent-Date: Thu, 19 Mar 1998 12:07:21 -0500 (EST) From: "Bart Schaefer" Message-Id: <980319090627.ZM8562@candle.brasslantern.com> Date: Thu, 19 Mar 1998 09:06:27 -0800 In-Reply-To: <199803191432.PAA16308@hydra.ifh.de> Comments: In reply to Peter Stephenson "Glob qualifier close parenthesis tidy up" (Mar 19, 3:32pm) References: <199803191432.PAA16308@hydra.ifh.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: PATCH: 3.0.5 Glob qualifier close parenthesis tidy up MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"zEZIM1.0.cg6.83L4r"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3809 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Mar 19, 3:32pm, Peter Stephenson wrote: } Subject: Glob qualifier close parenthesis tidy up } } This fixes } } % print foo(:g/o/a) } fa?o } ^ 8-bit squiggle } } which is actually two bugs: first, the `)' was included; second, the } tokens in the expression weren't removed. Here's the patch against the original 3.0.5 (i.e., PWS's kshglob patch is -not- needed first). --- glob.c.orig Wed Nov 19 08:40:29 1997 +++ glob.c Thu Mar 19 09:03:07 1998 @@ -144,6 +144,8 @@ } if (*str == ':' && str[-1] == Inpar) { str[-1] = '\0'; + str[strlen(str)-1] = '\0'; + untokenize(str); modify((char **) &getdata(np), &str); return; } @@ -175,8 +177,9 @@ break; if (*s == Inpar) { /* Real qualifiers found. */ + str[sl-1] = '\0'; *s++ = '\0'; - while (*s != Outpar && !colonmod) { + while (*s && !colonmod) { func = (int (*) _((Statptr, long)))0; if (idigit(*s)) { /* Store numeric argument for qualifier */ @@ -202,6 +205,7 @@ /* Remaining arguments are history-type * * colon substitutions, handled separately. */ colonmod = s - 1; + untokenize(colonmod); break; case Hat: case '^': @@ -363,7 +367,7 @@ zerr("unknown user", NULL, 0); data = 0; } - if ((*tt = sav) != Outpar) + if ((*tt = sav)) s = tt + 1; else s = tt; @@ -396,7 +400,7 @@ zerr("unknown group", NULL, 0); data = 0; } - if ((*tt = sav) != Outpar) + if ((*tt = sav)) s = tt + 1; else s = tt; -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com