annotate glob/fnmatch.h @ 2755:655b1615eb54

[project @ 1997-02-26 19:21:14 by jwe]
author jwe
date Wed, 26 Feb 1997 19:23:24 +0000
parents 611d403c7f3d
children 66d7394f5822
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1313
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
1 /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
2
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
3 This library is free software; you can redistribute it and/or
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
4 modify it under the terms of the GNU Library General Public License as
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
5 published by the Free Software Foundation; either version 2 of the
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
6 License, or (at your option) any later version.
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
7
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
8 This library is distributed in the hope that it will be useful,
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
11 Library General Public License for more details.
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
12
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
13 You should have received a copy of the GNU Library General Public
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
14 License along with this library; see the file COPYING.LIB. If
1315
611d403c7f3d [project @ 1995-06-25 19:56:32 by jwe]
jwe
parents: 1313
diff changeset
15 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
611d403c7f3d [project @ 1995-06-25 19:56:32 by jwe]
jwe
parents: 1313
diff changeset
16 Boston, MA 02111-1307, USA. */
1313
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
17
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
18 #ifndef _FNMATCH_H
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
19
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
20 #define _FNMATCH_H 1
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
21
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
22 #ifdef __cplusplus
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
23 extern "C" {
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
24 #endif
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
25
2755
655b1615eb54 [project @ 1997-02-26 19:21:14 by jwe]
jwe
parents: 1315
diff changeset
26 #if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \
655b1615eb54 [project @ 1997-02-26 19:21:14 by jwe]
jwe
parents: 1315
diff changeset
27 || defined (WIN32))
1313
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
28 #undef __P
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
29 #define __P(protos) protos
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
30 #else /* Not C++ or ANSI C. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
31 #undef __P
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
32 #define __P(protos) ()
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
33 /* We can get away without defining `const' here only because in this file
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
34 it is used only inside the prototype for `fnmatch', which is elided in
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
35 non-ANSI C where `const' is problematical. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
36 #endif /* C++ or ANSI C. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
37
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
38
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
39 /* We #undef these before defining them because some losing systems
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
40 (HP-UX A.08.07 for example) define these in <unistd.h>. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
41 #undef FNM_PATHNAME
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
42 #undef FNM_NOESCAPE
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
43 #undef FNM_PERIOD
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
44
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
45 /* Bits set in the FLAGS argument to `fnmatch'. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
46 #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
47 #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
48 #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
49
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
50 #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE)
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
51 #define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
52 #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
53 #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
54 #endif
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
55
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
56 /* Value returned by `fnmatch' if STRING does not match PATTERN. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
57 #define FNM_NOMATCH 1
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
58
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
59 /* Match STRING against the filename pattern PATTERN,
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
60 returning zero if it matches, FNM_NOMATCH if not. */
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
61 extern int fnmatch __P ((const char *__pattern, const char *__string,
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
62 int __flags));
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
63
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
64 #ifdef __cplusplus
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
65 }
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
66 #endif
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
67
f0dcdcc9a780 [project @ 1995-06-25 18:42:38 by jwe]
jwe
parents:
diff changeset
68 #endif /* fnmatch.h */