Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

fnmatch.h

Go to the documentation of this file.
00001 /* Copyright (C) 1991, 92, 93, 96, 97, 98 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public License as
00006    published by the Free Software Foundation; either version 2 of the
00007    License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public
00015    License along with the GNU C Library; see the file COPYING.LIB.  If not,
00016    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.  */
00018 
00019 #ifndef _FNMATCH_H
00020 #define _FNMATCH_H      1
00021 
00022 #ifdef  __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026 #if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
00027 # if !defined __GLIBC__ || !defined __P
00028 #  undef        __P
00029 #  define __P(protos)   protos
00030 # endif
00031 #else /* Not C++ or ANSI C.  */
00032 # undef __P
00033 # define __P(protos)    ()
00034 /* We can get away without defining `const' here only because in this file
00035    it is used only inside the prototype for `fnmatch', which is elided in
00036    non-ANSI C where `const' is problematical.  */
00037 #endif /* C++ or ANSI C.  */
00038 
00039 #ifndef const
00040 # if (defined __STDC__ && __STDC__) || defined __cplusplus
00041 #  define __const       const
00042 # else
00043 #  define __const
00044 # endif
00045 #endif
00046 
00047 /* We #undef these before defining them because some losing systems
00048    (HP-UX A.08.07 for example) define these in <unistd.h>.  */
00049 #undef  FNM_PATHNAME
00050 #undef  FNM_NOESCAPE
00051 #undef  FNM_PERIOD
00052 
00053 /* Bits set in the FLAGS argument to `fnmatch'.  */
00054 #define FNM_PATHNAME    (1 << 0) /* No wildcard can ever match `/'.  */
00055 #define FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
00056 #define FNM_PERIOD      (1 << 2) /* Leading `.' is matched only explicitly.  */
00057 
00058 #ifndef FNM_FILE_NAME
00059 # define FNM_FILE_NAME   FNM_PATHNAME   /* Preferred GNU name.  */
00060 #endif
00061 #ifndef FNM_LEADING_DIR
00062 # define FNM_LEADING_DIR (1 << 3)       /* Ignore `/...' after a match.  */
00063 #endif
00064 #ifndef FNM_CASEFOLD
00065 # define FNM_CASEFOLD    (1 << 4)       /* Compare without regard to case.  */
00066 #endif
00067 
00068 /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
00069 #define FNM_NOMATCH     1
00070 
00071 /* This value is returned if the implementation does not support
00072    `fnmatch'.  Since this is not the case here it will never be
00073    returned but the conformance test suites still require the symbol
00074    to be defined.  */
00075 #ifdef _XOPEN_SOURCE
00076 # define FNM_NOSYS      (-1)
00077 #endif
00078 
00079 /* Match STRING against the filename pattern PATTERN,
00080    returning zero if it matches, FNM_NOMATCH if not.  */
00081 extern int fnmatch __P ((__const char *__pattern, __const char *__string,
00082                          int __flags));
00083 
00084 #ifdef  __cplusplus
00085 }
00086 #endif
00087 
00088 #endif /* fnmatch.h */

Generated on Tue Apr 16 12:37:36 2002 for rsync by doxygen1.2.15