#include <config.h>
#include <fnmatch.h>
#include <alloca.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <wctype.h>
#include <wchar.h>
#include "fnmatch_loop.c"
Defines | |
#define | __builtin_expect(expr, expected) (expr) |
#define | WIDE_CHAR_SUPPORT |
#define | SIZE_MAX ((size_t) -1) |
#define | NO_LEADING_PERIOD(flags) ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD)) |
#define | isblank(c) ((c) == ' ' || (c) == '\t') |
#define | STREQ(s1, s2) (strcmp (s1, s2) == 0) |
#define | CHAR_CLASS_MAX_LENGTH 256 |
#define | IS_CHAR_CLASS(string) wctype (string) |
#define | ISWCTYPE(WC, WT) iswctype (WC, WT) |
#define | HANDLE_MULTIBYTE 1 |
#define | FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c)) |
#define | CHAR char |
#define | UCHAR unsigned char |
#define | INT int |
#define | FCT internal_fnmatch |
#define | EXT ext_match |
#define | END end_pattern |
#define | L_(CS) CS |
#define | BTOWC(C) btowc (C) |
#define | STRLEN(S) strlen (S) |
#define | STRCAT(D, S) strcat (D, S) |
#define | MEMPCPY(D, S, N) mempcpy (D, S, N) |
#define | MEMCHR(S, C, N) memchr (S, C, N) |
#define | STRCOLL(S1, S2) strcoll (S1, S2) |
#define | FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c)) |
#define | CHAR wchar_t |
#define | UCHAR wint_t |
#define | INT wint_t |
#define | FCT internal_fnwmatch |
#define | EXT ext_wmatch |
#define | END end_wpattern |
#define | L_(CS) L##CS |
#define | BTOWC(C) (C) |
#define | STRLEN(S) wcslen (S) |
#define | STRCAT(D, S) wcscat (D, S) |
#define | MEMPCPY(D, S, N) wmempcpy (D, S, N) |
#define | MEMCHR(S, C, N) wmemchr (S, C, N) |
#define | STRCOLL(S1, S2) wcscoll (S1, S2) |
#define | WIDE_CHAR_VERSION 1 |
#define | IS_CHAR_CLASS(string) is_char_class (string) |
#define | ALLOCA_LIMIT 2000 |
Functions | |
int | fnmatch (const char *pattern, const char *string, int flags) |
#define __builtin_expect | ( | expr, | ||
expected | ||||
) | (expr) |
#define ALLOCA_LIMIT 2000 |
#define BTOWC | ( | C | ) | (C) |
#define BTOWC | ( | C | ) | btowc (C) |
#define CHAR char |
#define CHAR wchar_t |
#define CHAR_CLASS_MAX_LENGTH 256 |
#define END end_pattern |
#define END end_wpattern |
#define EXT ext_match |
#define EXT ext_wmatch |
#define FCT internal_fnwmatch |
#define FCT internal_fnmatch |
#define FOLD | ( | c | ) | ((flags & FNM_CASEFOLD) ? tolower (c) : (c)) |
#define FOLD | ( | c | ) | ((flags & FNM_CASEFOLD) ? towlower (c) : (c)) |
#define HANDLE_MULTIBYTE 1 |
#define INT wint_t |
#define INT int |
#define IS_CHAR_CLASS | ( | string | ) | is_char_class (string) |
#define IS_CHAR_CLASS | ( | string | ) | wctype (string) |
#define isblank | ( | c | ) | ((c) == ' ' || (c) == '\t') |
#define ISWCTYPE | ( | WC, | ||
WT | ||||
) | iswctype (WC, WT) |
#define L_ | ( | CS | ) | L##CS |
#define L_ | ( | CS | ) | CS |
#define NO_LEADING_PERIOD | ( | flags | ) | ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD)) |
#define SIZE_MAX ((size_t) -1) |
#define STRCAT | ( | D, | ||
S | ||||
) | wcscat (D, S) |
#define STRCAT | ( | D, | ||
S | ||||
) | strcat (D, S) |
#define STRCOLL | ( | S1, | ||
S2 | ||||
) | wcscoll (S1, S2) |
#define STRCOLL | ( | S1, | ||
S2 | ||||
) | strcoll (S1, S2) |
#define STREQ | ( | s1, | ||
s2 | ||||
) | (strcmp (s1, s2) == 0) |
#define STRLEN | ( | S | ) | wcslen (S) |
#define STRLEN | ( | S | ) | strlen (S) |
#define UCHAR wint_t |
#define UCHAR unsigned char |
#define WIDE_CHAR_SUPPORT |
(HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \ && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY))
#define WIDE_CHAR_VERSION 1 |
int fnmatch | ( | const char * | pattern, | |
const char * | string, | |||
int | flags | |||
) |