fnmatch.h 2.0 KB
Newer Older
1
/*****************************************************************************\
S
Shengliang Guan 已提交
2 3 4 5 6 7 8 9 10 11 12
*                                                                             *
*   Filename:	    fnmatch.h						      *
*                                                                             *
*   Description:    DOS/WIN32 port of standard C library's fnmatch.h.	      *
*                                                                             *
*   Notes:	    Reference for fnmatch and glob:			      *
*    http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_9.html *
*                                                                             *
*   History:								      *
*    2012-01-17 JFL Created this file.					      *
*									      *
13
*         Copyright 2016 Hewlett Packard Enterprise Development LP          *
S
Shengliang Guan 已提交
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/

#ifndef _FNMATCH_H
#define _FNMATCH_H      1

#include "msvclibx.h"

#ifdef  __cplusplus
extern "C" {
#endif

/* Bits set in the FLAGS argument to fnmatch() */
#define FNM_PATHNAME	0x01	/* Wildcards don't match '/' or '\\' */
#define FNM_FILE_NAME FNM_PATHNAME /* Equivalent GNU name */
#define FNM_NOESCAPE	0x02	/* Backslashes don't quote special chars (Irrelevant in DOS/Windows) */
#define FNM_PERIOD	0x04	/* Wildcards don't match leading dots */
#define FNM_LEADING_DIR	0x08	/* Match up to the first '/' or '\\' */
#define FNM_CASEFOLD	0x10	/* Case-insentitive comparison */

/* Values returned by fnmatch() */
#define FNM_MATCH	0	/* Non standard, but makes fnmatch.c more readable */ 
#define FNM_NOMATCH	1

/* Value returned by fnmatch() if unsupported */
#define FNM_NOSYS      (-1)

/* Match NAME against the filename pattern PATTERN,
   returning zero if it matches, FNM_NOMATCH if not.  */
extern int fnmatch(const char *pszPattern, const char *pszName, int iFlags);

#ifdef  __cplusplus
}
#endif

#endif /* !defined(_FNMATCH_H) */