rpm  5.4.15
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 __builtin_expect(expr, expected)   (expr)
 
#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 __builtin_expect (   expr,
  expected 
)    (expr)

Definition at line 32 of file fnmatch.c.

Referenced by fnmatch().

#define BTOWC (   C)    btowc (C)

Definition at line 165 of file fnmatch.c.

#define CHAR   char

Definition at line 154 of file fnmatch.c.

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

Definition at line 117 of file fnmatch.c.

#define END   end_pattern

Definition at line 159 of file fnmatch.c.

#define EXT   ext_match

Definition at line 158 of file fnmatch.c.

#define FCT   internal_fnmatch

Definition at line 157 of file fnmatch.c.

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

Definition at line 152 of file fnmatch.c.

#define INT   int

Definition at line 156 of file fnmatch.c.

#define internal_function

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

Definition at line 119 of file fnmatch.c.

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

Definition at line 77 of file fnmatch.c.

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

Definition at line 78 of file fnmatch.c.

#define ISASCII (   c)    1

Definition at line 59 of file fnmatch.c.

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

Definition at line 67 of file fnmatch.c.

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

Definition at line 79 of file fnmatch.c.

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

Definition at line 76 of file fnmatch.c.

Referenced by convert_and_copy().

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

Definition at line 72 of file fnmatch.c.

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

Definition at line 80 of file fnmatch.c.

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

Definition at line 75 of file fnmatch.c.

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

Definition at line 81 of file fnmatch.c.

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

Definition at line 82 of file fnmatch.c.

Referenced by convert_and_copy(), and map_html_tags().

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

Definition at line 83 of file fnmatch.c.

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

Definition at line 84 of file fnmatch.c.

Referenced by convert_and_copy().

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

Definition at line 179 of file fnmatch.c.

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

Definition at line 172 of file fnmatch.c.

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

Definition at line 44 of file fnmatch.c.

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

Definition at line 168 of file fnmatch.c.

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

Definition at line 180 of file fnmatch.c.

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

Definition at line 86 of file fnmatch.c.

#define STRLEN (   S)    strlen (S)

Definition at line 167 of file fnmatch.c.

Referenced by rpmperlRun().

#define STRUCT   fnmatch_struct

Definition at line 160 of file fnmatch.c.

#define UCHAR   unsigned char

Definition at line 155 of file fnmatch.c.

Function Documentation

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

Definition at line 174 of file fnmatch.c.

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

Definition at line 279 of file fnmatch.c.

References __builtin_expect, alloca(), FNM_PERIOD, and pattern.

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

Variable Documentation

int errno
int posixly_correct
static

Definition at line 140 of file fnmatch.c.