source: vendor/bash/3.1-p17/lib/glob/strmatch.h

Last change on this file was 3231, checked in by bird, 18 years ago

eol style.

  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1/* Copyright (C) 1991-2004 Free Software Foundation, Inc.
2This file is part of the GNU C Library.
3
4The GNU C Library is free software; you can redistribute it and/or
5modify it under the terms of the GNU Library General Public License as
6published by the Free Software Foundation; either version 2 of the
7License, or (at your option) any later version.
8
9The GNU C Library is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12Library General Public License for more details.
13
14You should have received a copy of the GNU Library General Public
15License along with the GNU C Library; see the file COPYING.LIB. If
16not, write to the Free Software Foundation, Inc.,
1759 Temple Place, Suite 330, Boston, MA 02111 USA. */
18
19#ifndef _STRMATCH_H
20#define _STRMATCH_H 1
21
22#include <config.h>
23
24#include "stdc.h"
25
26/* We #undef these before defining them because some losing systems
27 (HP-UX A.08.07 for example) define these in <unistd.h>. */
28#undef FNM_PATHNAME
29#undef FNM_NOESCAPE
30#undef FNM_PERIOD
31
32/* Bits set in the FLAGS argument to `strmatch'. */
33
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. */
38
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
42#undef FNM_CASEFOLD
43#undef FNM_EXTMATCH
44
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. */
48
49/* Value returned by `strmatch' if STRING does not match PATTERN. */
50#undef FNM_NOMATCH
51
52#define FNM_NOMATCH 1
53
54/* Match STRING against the filename pattern PATTERN,
55 returning zero if it matches, FNM_NOMATCH if not. */
56extern int strmatch __P((char *, char *, int));
57
58#if HANDLE_MULTIBYTE
59extern int wcsmatch __P((wchar_t *, wchar_t *, int));
60#endif
61
62#endif /* _STRMATCH_H */
Note: See TracBrowser for help on using the repository browser.