Back to index

cell-binutils  2.17cvs20070401
fnmatch.h
Go to the documentation of this file.
00001 /* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
00002 
00003 NOTE: The canonical source of this file is maintained with the GNU C Library.
00004 Bugs can be reported to bug-glibc@prep.ai.mit.edu.
00005 
00006 This program is free software; you can redistribute it and/or modify it
00007 under the terms of the GNU General Public License as published by the
00008 Free Software Foundation; either version 2, or (at your option) any
00009 later version.
00010 
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with this program; if not, write to the Free Software
00018 Foundation, 51 Franklin Street - Fifth Floor,
00019 Boston, MA 02110-1301, USA.  */
00020 
00021 #ifndef       _FNMATCH_H
00022 
00023 #define       _FNMATCH_H    1
00024 
00025 #ifdef __cplusplus
00026 extern "C" {
00027 #endif
00028 
00029 #if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
00030 #undef __P
00031 #define       __P(args)     args
00032 #else /* Not C++ or ANSI C.  */
00033 #undef __P
00034 #define       __P(args)     ()
00035 /* We can get away without defining `const' here only because in this file
00036    it is used only inside the prototype for `fnmatch', which is elided in
00037    non-ANSI C where `const' is problematical.  */
00038 #endif /* C++ or ANSI C.  */
00039 
00040 
00041 /* We #undef these before defining them because some losing systems
00042    (HP-UX A.08.07 for example) define these in <unistd.h>.  */
00043 #undef FNM_PATHNAME
00044 #undef FNM_NOESCAPE
00045 #undef FNM_PERIOD
00046 
00047 /* Bits set in the FLAGS argument to `fnmatch'.  */
00048 #define       FNM_PATHNAME  (1 << 0) /* No wildcard can ever match `/'.  */
00049 #define       FNM_NOESCAPE  (1 << 1) /* Backslashes don't quote special chars.  */
00050 #define       FNM_PERIOD    (1 << 2) /* Leading `.' is matched only explicitly.  */
00051 
00052 #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
00053 #define       FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name.  */
00054 #define       FNM_LEADING_DIR      (1 << 3) /* Ignore `/...' after a match.  */
00055 #define       FNM_CASEFOLD  (1 << 4) /* Compare without regard to case.  */
00056 #endif
00057 
00058 /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
00059 #define       FNM_NOMATCH   1
00060 
00061 /* Match STRING against the filename pattern PATTERN,
00062    returning zero if it matches, FNM_NOMATCH if not.  */
00063 extern int fnmatch __P ((const char *__pattern, const char *__string,
00064                       int __flags));
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069 
00070 #endif /* fnmatch.h */