version 1.11.4.1, 1996/09/19 20:02:33 |
version 1.12, 1997/07/13 18:57:26 |
|
|
* SUCH DAMAGE. |
* SUCH DAMAGE. |
*/ |
*/ |
|
|
|
#include <sys/cdefs.h> |
#if defined(LIBC_SCCS) && !defined(lint) |
#if defined(LIBC_SCCS) && !defined(lint) |
#if 0 |
#if 0 |
static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94"; |
static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94"; |
#else |
#else |
static char rcsid[] = "$NetBSD$"; |
__RCSID("$NetBSD$"); |
#endif |
#endif |
#endif /* LIBC_SCCS and not lint */ |
#endif /* LIBC_SCCS and not lint */ |
|
|
Line 49 static char rcsid[] = "$NetBSD$"; |
|
Line 50 static char rcsid[] = "$NetBSD$"; |
|
* Compares a filename or pathname to a pattern. |
* Compares a filename or pathname to a pattern. |
*/ |
*/ |
|
|
#include "namespace.h" |
|
#include <fnmatch.h> |
#include <fnmatch.h> |
#include <string.h> |
#include <string.h> |
|
|
#ifdef __weak_alias |
|
__weak_alias(fnmatch,_fnmatch); |
|
#endif |
|
|
|
#define EOS '\0' |
#define EOS '\0' |
|
|
static const char *rangematch __P((const char *, int, int)); |
static const char *rangematch __P((const char *, int, int)); |
Line 158 rangematch(pattern, test, flags) |
|
Line 154 rangematch(pattern, test, flags) |
|
* consistency with the regular expression syntax. |
* consistency with the regular expression syntax. |
* J.T. Conklin (conklin@ngai.kaleida.com) |
* J.T. Conklin (conklin@ngai.kaleida.com) |
*/ |
*/ |
if (negate = (*pattern == '!' || *pattern == '^')) |
if ((negate = (*pattern == '!' || *pattern == '^')) != 0) |
++pattern; |
++pattern; |
|
|
for (ok = 0; (c = *pattern++) != ']';) { |
for (ok = 0; (c = *pattern++) != ']';) { |