1 /* Copyright (C) 1991-2004 Free Software Foundation, Inc.
3 This file is part of GNU Bash, the Bourne-Again SHell.
5 Bash is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 Bash is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with Bash. If not, see <http://www.gnu.org/licenses/>.
26 /* We #undef these before defining them because some losing systems
27 (HP-UX A.08.07 for example) define these in <unistd.h>. */
32 /* Bits set in the FLAGS argument to `strmatch'. */
34 /* standard flags are like fnmatch(3). */
35 #define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
36 #define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
37 #define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
39 /* extended flags not available in most libc fnmatch versions, but we undef
40 them to avoid any possible warnings. */
41 #undef FNM_LEADING_DIR
45 #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
46 #define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
47 #define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */
49 /* Value returned by `strmatch' if STRING does not match PATTERN. */
54 /* Match STRING against the filename pattern PATTERN,
55 returning zero if it matches, FNM_NOMATCH if not. */
56 extern int strmatch __P((char *, char *, int));
59 extern int wcsmatch __P((wchar_t *, wchar_t *, int));
62 #endif /* _STRMATCH_H */