From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: PATCH: 3.1.5: fix for case-insensitivity patch
Date: Tue, 01 Dec 1998 15:46:16 +0100 [thread overview]
Message-ID: <9812011446.AA29219@ibmth.df.unipi.it> (raw)
% [[ Modules = (#i)*m* ]] || print Stephenson\'s wrecked the shell again
Stephenson's wrecked the shell again
*** Misc/globtests.ci3 Tue Nov 3 11:35:36 1998
--- Misc/globtests Tue Dec 1 15:39:36 1998
***************
*** 112,116 ****
--- 112,117 ----
f fooxx ((#i)FOOX)X
f BAR (bar|(#i)foo)
t FOO (bar|(#i)foo)
+ t Modules (#i)*m*
EOT
print "$failed tests failed."
*** Misc/globtests.ksh.ci3 Tue Nov 3 11:35:54 1998
--- Misc/globtests.ksh Tue Dec 1 15:39:32 1998
***************
*** 96,100 ****
--- 96,101 ----
f fooxx @((#i)FOOX)X
f BAR @(bar|(#i)foo)
t FOO @(bar|(#i)foo)
+ t Modules (#i)*m*
EOT
print "$failed tests failed."
*** Src/glob.c.ci3 Sat Nov 14 16:31:54 1998
--- Src/glob.c Tue Dec 1 15:41:23 1998
***************
*** 2182,2187 ****
--- 2182,2196 ----
}
}
+ /*
+ * Match characters with case-insensitivity.
+ * Note CHARMATCH(x,y) != CHARMATCH(y,x)
+ */
+ #define CHARMATCH(x, y) \
+ (x == y || (((c->stat & C_IGNCASE) ? (tulower(x) == tulower(y)) : \
+ (c->stat & C_LCMATCHUC) ? (islower(y) && tuupper(y) == x) : 0)))
+
+
/* see if current string in pptr matches c */
/**/
***************
*** 2219,2225 ****
for (; *pptr; pptr++) {
if (*pptr == Meta)
pptr++;
! else if (*pptr == looka)
break;
}
if (!*(saves = pptr))
--- 2228,2234 ----
for (; *pptr; pptr++) {
if (*pptr == Meta)
pptr++;
! else if (CHARMATCH(*pptr, looka))
break;
}
if (!*(saves = pptr))
***************
*** 2589,2598 ****
}
continue;
}
! if (*pptr == *pat ||
! (((c->stat & C_IGNCASE) ? (tulower(*pat) == tulower(*pptr)) :
! (c->stat & C_LCMATCHUC) ?
! (islower(*pat) && tuupper(*pat) == *pptr) : 0))) {
/* just plain old characters */
pptr++;
pat++;
--- 2598,2604 ----
}
continue;
}
! if (CHARMATCH(*pptr, *pat)) {
/* just plain old characters */
pptr++;
pat++;
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
reply other threads:[~1998-12-01 15:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9812011446.AA29219@ibmth.df.unipi.it \
--to=pws@ibmth.df.unipi.it \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).