patch genisoimage multi extent
[platform/upstream/cdrkit.git] / genisoimage / fnmatch.h
1 /*
2  * This file has been modified for the cdrkit suite.
3  *
4  * The behaviour and appearence of the program code below can differ to a major
5  * extent from the version distributed by the original author(s).
6  *
7  * For details, see Changelog file distributed with the cdrkit package. If you
8  * received this file from another source then ask the distributing person for
9  * a log of modifications.
10  *
11  */
12
13 /* @(#)fnmatch.h        1.4 04/03/02 eric */
14 /*
15  * Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
16  *
17  * NOTE: The canonical source of this file is maintained with the GNU C Library.
18  * Bugs can be reported to bug-glibc@prep.ai.mit.edu.
19  *
20  * This program is free software; you can redistribute it and/or modify it
21  * under the terms of the GNU General Public License as published by the
22  * Free Software Foundation; either version 2, or (at your option) any
23  * later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  * GNU General Public License for more details.
29  *
30  * You should have received a copy of the GNU General Public License
31  * along with this program; if not, write to the Free Software
32  * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
33  */
34
35 #ifndef _FNMATCH_H
36
37 #define _FNMATCH_H      1
38
39 #ifndef _PROTOTYP_H
40 #include <prototyp.h>
41 #endif
42
43 #ifdef  __cplusplus
44 extern "C" {
45 #endif
46
47 /*#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)*/
48 #ifdef  PROTOTYPES
49 #undef  __P
50 #define __P(protos)     protos
51 #else /* Not C++ or ANSI C.  */
52 #undef  __P
53 #define __P(protos)     ()
54 /*
55  * We can get away without defining `const' here only because in this file
56  * it is used only inside the prototype for `fnmatch', which is elided in
57  * non-ANSI C where `const' is problematical.
58  */
59 #endif /* C++ or ANSI C.  */
60
61
62 /*
63  * We #undef these before defining them because some losing systems
64  * (HP-UX A.08.07 for example) define these in <unistd.h>.
65  */
66 #undef  FNM_PATHNAME
67 #undef  FNM_NOESCAPE
68 #undef  FNM_PERIOD
69
70 /* Bits set in the FLAGS argument to `fnmatch'.  */
71 #define FNM_PATHNAME    (1 << 0) /* No wildcard can ever match `/'.  */
72 #define FNM_NOESCAPE    (1 << 1) /* Backslashes don't quote special chars.  */
73 #define FNM_PERIOD      (1 << 2) /* Leading `.' is matched only explicitly.  */
74
75 #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined(_GNU_SOURCE)
76 #define FNM_FILE_NAME   FNM_PATHNAME /* Preferred GNU name.  */
77 #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match.  */
78 #define FNM_CASEFOLD    (1 << 4) /* Compare without regard to case.  */
79 #endif
80
81 #ifndef FNM_FILE_NAME
82 /*
83  * Apparently GNU libc doesn't define this thing.
84  */
85 #define FNM_FILE_NAME   FNM_PATHNAME /* Preferred GNU name.  */
86 #endif
87
88 /* Value returned by `fnmatch' if STRING does not match PATTERN.  */
89 #define FNM_NOMATCH     1
90
91 /*
92  * Match STRING against the filename pattern PATTERN,
93  * returning zero if it matches, FNM_NOMATCH if not.
94  */
95 extern int fnmatch(const char *__pattern, const char *__string, int __flags);
96
97 #ifdef  __cplusplus
98 }
99 #endif
100
101 #endif /* fnmatch.h */