1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
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.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
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
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
31 .TH FNMATCH 3 2000-10-15 "GNU" "Linux Programmer's Manual"
34 .\"O fnmatch \- match filename or pathname
35 fnmatch \- ファイル名またはパス名へのマッチを行う
39 .B #include <fnmatch.h>
41 .BI "int fnmatch(const char *" "pattern" ", const char *" string ", int " flags );
47 .\"O function checks whether the
49 .\"O argument matches the
51 .\"O argument, which is a shell wildcard pattern.
59 にはシェルのワイルドカードパターンを与える。
63 .\"O argument modifies the behavior; it is the bitwise OR of zero or more
64 .\"O of the following flags:
68 は以下のフラグのビット毎の OR で指定する。
71 .\"O If this flag is set, treat backslash as an ordinary character,
72 .\"O instead of an escape character.
73 このフラグがセットされていると、バックスラッシュ (\\) をエスケープ文字
77 .\"O If this flag is set, match a slash in
79 .\"O only with a slash in
81 .\"O and not by an asterisk (*) or a question mark (?) metacharacter,
82 .\"O nor by a bracket expression ([]) containing a slash.
88 アスタリスク (*) や疑問符 (?) のメタキャラクタや、
89 スラッシュを含むブラケット表現 ([]) にはマッチさせない。
92 .\"O If this flag is set, a leading period in
94 .\"O has to be matched exactly by a period in
96 .\"O A period is considered to be leading if it is the first character in
100 .\"O is set and the period immediately follows a slash.
103 の先頭ピリオド (leading period) は
105 中のピリオドそのものにしかマッチしない。先頭ピリオドとは、
107 の最初の文字位置にあるピリオドのことである。ただし
109 フラグが同時にセットされている場合には、スラッシュの直後に続くピリオド
113 .\"O This is a GNU synonym for \fBFNM_PATHNAME\fR.
114 これは \fBFNM_PATHNAME\fR に対する GNU での同義語である.
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
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 での拡張である。これがセットされている場合には、
126 の最初の部分 (にスラッシュを付けたもの) にマッチすれば、
128 このフラグは主として glibc で内部的に使用し、そのためのみ実装されている。
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"
142 .\"O if there is no match or another nonzero value if there is an error.
146 にマッチすれば 0 を返す。マッチしなかった場合には
148 を返す。エラーの場合にはそれ以外の非ゼロ値を返す。
149 .\"O .SH "CONFORMING TO"
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