Update source to use posix fnmatch

This commit is contained in:
jtc 1993-06-16 17:19:05 +00:00
parent d93597c5c4
commit 1fe93ef40d
3 changed files with 6 additions and 3 deletions

View File

@ -51,6 +51,7 @@ static char sccsid[] = "@(#)function.c 5.17 (Berkeley) 5/24/91";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fnmatch.h>
#include "find.h"
#define FIND_EQUAL 0
@ -556,7 +557,7 @@ f_name(plan, entry)
PLAN *plan;
FTSENT *entry;
{
return(!fnmatch(plan->c_data, entry->fts_name, FNM_QUOTE));
return(!fnmatch(plan->c_data, entry->fts_name, 0));
}
PLAN *

View File

@ -75,6 +75,7 @@ static char sccsid[] = "@(#)locate.c 5.2 (Berkeley) 6/1/90";
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <fnmatch.h>
#include "locate.h"
#include "pathnames.h"
@ -136,7 +137,7 @@ fastfind(pathpart)
if (*p == NULL) { /* fast match success */
found = 1;
if (!globflag ||
!fnmatch(pathpart, path, FNM_QUOTE))
!fnmatch(pathpart, path, 0))
(void)printf("%s\n", path);
break;
}

View File

@ -42,6 +42,7 @@ static char sccsid[] = "@(#)verify.c 5.9 (Berkeley) 3/12/91";
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
#include <fnmatch.h>
#include "mtree.h"
extern NODE *root;
@ -99,7 +100,7 @@ vwalk()
for (ep = level; ep; ep = ep->next)
if (ep->flags & F_MAGIC && !fnmatch(ep->name,
p->fts_name, FNM_PATHNAME|FNM_QUOTE) ||
p->fts_name, FNM_PATHNAME) ||
!strcmp(ep->name, p->fts_name)) {
ep->flags |= F_VISIT;
if (ep->flags & F_IGN) {