rpm  5.4.10
Macros | Functions | Variables
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

§ BTOWC

#define BTOWC (   C)    btowc (C)

Definition at line 159 of file fnmatch.c.

§ CHAR

#define CHAR   char

Definition at line 148 of file fnmatch.c.

§ CHAR_CLASS_MAX_LENGTH

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

Definition at line 111 of file fnmatch.c.

§ END

#define END   end_pattern

Definition at line 153 of file fnmatch.c.

§ EXT

#define EXT   ext_match

Definition at line 152 of file fnmatch.c.

§ FCT

#define FCT   internal_fnmatch

Definition at line 151 of file fnmatch.c.

§ FOLD

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

Definition at line 146 of file fnmatch.c.

§ INT

#define INT   int

Definition at line 150 of file fnmatch.c.

§ internal_function

#define internal_function

Definition at line 139 of file fnmatch.c.

§ IS_CHAR_CLASS

#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"))
#define STREQ(s1, s2)
Definition: fnmatch.c:80

Definition at line 113 of file fnmatch.c.

§ ISALNUM

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

Definition at line 71 of file fnmatch.c.

§ ISALPHA

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

Definition at line 72 of file fnmatch.c.

§ ISASCII

#define ISASCII (   c)    1

Definition at line 53 of file fnmatch.c.

§ ISBLANK

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

Definition at line 61 of file fnmatch.c.

§ ISCNTRL

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

Definition at line 73 of file fnmatch.c.

§ ISDIGIT

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

Definition at line 70 of file fnmatch.c.

§ ISGRAPH

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

Definition at line 66 of file fnmatch.c.

§ ISLOWER

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

Definition at line 74 of file fnmatch.c.

§ ISPRINT

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

Definition at line 69 of file fnmatch.c.

§ ISPUNCT

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

Definition at line 75 of file fnmatch.c.

§ ISSPACE

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

Definition at line 76 of file fnmatch.c.

§ ISUPPER

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

Definition at line 77 of file fnmatch.c.

§ ISXDIGIT

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

Definition at line 78 of file fnmatch.c.

§ L

#define L (   CS)    CS

§ MEMCHR

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

Definition at line 173 of file fnmatch.c.

§ MEMPCPY

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

Definition at line 166 of file fnmatch.c.

§ NO_LEADING_PERIOD

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

Definition at line 38 of file fnmatch.c.

§ STRCAT

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

Definition at line 162 of file fnmatch.c.

§ STRCOLL

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

Definition at line 174 of file fnmatch.c.

§ STREQ

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

Definition at line 80 of file fnmatch.c.

§ STRLEN

#define STRLEN (   S)    strlen (S)

Definition at line 161 of file fnmatch.c.

Referenced by rpmperlRun().

§ STRUCT

#define STRUCT   fnmatch_struct

Definition at line 154 of file fnmatch.c.

§ UCHAR

#define UCHAR   unsigned char

Definition at line 149 of file fnmatch.c.

Function Documentation

§ __fnmatch_mempcpy()

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

Definition at line 168 of file fnmatch.c.

§ fnmatch()

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 argvStrcasecmp(), cacheWalkPathFilter(), glob_in_dir(), mireRegexec(), and mtreeVWalk().

Variable Documentation

§ errno

int errno

§ posixly_correct

int posixly_correct
static

Definition at line 134 of file fnmatch.c.