Print this page
1209 fnmatch(3C) should mention FNM_IGNORECASE
Reviewed by: Marcel Telka <marcel@telka.sk>

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3c/fnmatch.3c
          +++ new/usr/src/man/man3c/fnmatch.3c
   1    1  '\" te
   2    2  .\"  Copyright (c) 1992, X/Open Company Limited All Rights Reserved  Portions Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved
   3    3  .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   4    4  .\" http://www.opengroup.org/bookstore/.
   5    5  .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   6    6  .\"  This notice shall appear on any product containing this material.
   7    7  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   8    8  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   9    9  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  10      -.TH FNMATCH 3C "Jul 24, 2002"
       10 +.TH FNMATCH 3C "Jun 6, 2015"
  11   11  .SH NAME
  12   12  fnmatch \- match filename or path name
  13   13  .SH SYNOPSIS
  14   14  .LP
  15   15  .nf
  16   16  #include <fnmatch.h>
  17   17  
  18   18  \fBint\fR \fBfnmatch\fR(\fBconst char *\fR\fIpattern\fR, \fBconst char *\fR\fIstring\fR, \fBint\fR \fIflags\fR);
  19   19  .fi
  20   20  
↓ open down ↓ 18 lines elided ↑ open up ↑
  39   39  by a slash in \fIpattern\fR; it will not be matched by either the asterisk
  40   40  (\fB*\fR) or question-mark (\fB?\fR) special characters, nor by a bracket
  41   41  (\fB[\|]\fR) expression.
  42   42  .sp
  43   43  If not set, the slash character is treated as an ordinary character.
  44   44  .RE
  45   45  
  46   46  .sp
  47   47  .ne 2
  48   48  .na
       49 +\fB\fBFNM_IGNORECASE\fR\fR
       50 +.ad
       51 +.RS 18n
       52 +If set, the \fIstring\fR will be transliterated to lower case before doing the
       53 +actual match. This transliteration is done using \fBtowlower_l\fR(3C), using
       54 +the locale of the current thread. If no locale is set, then the global locale
       55 +is used instead.
       56 +.sp
       57 +If not set, the match will use \fIstring\fR with no changes, making the match
       58 +case-sensitive.
       59 +.RE
       60 +
       61 +.sp
       62 +.ne 2
       63 +.na
  49   64  \fB\fBFNM_NOESCAPE\fR\fR
  50   65  .ad
  51   66  .RS 18n
  52   67  If not set, a backslash character (\fB\e\fR) in \fIpattern\fR followed by any
  53   68  other character will match that second character in \fIstring\fR. In
  54   69  particular, "\fB\e\e\fR" will match a backslash in \fIstring\fR.
  55   70  .sp
  56   71  If set, a backslash character will be treated as an ordinary character.
  57   72  .RE
  58   73  
↓ open down ↓ 16 lines elided ↑ open up ↑
  75   90  .RS +4
  76   91  .TP
  77   92  .ie t \(bu
  78   93  .el o
  79   94  If \fBFNM_PATHNAME\fR is not set, a period is "leading" only if it is the first
  80   95  character of \fIstring\fR.
  81   96  .RE
  82   97  .RE
  83   98  
  84   99  .sp
  85      -.LP
      100 +.RS 18n
  86  101  If not set, no special restrictions are placed on matching a period.
  87  102  .SH RETURN VALUES
  88  103  .sp
  89  104  .LP
  90  105  If \fIstring\fR matches the pattern specified by \fIpattern\fR, then
  91  106  \fBfnmatch()\fR returns \fB0\fR. If there is no match, \fBfnmatch()\fR returns
  92  107  \fBFNM_NOMATCH\fR, which is defined in the header <\fBfnmatch.h\fR>. If an
  93  108  error occurs, \fBfnmatch()\fR returns another non-zero value.
  94  109  .SH USAGE
  95  110  .sp
↓ open down ↓ 43 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX