.\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Guido van Rossum. .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#) fnmatch. 3 8.3 (Berkeley) 4/28/95 .\" .\" $FreeBSD: doc/ja_JP.eucJP/man/man3/fnmatch. 3, v 1.2 2001/05/14 01:08:34 horikawa Exp $ .Dd April 28, 1995 .Dt FNMATCH 3 .Os .Sh ¸íĪ .Nm fnmatch .Nd ÆÄÀϸíÀ̳ª ÆÐ½º¸íÀ» Á¶ÇÕÇÑ´Ù .Sh ¼­½Ä .Fd #include .Ft int .Fn fnmatch "const char *pattern" "const char *string" "int flags" .Sh ÇØ¼³ .Fn fnmatch ÇÔ¼ö´Â, ½©ÀÌ »ç¿ëÇÏ´Â ±ÔÄ¢¿¡ µû¶ó ÆÐÅÏÀ» Á¶ÇÕÇÕ´Ï´Ù. .Fa string Àμö°¡ ÁöÁ¤Çϴ ij¸¯ÅÍ ¶óÀÎÀ» Ã¼Å©ÇØ, .Fa pattern Àμö°¡ ÁöÁ¤ÇÏ´Â ÆÐÅϰú ÀÏÄ¡ÇÏ´ÂÁö ¾î¶²Áö È®ÀÎÇÕ´Ï´Ù. .Pp .Fa flags Àμö´Â, .Fa pattern (¿Í)°ú .Fa string ÀÇ ÇØ¼®À» ¼öÁ¤ÇÕ´Ï´Ù. .Fa flags ÀÇ °ªÀº, ÀÌÇÏÀÇ Á¤¼öÀÇ ºñÆ® ´ÜÀ§ÀÇ ³í¸®ÇÕÀÔ´Ï´Ù. ÀÌ Á¤¼ö´Â, ÀÎŬ·çµå ÆÄÀÏ .Pa fnmatch.h ±×¸®°í Á¤Àǵǰí ÀÖ½À´Ï´Ù. .Bl -tag -width FNM_PATHNAME .It Dv FNM_NOESCAPE Åë»ó, .Fa pattern Áß(¾È)¿¡¼­ backslash .Pq Ql \e ÀÇ µÚ·Î 1 ij¸¯ÅͰ¡ °è¼ÓµÇ´Â °ÍÀÌ ³ªÅ¸³¯ ¶§ ¸¶´Ù, ±×°ÍÀº ±× ij¸¯ÅÍ·Î ¿Å°Ü³õÀ» ¼ö ÀÖ½À´Ï´Ù. ÀÌ Ä¡È¯Àº, ±× ij¸¯ÅÍÀÇ Æ¯¼öÇÑ Àǹ̸¦ ¹«È¿·Î Çϱâ À§Çؼ­(¶§¹®¿¡) ½ÇÇàµË´Ï´Ù. .Dv FNM_NOESCAPE Ç÷¡±×¸¦ ¼³Á¤Çϸé(ÀÚ), backslash ij¸¯ÅÍ´Â Åë»ó ij¸¯Åͷμ­ ´Ù·ç¾îÁý´Ï´Ù. .It Dv FNM_PATHNAME .Fa string ÀÇ slash ij¸¯ÅÍ´Â, .Fa pattern ¾ÈÀÇ slash¿Í ¸íÈ®ÇÏ°Ô ÀÏÄ¡ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ÀÌ Ç÷¡±×¸¦ ¼³Á¤ÇÏÁö ¾ÊÀ¸¸é slash´Â Åë»ó ij¸¯Åͷμ­ ´Ù·ç¾îÁý´Ï´Ù. .It Dv FNM_PERIOD .Fa string ÀÇ ÃÖÃÊÀÇ ÇǸ®¾îµå´Â, .Fa pattern ¾ÈÀÇ ÃÖÃÊÀÇ ÇǸ®¾îµå¿Í ¸íÈ®ÇÏ°Ô ÀÏÄ¡ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ÀÌ Ç÷¡±×¸¦ ¼³Á¤ÇÏÁö ¾ÊÀ¸¸é ÃÖÃÊÀÇ ÇǸ®¾îµå´Â Åë»ó ij¸¯Åͷμ­ ´Ù·ç¾îÁý´Ï´Ù. ¡¸ÃÖÃÊÀÇ °Í¡¹À̶ó°í ÇÏ´Â ¸»ÀÇ Á¤ÀÇ´Â, .Dv FNM_PATHNAME ÀÇ ÁöÁ¤¿¡ ÀÇÇØ º¯È­ÇÕ´Ï´Ù. .Ar string ÀÇ Á¦ 1 ij¸¯ÅÍÀÎ ÇǸ®¾îµå´Â, Ç×»ó ¡¸ÃÖÃÊÀÇ¡¹ÇǸ®¾îµåÀÔ´Ï´Ù. .Dv FNM_PATHNAME (À»)¸¦ ¼³Á¤ÇßÀ» °æ¿ì, slashÀÇ Á÷ÈÄÀÇ ÇǸ®¾îµåµµ ¡¸ÃÖÃÊÀÇ¡¹ÇǸ®¾îµåÀÔ´Ï´Ù. .It Dv FNM_LEADING_DIR .Fa pattern ÇÏÁö¸¸ ¹®Á¦ ¾ø°Ô ÀÏÄ¡ÇÑ ÈÄ, ³ª¸ÓÁöÀÇ .Nm /* (À»)¸¦ ¹«½ÃÇÕ´Ï´Ù. .It Dv FNM_CASEFOLD .Fa pattern (¿Í)°ú .Fa string ÀÇ ¾çÂÊ ¸ðµÎ·Î ´ë¹®ÀÚ¿Í ¼Ò¹®ÀÚÀÇ ±¸º°À» ¹«½ÃÇÕ´Ï´Ù. .El .Sh ¹Ýȯ°ª .Fn fnmatch ÇÔ¼ö´Â, .Fa pattern ÇÏÁö¸¸ ÁöÁ¤ÇÏ´Â ÆÐÅÏ¿¡ .Fa string ÇÏÁö¸¸ ÀÏÄ¡Çϸé(ÀÚ) Á¦·Î¸¦ µÇµ¹¸³´Ï´Ù. ÀÏÄ¡ÇÏÁö ¾Ê´Â °æ¿ì´Â °ª .Dv FNM_NOMATCH (À»)¸¦ µÇµ¹¸³´Ï´Ù. .Sh °ü·Ã Ç׸ñ .Xr sh 1 , .Xr glob 3 , .Xr regex 3 .Sh Ç¥ÁØ .Fn fnmatch ÇÔ¼ö´Â, .St -p1003.2 ¿¡ ÁذÅÇϰí ÀÖ½À´Ï´Ù. .Sh ¿ª»ç .Fn fnmatch ÇÔ¼ö´Â, .Bx 4.4 ¿¡ Ãß°¡µÇ¾ú½À´Ï´Ù. .Sh ¹ö±× .Dv FNM_PATHNAME (À»)¸¦ ÁöÁ¤Çصµ, ÆÐÅÏ .Ql * (Àº)´Â ÇÏ´Ã string¿Í ÀÏÄ¡ÇÕ´Ï´Ù. .\"X kuma 1999-11-5