version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
FNMATCH |
|
|
2 |
!!!FNMATCH |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
RETURN VALUE |
|
|
7 |
CONFORMING TO |
|
|
8 |
SEE ALSO |
|
|
9 |
---- |
|
|
10 |
!!NAME |
|
|
11 |
|
|
|
12 |
|
|
|
13 |
fnmatch - match filename or pathname |
|
|
14 |
!!SYNOPSIS |
|
|
15 |
|
|
|
16 |
|
|
|
17 |
__#include |
|
|
18 |
__''pattern''__, const char *__''string''__, int__ ''flags''__); |
|
|
19 |
__ |
|
|
20 |
!!DESCRIPTION |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
The __fnmatch()__ function checks whether the |
|
|
24 |
''string'' argument matches the ''pattern'' argument, |
|
|
25 |
which is a shell wildcard pattern. |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
The ''flags'' argument modifies the behaviour; it is the |
|
|
29 |
bitwise OR of zero or more of the following |
|
|
30 |
flags: |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
__FNM_NOESCAPE__ |
|
|
34 |
|
|
|
35 |
|
|
|
36 |
If this flag is set, treat backslash as an ordinary |
|
|
37 |
character, instead of an escape character. |
|
|
38 |
|
|
|
39 |
|
|
|
40 |
__FNM_PATHNAME__ |
|
|
41 |
|
|
|
42 |
|
|
|
43 |
If this flag is set, match a slash in ''string'' only |
|
|
44 |
with a slash in ''pattern'' and not, for example, with a |
|
|
45 |
[[] - sequence containing a slash. |
|
|
46 |
|
|
|
47 |
|
|
|
48 |
__FNM_PERIOD__ |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
If this flag is set, a leading period in ''string'' has |
|
|
52 |
to be matched exactly by a period in ''pattern''. A |
|
|
53 |
period is considered to be leading if it is the first |
|
|
54 |
character in ''string'', or if both __FNM_PATHNAME__ |
|
|
55 |
is set and the period immediately follows a |
|
|
56 |
slash. |
|
|
57 |
|
|
|
58 |
|
|
|
59 |
__FNM_FILE_NAME__ |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
This is a GNU synonym for __FNM_PATHNAME__. |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
__FNM_LEADING_DIR__ |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
If this flag (a GNU extension) is set, the pattern is |
|
|
69 |
considered to be matched if it matches an initial segment of |
|
|
70 |
''string'' which is followed by a slash. This flag is |
|
|
71 |
mainly for the internal use of glibc and is only implemented |
|
|
72 |
in certain cases. |
|
|
73 |
|
|
|
74 |
|
|
|
75 |
__FNM_CASEFOLD__ |
|
|
76 |
|
|
|
77 |
|
|
|
78 |
If this flag (a GNU extension) is set, the pattern is |
|
|
79 |
matched case-insensitively. |
|
|
80 |
!!RETURN VALUE |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
Zero if ''string'' matches ''pattern'', |
|
|
84 |
__FNM_NOMATCH__ if there is no match or another non-zero |
|
|
85 |
value if there is an error. |
|
|
86 |
!!CONFORMING TO |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
ISO/IEC 9945-2: 1993 (POSIX.2). The __FNM_FILE_NAME__, |
|
|
90 |
__FNM_LEADING_DIR__, and __FNM_CASEFOLD__ flags are |
|
|
91 |
GNU extensions. |
|
|
92 |
!!SEE ALSO |
|
|
93 |
|
|
|
94 |
|
|
|
95 |
sh(1), glob(3), glob(7) |
|
|
96 |
---- |