OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / fnmatch.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\" License.
23 .\" Modified Sat Jul 24 19:35:54 1993 by Rik Faith (faith@cs.unc.edu)
24 .\" Modified Mon Oct 16 00:16:29 2000 following Joseph S. Myers
25 .\"
26 .\" Japanese Version Copyright (c) 1998 NAKANO Takeo all rights reserved.
27 .\" Translated 1998-03-18, NAKANO Takeo <nakano@apm.seikei.ac.jp>
28 .\" Modified 1998-12-18, NAKANO Takeo <nakano@apm.seikei.ac.jp>
29 .\" Updated 2006-03-05, Akihiro MOTOKI, catch up to LDP v2.25
30 .\"
31 .TH FNMATCH 3  2000-10-15 "GNU" "Linux Programmer's Manual"
32 .\"O .SH NAME
33 .SH Ì¾Á°
34 .\"O fnmatch \- match filename or pathname
35 fnmatch \- ¥Õ¥¡¥¤¥ë̾¤Þ¤¿¤Ï¥Ñ¥¹Ì¾¤Ø¤Î¥Þ¥Ã¥Á¤ò¹Ô¤¦
36 .\"O .SH SYNOPSIS
37 .SH ½ñ¼°
38 .nf
39 .B #include <fnmatch.h>
40 .sp
41 .BI "int fnmatch(const char *" "pattern" ", const char *" string ", int " flags );
42 .fi
43 .\"O .SH DESCRIPTION
44 .SH ÀâÌÀ
45 .\"O The
46 .\"O .BR fnmatch ()
47 .\"O function checks whether the
48 .\"O .I string
49 .\"O argument matches the
50 .\"O .I pattern
51 .\"O argument, which is a shell wildcard pattern.
52 .BR fnmatch ()
53 ´Ø¿ô¤Ï
54 .I strings
55 °ú¤­¿ô¤¬
56 .I pattern
57 °ú¤­¿ô¤Ë¥Þ¥Ã¥Á¤¹¤ë¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡£
58 .I pattern
59 ¤Ë¤Ï¥·¥§¥ë¤Î¥ï¥¤¥ë¥É¥«¡¼¥É¥Ñ¥¿¡¼¥ó¤òÍ¿¤¨¤ë¡£
60 .PP
61 .\"O The
62 .\"O .I flags
63 .\"O argument modifies the behavior; it is the bitwise OR of zero or more
64 .\"O of the following flags:
65 .I flags
66 °ú¤­¿ô¤Ë¤è¤êÆ°ºî¤òÊѹ¹¤Ç¤­¤ë¡£
67 .I flags
68 ¤Ï°Ê²¼¤Î¥Õ¥é¥°¤Î¥Ó¥Ã¥ÈËè¤Î OR ¤Ç»ØÄꤹ¤ë¡£
69 .TP
70 .B FNM_NOESCAPE
71 .\"O If this flag is set, treat backslash as an ordinary character,
72 .\"O instead of an escape character.
73 ¤³¤Î¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤È¡¢¥Ð¥Ã¥¯¥¹¥é¥Ã¥·¥å (\\) ¤ò¥¨¥¹¥±¡¼¥×ʸ»ú
74 ¤Ç¤Ï¤Ê¤¯Ä̾ï¤Îʸ»ú¤È¤·¤Æ°·¤¦¡£
75 .TP
76 .B FNM_PATHNAME
77 .\"O If this flag is set, match a slash in
78 .\"O .I string
79 .\"O only with a slash in
80 .\"O .I pattern
81 .\"O and not by an asterisk (*) or a question mark (?) metacharacter,
82 .\"O nor by a bracket expression ([]) containing a slash.
83 ¤³¤Î¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤È¡¢
84 .I string
85 Ãæ¤Î¥¹¥é¥Ã¥·¥å (/) ¤ò
86 .I pattern
87 ¤Ë¤¢¤ë¥¹¥é¥Ã¥·¥å¤½¤Î¤â¤Î¤Ë¤À¤±¥Þ¥Ã¥Á¤µ¤»¡¢
88 ¥¢¥¹¥¿¥ê¥¹¥¯ (*) ¤äµ¿ÌäÉä (?) ¤Î¥á¥¿¥­¥ã¥é¥¯¥¿¤ä¡¢
89 ¥¹¥é¥Ã¥·¥å¤ò´Þ¤à¥Ö¥é¥±¥Ã¥Èɽ¸½ ([]) ¤Ë¤Ï¥Þ¥Ã¥Á¤µ¤»¤Ê¤¤¡£
90 .TP
91 .B FNM_PERIOD
92 .\"O If this flag is set, a leading period in
93 .\"O .I string
94 .\"O has to be matched exactly by a period in
95 .\"O .IR pattern .
96 .\"O A period is considered to be leading if it is the first character in
97 .\"O .IR string ,
98 .\"O or if both
99 .\"O .B FNM_PATHNAME
100 .\"O is set and the period immediately follows a slash.
101 ¤³¤Î¥Õ¥é¥°¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤È¡¢
102 .I string
103 ¤ÎÀèƬ¥Ô¥ê¥ª¥É (leading period) ¤Ï
104 .I pattern
105 Ãæ¤Î¥Ô¥ê¥ª¥É¤½¤Î¤â¤Î¤Ë¤·¤«¥Þ¥Ã¥Á¤·¤Ê¤¤¡£ÀèƬ¥Ô¥ê¥ª¥É¤È¤Ï¡¢
106 .I string
107 ¤ÎºÇ½é¤Îʸ»ú°ÌÃ֤ˤ¢¤ë¥Ô¥ê¥ª¥É¤Î¤³¤È¤Ç¤¢¤ë¡£¤¿¤À¤·
108 .B FNM_PATHNAME
109 ¥Õ¥é¥°¤¬Æ±»þ¤Ë¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢¥¹¥é¥Ã¥·¥å¤Îľ¸å¤Ë³¤¯¥Ô¥ê¥ª¥É
110 ¤âÀèƬ¥Ô¥ê¥ª¥É¤È¤ß¤Ê¤µ¤ì¤ë¡£
111 .TP
112 .B FNM_FILE_NAME
113 .\"O This is a GNU synonym for \fBFNM_PATHNAME\fR.
114 ¤³¤ì¤Ï \fBFNM_PATHNAME\fR ¤ËÂФ¹¤ë GNU ¤Ç¤ÎƱµÁ¸ì¤Ç¤¢¤ë.
115 .TP
116 .B FNM_LEADING_DIR
117 .\"O If this flag (a GNU extension) is set, the pattern is considered to be
118 .\"O matched if it matches an initial segment of
119 .\"O .I string
120 .\"O which is followed by a slash.
121 .\"O This flag is mainly for the internal
122 .\"O use of glibc and is only implemented in certain cases.
123 ¤³¤Î¥Õ¥é¥°¤Ï GNU ¤Ç¤Î³ÈÄ¥¤Ç¤¢¤ë¡£¤³¤ì¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢
124 ¥Ñ¥¿¡¼¥ó¤¬
125 .I string
126 ¤ÎºÇ½é¤ÎÉôʬ (¤Ë¥¹¥é¥Ã¥·¥å¤òÉÕ¤±¤¿¤â¤Î) ¤Ë¥Þ¥Ã¥Á¤¹¤ì¤Ð¡¢
127 ¥Þ¥Ã¥Á¤·¤¿¤â¤Î¤È¤ß¤Ê¤µ¤ì¤ë¡£
128 ¤³¤Î¥Õ¥é¥°¤Ï¼ç¤È¤·¤Æ glibc ¤ÇÆâÉôŪ¤Ë»ÈÍѤ·¡¢¤½¤Î¤¿¤á¤Î¤ß¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
129 .TP
130 .B FNM_CASEFOLD
131 .\"O If this flag (a GNU extension) is set, the pattern is matched
132 .\"O case-insensitively.
133 ¤³¤Î¥Õ¥é¥°¤Ï GNU ¤Ç¤Î³ÈÄ¥¤Ç¤¢¤ë¡£¤³¤ì¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¤Ï¡¢
134 ¥Ñ¥¿¡¼¥ó¤Î¥Þ¥Ã¥Á¤ËÂçʸ»ú¾®Ê¸»ú¤¬¶èÊ̤µ¤ì¤Ê¤¤¡£
135 .\"O .SH "RETURN VALUE"
136 .SH ÊÖ¤êÃÍ
137 .\"O Zero if
138 .\"O .I string
139 .\"O matches
140 .\"O .IR pattern ,
141 .\"O .B FNM_NOMATCH
142 .\"O if there is no match or another nonzero value if there is an error.
143 .I string
144 ¤¬
145 .I pattern
146 ¤Ë¥Þ¥Ã¥Á¤¹¤ì¤Ð 0 ¤òÊÖ¤¹¡£¥Þ¥Ã¥Á¤·¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï
147 .B FNM_NOMATCH
148 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¤Ë¤Ï¤½¤ì°Ê³°¤ÎÈó¥¼¥íÃͤòÊÖ¤¹¡£
149 .\"O .SH "CONFORMING TO"
150 .SH ½àµò
151 POSIX.2.
152 .\"O The
153 .\"O .BR FNM_FILE_NAME ", " FNM_LEADING_DIR ", and " FNM_CASEFOLD
154 .\"O flags are GNU extensions.
155 .BR FNM_FILE_NAME ", " FNM_LEADING_DIR ", " FNM_CASEFOLD
156 ¥Õ¥é¥°¤Ï GNU ¤Î³ÈÄ¥¤Ç¤¢¤ë¡£
157 .\"O .SH "SEE ALSO"
158 .SH ´ØÏ¢¹àÌÜ
159 .BR sh (1),
160 .BR glob (3),
161 .BR scandir (3),
162 .BR wordexp (3),
163 .BR glob (7)