Blame glob/fnmatch.h

Packit 26a39e
/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999 Free Software
Packit 26a39e
Foundation, Inc.
Packit 26a39e
This file is part of the GNU C Library.
Packit 26a39e
Packit 26a39e
The GNU C Library is free software; you can redistribute it and/or
Packit 26a39e
modify it under the terms of the GNU Library General Public License as
Packit 26a39e
published by the Free Software Foundation; either version 2 of the
Packit 26a39e
License, or (at your option) any later version.
Packit 26a39e
Packit 26a39e
The GNU C Library is distributed in the hope that it will be useful,
Packit 26a39e
but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 26a39e
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 26a39e
Library General Public License for more details.
Packit 26a39e
Packit 26a39e
You should have received a copy of the GNU Library General Public License
Packit 26a39e
along with this library; see the file COPYING.LIB.  If not, write to the Free
Packit 26a39e
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
Packit 26a39e
USA.  */
Packit 26a39e
Packit 26a39e
#ifndef	_FNMATCH_H
Packit 26a39e
#define	_FNMATCH_H	1
Packit 26a39e
Packit 26a39e
#ifdef	__cplusplus
Packit 26a39e
extern "C" {
Packit 26a39e
#endif
Packit 26a39e
Packit 26a39e
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
Packit 26a39e
# if !defined __GLIBC__
Packit 26a39e
#  undef	__P
Packit 26a39e
#  define __P(protos)	protos
Packit 26a39e
# endif
Packit 26a39e
#else /* Not C++ or ANSI C.  */
Packit 26a39e
# undef	__P
Packit 26a39e
# define __P(protos)	()
Packit 26a39e
/* We can get away without defining `const' here only because in this file
Packit 26a39e
   it is used only inside the prototype for `fnmatch', which is elided in
Packit 26a39e
   non-ANSI C where `const' is problematical.  */
Packit 26a39e
#endif /* C++ or ANSI C.  */
Packit 26a39e
Packit 26a39e
#ifndef const
Packit 26a39e
# if (defined __STDC__ && __STDC__) || defined __cplusplus || defined WINDOWS32
Packit 26a39e
#  define __const	const
Packit 26a39e
# else
Packit 26a39e
#  define __const
Packit 26a39e
# endif
Packit 26a39e
#endif
Packit 26a39e
Packit 26a39e
/* We #undef these before defining them because some losing systems
Packit 26a39e
   (HP-UX A.08.07 for example) define these in <unistd.h>.  */
Packit 26a39e
#undef	FNM_PATHNAME
Packit 26a39e
#undef	FNM_NOESCAPE
Packit 26a39e
#undef	FNM_PERIOD
Packit 26a39e
Packit 26a39e
/* Bits set in the FLAGS argument to `fnmatch'.  */
Packit 26a39e
#define	FNM_PATHNAME	(1 << 0) /* No wildcard can ever match `/'.  */
Packit 26a39e
#define	FNM_NOESCAPE	(1 << 1) /* Backslashes don't quote special chars.  */
Packit 26a39e
#define	FNM_PERIOD	(1 << 2) /* Leading `.' is matched only explicitly.  */
Packit 26a39e
Packit 26a39e
#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
Packit 26a39e
# define FNM_FILE_NAME	 FNM_PATHNAME	/* Preferred GNU name.  */
Packit 26a39e
# define FNM_LEADING_DIR (1 << 3)	/* Ignore `/...' after a match.  */
Packit 26a39e
# define FNM_CASEFOLD	 (1 << 4)	/* Compare without regard to case.  */
Packit 26a39e
#endif
Packit 26a39e
Packit 26a39e
/* Value returned by `fnmatch' if STRING does not match PATTERN.  */
Packit 26a39e
#define	FNM_NOMATCH	1
Packit 26a39e
Packit 26a39e
/* This value is returned if the implementation does not support
Packit 26a39e
   `fnmatch'.  Since this is not the case here it will never be
Packit 26a39e
   returned but the conformance test suites still require the symbol
Packit 26a39e
   to be defined.  */
Packit 26a39e
#ifdef _XOPEN_SOURCE
Packit 26a39e
# define FNM_NOSYS	(-1)
Packit 26a39e
#endif
Packit 26a39e
Packit 26a39e
/* Match NAME against the filename pattern PATTERN,
Packit 26a39e
   returning zero if it matches, FNM_NOMATCH if not.  */
Packit 26a39e
extern int fnmatch __P ((__const char *__pattern, __const char *__name,
Packit 26a39e
			 int __flags));
Packit 26a39e
Packit 26a39e
#ifdef	__cplusplus
Packit 26a39e
}
Packit 26a39e
#endif
Packit 26a39e
Packit 26a39e
#endif /* fnmatch.h */