Go to the source code of this file.
|
static int rangematch | __PR ((const char *, wchar_t, int, char **, mbstate_t *)) |
|
static int fnmatch1 | __PR ((const char *, const char *, const char *, int, mbstate_t, mbstate_t)) |
|
int | fnmatch (char *pattern, const char *string, int flags) const |
|
int | js_fnmatch (char *pattern, const char *string, int flags) const |
|
static int | fnmatch1 (char *pattern, const char *string, const char *stringstart, int flags, mbstate_t patmbs, mbstate_t strmbs) const |
|
static int | rangematch (char *pattern, wchar_t test, int flags, char **newp, mbstate_t *patmbs) const |
|
◆ CL_SIZE
◆ EOS
◆ RANGE_ERROR
◆ RANGE_MATCH
◆ RANGE_NOMATCH
◆ __PR() [1/2]
◆ __PR() [2/2]
◆ fnmatch()
◆ fnmatch1()
Definition at line 130 of file fnmatch.c.
138 const char *bt_pattern, *bt_string;
145 bt_pattern = bt_string =
NULL;
148 if (pclen == (
size_t)-1 || pclen == (
size_t)-2)
152 if (sclen == (
size_t)-1 || sclen == (
size_t)-2) {
153 sc = (
unsigned char)*
string;
155 memset(&strmbs, 0,
sizeof (strmbs));
170 (
string == stringstart ||
182 (
string == stringstart ||
206 bt_pattern =
pattern, bt_patmbs = patmbs;
207 bt_string =
string, bt_strmbs = strmbs;
215 (
string == stringstart ||
235 if (pclen == (
size_t)-1 || pclen == (
size_t)-2)
258 if (bt_pattern ==
NULL)
262 if (sclen == (
size_t)-1 ||
263 sclen == (
size_t)-2) {
264 sc = (
unsigned char)*bt_string;
274 pattern = bt_pattern, patmbs = bt_patmbs;
275 string = bt_string, strmbs = bt_strmbs;
_Tp _STLP_CALL norm(const complex< _Tp > &__z)
size_t __cdecl mbrtowc(_Pre_maybenull_ _Post_z_ wchar_t *_DstCh, _In_reads_bytes_opt_(_SizeInBytes) _Pre_opt_z_ const char *_SrcCh, _In_ size_t _SizeInBytes, _Out_opt_ mbstate_t *_State)
static int rangematch(char *pattern, wchar_t test, int flags, char **newp, mbstate_t *patmbs) const
char * strchr(const char *String, int ch)
Referenced by js_fnmatch().
◆ js_fnmatch()
Definition at line 111 of file fnmatch.c.
static int fnmatch1(char *pattern, const char *string, const char *stringstart, int flags, mbstate_t patmbs, mbstate_t strmbs) const
Referenced by fnmatch().
◆ rangematch()
Definition at line 289 of file fnmatch.c.
299 wchar_t otest =
test;
303 struct xlocale_collate *
table = (
struct xlocale_collate *)
304 __get_locale()->components[XLC_COLLATE];
342 if (pclen == (
size_t)-1 || pclen == (
size_t)-2)
346 if (!quoted &&
c ==
'[') {
356 if (*
p ==
':' &&
p[1] ==
']')
372 if (
strcmp(
class,
"upper") == 0)
376 else if (
strcmp(
class,
"lower") == 0)
394 if (pclen == (
size_t)-1 || pclen == (
size_t)-2)
404 if (
table->__collate_load_error ?
406 __wcollate_range_cmp(
c,
test) <= 0 &&
407 __wcollate_range_cmp(
test, c2) <= 0)
413 }
else if (
c ==
test)
size_t __cdecl mbrtowc(_Pre_maybenull_ _Post_z_ wchar_t *_DstCh, _In_reads_bytes_opt_(_SizeInBytes) _Pre_opt_z_ const char *_SrcCh, _In_ size_t _SizeInBytes, _Out_opt_ mbstate_t *_State)
int __cdecl iswctype(wint_t wc, wctype_t wctypeFlags)
wctype_t __cdecl wctype(const char *)
int strcmp(const char *String1, const char *String2)
Referenced by fnmatch1().
◆ sccsid
Initial value:=
"@(#)fnmatch.c 8.24 17/08/30 2005-2017 J. Schilling from 8.2 (Berkeley)"
Definition at line 4 of file fnmatch.c.