Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: 3.1.6-pws-4: backreferences
- X-seq: zsh-workers 7834
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: 3.1.6-pws-4: backreferences
- Date: Wed, 15 Sep 1999 09:48:30 +0200
- In-reply-to: "Peter Stephenson"'s message of "Tue, 14 Sep 1999 15:45:38 DFT." <9909141345.AA24591@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> - Really stringy strings are now optimized during pattern compilation, not
> just execution: if there is no remaining token after remnulargs(), normal
> compilation is skipped and the string saved as it is.
Oops. This was slightly overoptimised, removing the ability of stringy
filename path segments to approximate or case-desensitize.
(e.g. (#a1)tst/ac failed to match tst/ab).
--- Src/pattern.c.pat2 Tue Sep 14 15:07:09 1999
+++ Src/pattern.c Wed Sep 15 09:35:12 1999
@@ -338,11 +338,12 @@
if (!(patflags & PAT_ANY)) {
/* Look for a really pure string, with no tokens at all. */
- for (strp = exp; *strp &&
- (!(patflags & PAT_FILE) || *strp != '/') && !itok(*strp);
- strp++)
- ;
- if (*strp && *strp != '/') {
+ if (!patglobflags)
+ for (strp = exp; *strp &&
+ (!(patflags & PAT_FILE) || *strp != '/') && !itok(*strp);
+ strp++)
+ ;
+ if (!strp || (*strp && *strp != '/')) {
/* No, do normal compilation. */
strp = NULL;
if (patcompswitch(0, &flags) == 0)
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author