1 /* Copyright (C) 1992 Free Software Foundation, Inc. 2 This file is part of the GNU C Library. 3 4 The GNU C Library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Library General Public License as 6 published by the Free Software Foundation; either version 2 of the 7 License, or (at your option) any later version. 8 9 The GNU C Library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Library General Public License for more details. */ 13 14 /* 15 * Modified for WinCvs/MacCVS : Alexandre Parenteau <aubonbeurre@hotmail.com> --- June 1998 16 */ 17 18 #ifndef _FNMATCH_H 19 20 #define _FNMATCH_H 1 21 22 #ifdef __cplusplus 23 extern "C" 24 { 25 #endif 26 27 #define FNM_NOMATCH 1 /* Match failed. */ 28 #define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ 29 #define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ 30 #define FNM_PERIOD 0x04 /* Period must be matched by period. */ 31 #define FNM_LEADING_DIR 0x08 /* Ignore /<tail> after Imatch. */ 32 #define FNM_CASEFOLD 0x10 /* Case insensitive search. */ 33 #define FNM_PREFIX_DIRS 0x20 /* Directory prefixes of pattern match too. */ 34 35 /* Value returned by `fnmatch' if STRING does not match PATTERN. */ 36 #undef FNM_NOMATCH 37 #define FNM_NOMATCH 1 38 39 #if !defined(__STDC__) && (defined(WIN32)|| defined(TARGET_OS_MAC)) 40 # define __STDC__ 1 41 #endif 42 43 /* Match STRING against the filename pattern PATTERN, 44 returning zero if it matches, FNM_NOMATCH if not. */ 45 #if __STDC__ 46 extern int fnmatch (const char *pattern, const char *string, int flags); 47 #else 48 extern int fnmatch (); 49 #endif 50 51 #if defined (__CYGWIN32__) || defined (WIN32) 52 /* Under Windows NT, filenames are case-insensitive, and both / and \ 53 are path component separators. */ 54 55 # define FOLD_FN_CHAR(c) (WNT_filename_classes[(unsigned char) (c)]) 56 extern unsigned char WNT_filename_classes[]; 57 #endif /* defined (__CYGWIN32__) || defined (WIN32) */ 58 59 #ifdef __cplusplus 60 } 61 #endif 62 63 #endif /* fnmatch.h */ 64