rpm 5.2.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

rpmio/fnmatch.h
Go to the documentation of this file.

    00001 /* Copyright (C) 1991-93,96,97,98,99,2001,2004 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 Lesser General Public
    00006    License as published by the Free Software Foundation; either
    00007    version 2.1 of the 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    Lesser General Public License for more details.
    00013
    00014    You should have received a copy of the GNU Lesser General Public
    00015    License along with the GNU C Library; if not, write to the Free
    00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    00017    02111-1307 USA.  */
    00018
    00019 #ifndef _FNMATCH_H
    00020 #define _FNMATCH_H      1
    00021
    00022 #ifdef  __cplusplus
    00023 extern "C" {
    00024 #endif
    00025
    00026 #ifndef const
    00027 # if (defined __STDC__ && __STDC__) || defined __cplusplus
    00028 #  define __const       const
    00029 # else
    00030 #  define __const
    00031 # endif
    00032 #endif
    00033
    00034 /* We #undef these before defining them because some losing systems
    00035    (HP-UX A.08.07 for example) define these in <unistd.h>.  */
    00036 #undef  FNM_PATHNAME
    00037 #undef  FNM_NOESCAPE
    00038 #undef  FNM_PERIOD
    00039
    00040 /* Bits set in the FLAGS argument to `fnmatch'.  */
    00041 #define FNM_PATHNAME    (1 << 0) /* No wildcard can ever match `/'.  */
    00042 #define FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
    00043 #define FNM_PERIOD      (1 << 2) /* Leading `.' is matched only explicitly.  */
    00044
    00045 #if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE
    00046 # define FNM_FILE_NAME   FNM_PATHNAME   /* Preferred GNU name.  */
    00047 # define FNM_LEADING_DIR (1 << 3)       /* Ignore `/...' after a match.  */
    00048 # define FNM_CASEFOLD    (1 << 4)       /* Compare without regard to case.  */
    00049 # define FNM_EXTMATCH    (1 << 5)       /* Use ksh-like extended matching. */
    00050 #endif
    00051
    00052 /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
    00053 #define FNM_NOMATCH     1
    00054
    00055 /* This value is returned if the implementation does not support
    00056    `fnmatch'.  Since this is not the case here it will never be
    00057    returned but the conformance test suites still require the symbol
    00058    to be defined.  */
    00059 #ifdef _XOPEN_SOURCE
    00060 # define FNM_NOSYS      (-1)
    00061 #endif
    00062
    00063 /* Match NAME against the filename pattern PATTERN,
    00064    returning zero if it matches, FNM_NOMATCH if not.  */
    00065 /*@-redecl@*/
    00066 extern int fnmatch (__const char *__pattern, __const char *__name,
    00067                     int __flags)
    00068         /*@*/;
    00069 /*@=redecl@*/
    00070
    00071 #ifdef  __cplusplus
    00072 }
    00073 #endif
    00074
    00075 #endif /* fnmatch.h */