FreeBSD kernel libkern code
fnmatch.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/ctype.h>
#include <sys/libkern.h>
Include dependency graph for fnmatch.c:

Go to the source code of this file.

Macros

#define EOS   '\0'
 
#define RANGE_MATCH   1
 
#define RANGE_NOMATCH   0
 
#define RANGE_ERROR   (-1)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int rangematch (const char *, char, int, char **)
 
int fnmatch (const char *pattern, const char *string, int flags)
 

Macro Definition Documentation

◆ EOS

#define EOS   '\0'

Definition at line 47 of file fnmatch.c.

◆ RANGE_ERROR

#define RANGE_ERROR   (-1)

Definition at line 51 of file fnmatch.c.

◆ RANGE_MATCH

#define RANGE_MATCH   1

Definition at line 49 of file fnmatch.c.

◆ RANGE_NOMATCH

#define RANGE_NOMATCH   0

Definition at line 50 of file fnmatch.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ fnmatch()

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

Definition at line 56 of file fnmatch.c.

References c, EOS, fnmatch(), RANGE_ERROR, RANGE_MATCH, RANGE_NOMATCH, rangematch(), strchr(), and tolower.

Referenced by fnmatch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rangematch()

static int rangematch ( const char *  pattern,
char  test,
int  flags,
char **  newp 
)
static

Definition at line 159 of file fnmatch.c.

References c, EOS, RANGE_ERROR, RANGE_MATCH, RANGE_NOMATCH, and tolower.

Referenced by fnmatch().

Here is the caller graph for this function: