1*404b540aSrobert /* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc. 2*404b540aSrobert 3*404b540aSrobert NOTE: The canonical source of this file is maintained with the GNU C Library. 4*404b540aSrobert Bugs can be reported to bug-glibc@prep.ai.mit.edu. 5*404b540aSrobert 6*404b540aSrobert This program is free software; you can redistribute it and/or modify it 7*404b540aSrobert under the terms of the GNU General Public License as published by the 8*404b540aSrobert Free Software Foundation; either version 2, or (at your option) any 9*404b540aSrobert later version. 10*404b540aSrobert 11*404b540aSrobert This program is distributed in the hope that it will be useful, 12*404b540aSrobert but WITHOUT ANY WARRANTY; without even the implied warranty of 13*404b540aSrobert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*404b540aSrobert GNU General Public License for more details. 15*404b540aSrobert 16*404b540aSrobert You should have received a copy of the GNU General Public License 17*404b540aSrobert along with this program; if not, write to the Free Software 18*404b540aSrobert Foundation, 51 Franklin Street - Fifth Floor, 19*404b540aSrobert Boston, MA 02110-1301, USA. */ 20*404b540aSrobert 21*404b540aSrobert #ifndef _FNMATCH_H 22*404b540aSrobert 23*404b540aSrobert #define _FNMATCH_H 1 24*404b540aSrobert 25*404b540aSrobert #ifdef __cplusplus 26*404b540aSrobert extern "C" { 27*404b540aSrobert #endif 28*404b540aSrobert 29*404b540aSrobert #if defined (__cplusplus) || (defined (__STDC__) && __STDC__) 30*404b540aSrobert #undef __P 31*404b540aSrobert #define __P(args) args 32*404b540aSrobert #else /* Not C++ or ANSI C. */ 33*404b540aSrobert #undef __P 34*404b540aSrobert #define __P(args) () 35*404b540aSrobert /* We can get away without defining `const' here only because in this file 36*404b540aSrobert it is used only inside the prototype for `fnmatch', which is elided in 37*404b540aSrobert non-ANSI C where `const' is problematical. */ 38*404b540aSrobert #endif /* C++ or ANSI C. */ 39*404b540aSrobert 40*404b540aSrobert 41*404b540aSrobert /* We #undef these before defining them because some losing systems 42*404b540aSrobert (HP-UX A.08.07 for example) define these in <unistd.h>. */ 43*404b540aSrobert #undef FNM_PATHNAME 44*404b540aSrobert #undef FNM_NOESCAPE 45*404b540aSrobert #undef FNM_PERIOD 46*404b540aSrobert 47*404b540aSrobert /* Bits set in the FLAGS argument to `fnmatch'. */ 48*404b540aSrobert #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ 49*404b540aSrobert #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ 50*404b540aSrobert #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ 51*404b540aSrobert 52*404b540aSrobert #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) 53*404b540aSrobert #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ 54*404b540aSrobert #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ 55*404b540aSrobert #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ 56*404b540aSrobert #endif 57*404b540aSrobert 58*404b540aSrobert /* Value returned by `fnmatch' if STRING does not match PATTERN. */ 59*404b540aSrobert #define FNM_NOMATCH 1 60*404b540aSrobert 61*404b540aSrobert /* Match STRING against the filename pattern PATTERN, 62*404b540aSrobert returning zero if it matches, FNM_NOMATCH if not. */ 63*404b540aSrobert extern int fnmatch __P ((const char *__pattern, const char *__string, 64*404b540aSrobert int __flags)); 65*404b540aSrobert 66*404b540aSrobert #ifdef __cplusplus 67*404b540aSrobert } 68*404b540aSrobert #endif 69*404b540aSrobert 70*404b540aSrobert #endif /* fnmatch.h */ 71