fnmatch.c File Reference
`#include "system.h"`
`#include <string.h>`
`#include "debug.h"`
`#include "fnmatch_loop.c"`
Include dependency graph for fnmatch.c:

Go to the source code of this file.

## Macros

#define | NO_LEADING_PERIOD(flags) ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))
#define | ISASCII(c) 1
#define | ISBLANK(c) ((c) == ' ' || (c) == '\t')
#define | ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
#define | ISPRINT(c) (ISASCII (c) && isprint (c))
#define | ISDIGIT(c) (ISASCII (c) && isdigit (c))
#define | ISALNUM(c) (ISASCII (c) && isalnum (c))
#define | ISALPHA(c) (ISASCII (c) && isalpha (c))
#define | ISCNTRL(c) (ISASCII (c) && iscntrl (c))
#define | ISLOWER(c) (ISASCII (c) && islower (c))
#define | ISPUNCT(c) (ISASCII (c) && ispunct (c))
#define | ISSPACE(c) (ISASCII (c) && isspace (c))
#define | ISUPPER(c) (ISASCII (c) && isupper (c))
#define | ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
#define | STREQ(s1, s2) ((strcmp (s1, s2) == 0))
#define | CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
#define | IS_CHAR_CLASS(string)
#define | internal_function
#define | FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? 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 | STRUCT fnmatch_struct
#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) __fnmatch_mempcpy (D, S, N)
#define | MEMCHR(S, C, N) memchr (S, C, N)
#define | STRCOLL(S1, S2) strcoll (S1, S2)

## Functions

static void * | __fnmatch_mempcpy (void *, const void *, size_t)
int | fnmatch (char *pattern, const char *string, int flags) const

## Variables

int | errno
static int | posixly_correct

## Macro Definition Documentation

#define BTOWC | ( |  | C | ) | btowc (C)

Definition at line 159 of file fnmatch.c.

#define CHAR char

Definition at line 148 of file fnmatch.c.

#define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */

Definition at line 111 of file fnmatch.c.

#define END end_pattern

Definition at line 153 of file fnmatch.c.

#define EXT ext_match

Definition at line 152 of file fnmatch.c.

#define FCT internal_fnmatch

Definition at line 151 of file fnmatch.c.

#define FOLD | ( |  | c | ) | ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))

Definition at line 146 of file fnmatch.c.

#define INT int

Definition at line 150 of file fnmatch.c.

#define internal_function

Definition at line 139 of file fnmatch.c.

#define IS_CHAR_CLASS | ( |  | string | ) |

Value:
(STREQ (string, "alpha") || STREQ (string, "upper") \
|| STREQ (string, "lower") || STREQ (string, "digit") \
|| STREQ (string, "alnum") || STREQ (string, "xdigit") \
|| STREQ (string, "space") || STREQ (string, "print") \
|| STREQ (string, "punct") || STREQ (string, "graph") \
|| STREQ (string, "cntrl") || STREQ (string, "blank"))

Definition at line 113 of file fnmatch.c.

#define ISALNUM | ( |  | c | ) | (ISASCII (c) && isalnum (c))

Definition at line 71 of file fnmatch.c.

#define ISALPHA | ( |  | c | ) | (ISASCII (c) && isalpha (c))

Definition at line 72 of file fnmatch.c.

#define ISASCII | ( |  | c | ) | 1

Definition at line 53 of file fnmatch.c.

#define ISBLANK | ( |  | c | ) | ((c) == ' ' || (c) == '\t')

Definition at line 61 of file fnmatch.c.

#define ISCNTRL | ( |  | c | ) | (ISASCII (c) && iscntrl (c))

Definition at line 73 of file fnmatch.c.

#define ISDIGIT | ( |  | c | ) | (ISASCII (c) && isdigit (c))

Definition at line 70 of file fnmatch.c.

#define ISGRAPH | ( |  | c | ) | (ISASCII (c) && isprint (c) && !isspace (c))

Definition at line 66 of file fnmatch.c.

#define ISLOWER | ( |  | c | ) | (ISASCII (c) && islower (c))

Definition at line 74 of file fnmatch.c.

#define ISPRINT | ( |  | c | ) | (ISASCII (c) && isprint (c))

Definition at line 69 of file fnmatch.c.

#define ISPUNCT | ( |  | c | ) | (ISASCII (c) && ispunct (c))

Definition at line 75 of file fnmatch.c.

#define ISSPACE | ( |  | c | ) | (ISASCII (c) && isspace (c))

Definition at line 76 of file fnmatch.c.

#define ISUPPER | ( |  | c | ) | (ISASCII (c) && isupper (c))

Definition at line 77 of file fnmatch.c.

#define ISXDIGIT | ( |  | c | ) | (ISASCII (c) && isxdigit (c))

Definition at line 78 of file fnmatch.c.

#define L | ( |  | CS | ) | CS

Definition at line 155 of file fnmatch.c.

Referenced by cacheStashLatest(), compare(), httpOpen(), mtreeVisitF(), printFileInfo(), rpmdbClose(), rpmioFreePoolItem(), rpmpsFree(), and rpmtsCheck().

#define MEMCHR | ( |  | S,
|  |  | C,
|  |  | N
| ) |  | memchr (S, C, N)

Definition at line 173 of file fnmatch.c.

#define MEMPCPY | ( |  | D,
|  |  | S,
|  |  | N
| ) |  | __fnmatch_mempcpy (D, S, N)

Definition at line 166 of file fnmatch.c.

#define NO_LEADING_PERIOD | ( |  | flags | ) | ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))

Definition at line 38 of file fnmatch.c.

#define STRCAT | ( |  | D,
|  |  | S
| ) |  | strcat (D, S)

Definition at line 162 of file fnmatch.c.

#define STRCOLL | ( |  | S1,
|  |  | S2
| ) |  | strcoll (S1, S2)

Definition at line 174 of file fnmatch.c.

#define STREQ | ( |  | s1,
|  |  | s2
| ) |  | ((strcmp (s1, s2) == 0))

Definition at line 80 of file fnmatch.c.

#define STRLEN | ( |  | S | ) | strlen (S)

Definition at line 161 of file fnmatch.c.

#define STRUCT fnmatch_struct

Definition at line 154 of file fnmatch.c.

#define UCHAR unsigned char

Definition at line 149 of file fnmatch.c.

## Function Documentation

static void * __fnmatch_mempcpy | ( | void * | dest,
|  | const void * | src,
|  | size_t | n
| ) |  |

static

Definition at line 168 of file fnmatch.c.

int fnmatch | ( | char * | pattern,
|  | const char * | string,
|  | int | flags
| ) |  | const

Definition at line 273 of file fnmatch.c.

References alloca(), and FNM_PERIOD.

Referenced by cacheWalkPathFilter(), glob_in_dir(), mireRegexec(), and mtreeVWalk().

## Variable Documentation

int errno

int posixly_correct

static

Definition at line 134 of file fnmatch.c.