version 1.14, 1999/03/16 18:13:45 |
version 1.15, 1999/09/16 11:44:56 |
Line 51 __RCSID("$NetBSD$"); |
|
Line 51 __RCSID("$NetBSD$"); |
|
*/ |
*/ |
|
|
#include "namespace.h" |
#include "namespace.h" |
|
|
|
#include <assert.h> |
#include <fnmatch.h> |
#include <fnmatch.h> |
#include <string.h> |
#include <string.h> |
|
|
Line 70 fnmatch(pattern, string, flags) |
|
Line 72 fnmatch(pattern, string, flags) |
|
const char *stringstart; |
const char *stringstart; |
char c, test; |
char c, test; |
|
|
|
_DIAGASSERT(pattern != NULL); |
|
_DIAGASSERT(string != NULL); |
|
#ifdef _DIAGNOSTIC |
|
if (pattern == NULL || string == NULL) |
|
return (FNM_NOMATCH + 1); |
|
/* per SUS, return non zero but not FNM_NOMATCH */ |
|
#endif |
|
|
for (stringstart = string;;) |
for (stringstart = string;;) |
switch (c = *pattern++) { |
switch (c = *pattern++) { |
case EOS: |
case EOS: |
Line 152 rangematch(pattern, test, flags) |
|
Line 162 rangematch(pattern, test, flags) |
|
int negate, ok; |
int negate, ok; |
char c, c2; |
char c, c2; |
|
|
|
_DIAGASSERT(pattern != NULL); |
|
|
/* |
/* |
* A bracket expression starting with an unquoted circumflex |
* A bracket expression starting with an unquoted circumflex |
* character produces unspecified results (IEEE 1003.2-1992, |
* character produces unspecified results (IEEE 1003.2-1992, |