Better case insensitve search support for pattern with meta chars.

In some rare cases this does not work proper before flag FNM_ICASE was
added to fnmatch(3).
This commit is contained in:
Wolfram Schneider 1996-10-20 16:54:51 +00:00
parent 95e4966c47
commit efcc77ba70
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19060

View File

@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: fastfind.c,v 1.2 1996/10/09 00:33:32 wosch Exp $
* $Id: fastfind.c,v 1.3 1996/10/13 01:44:34 wosch Exp $
*/
@ -300,7 +300,14 @@ fastfind
break;
if (*p == '\0') { /* fast match success */
found = 1;
if (!globflag || !fnmatch(pathpart, path, 0)) {
if (!globflag ||
#ifndef FF_ICASE
!fnmatch(pathpart, path, 0))
#else
!fnmatch(pathpart, path,
FNM_ICASE))
#endif /* !FF_ICASE */
{
if (f_silent)
counter++;
else if (f_limit) {