93#define NEGATE_CLASS '^'
95#define OPTIMIZE_JUST_STAR
97#undef MATCH_TAR_PATTERN
103static int DoMatch(
const char *text,
const char *p)
109 for ( ; *p; text++, p++) {
110 if (*text ==
'\0' && *p !=
'*')
141 if (p[1] ==
']' || p[1] ==
'-')
144 for (last = *p; *++p && *p !=
']'; last = *p)
146 if (*p ==
'-' && p[1] !=
']'
147 ? *text <= *++p && *text >= last : *text == *p)
149 if (matched == reverse)
155#ifdef MATCH_TAR_PATTERN
159 return *text ==
'\0';
168#ifdef OPTIMIZE_JUST_STAR
169 if (p[0] ==
'*' && p[1] ==
'\0')
int wildmat(const char *text, const char *p)
static int DoMatch(const char *text, const char *p)