summaryrefslogtreecommitdiff
path: root/usr/src/man/man3c
diff options
context:
space:
mode:
authorSergio Aguayo <sergioag@qmailhosting.net>2015-06-11 22:45:27 -0500
committerRobert Mustacchi <rm@joyent.com>2015-06-12 07:19:06 -0700
commitb735fab62707bcb6832e1654b9265bd13e0ae959 (patch)
tree01c540740a18201e2cd1e68fa5417d88c4463bd9 /usr/src/man/man3c
parent0afb687bf3724077cd5f304f176b5ee2b92aa2c2 (diff)
downloadillumos-joyent-b735fab62707bcb6832e1654b9265bd13e0ae959.tar.gz
1209 fnmatch(3C) should mention FNM_IGNORECASE
Reviewed by: Marcel Telka <marcel@telka.sk> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/man/man3c')
-rw-r--r--usr/src/man/man3c/fnmatch.3c24
1 files changed, 17 insertions, 7 deletions
diff --git a/usr/src/man/man3c/fnmatch.3c b/usr/src/man/man3c/fnmatch.3c
index 06c032069b..8b93c593b4 100644
--- a/usr/src/man/man3c/fnmatch.3c
+++ b/usr/src/man/man3c/fnmatch.3c
@@ -7,7 +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.
.\" 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.
.\" 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]
-.TH FNMATCH 3C "Jul 24, 2002"
+.TH FNMATCH 3C "Jun 11, 2015"
.SH NAME
fnmatch \- match filename or path name
.SH SYNOPSIS
@@ -19,7 +19,6 @@ fnmatch \- match filename or path name
.fi
.SH DESCRIPTION
-.sp
.LP
The \fBfnmatch()\fR function matches patterns as described on the
\fBfnmatch\fR(5) manual page. It checks the \fIstring\fR argument to see if it
@@ -46,6 +45,21 @@ If not set, the slash character is treated as an ordinary character.
.sp
.ne 2
.na
+\fB\fBFNM_IGNORECASE\fR\fR
+.ad
+.RS 18n
+If set, the \fIstring\fR will be transliterated to lower case before doing the
+actual match. This transliteration is done using \fBtowlower_l\fR(3C), using
+the locale of the current thread. If no locale is set, then the global locale
+is used instead.
+.sp
+If not set, the match will use \fIstring\fR with no changes, making the match
+case-sensitive.
+.RE
+
+.sp
+.ne 2
+.na
\fB\fBFNM_NOESCAPE\fR\fR
.ad
.RS 18n
@@ -82,17 +96,15 @@ character of \fIstring\fR.
.RE
.sp
-.LP
+.RS 18n
If not set, no special restrictions are placed on matching a period.
.SH RETURN VALUES
-.sp
.LP
If \fIstring\fR matches the pattern specified by \fIpattern\fR, then
\fBfnmatch()\fR returns \fB0\fR. If there is no match, \fBfnmatch()\fR returns
\fBFNM_NOMATCH\fR, which is defined in the header <\fBfnmatch.h\fR>. If an
error occurs, \fBfnmatch()\fR returns another non-zero value.
.SH USAGE
-.sp
.LP
The \fBfnmatch()\fR function has two major uses. It could be used by an
application or utility that needs to read a directory and apply a pattern
@@ -112,7 +124,6 @@ treatment for period at the beginning of a filename.
The \fBfnmatch()\fR function can be used safely in multithreaded applications,
as long as \fBsetlocale\fR(3C) is not being called to change the locale.
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -132,7 +143,6 @@ MT-Level MT-Safe with exceptions
.TE
.SH SEE ALSO
-.sp
.LP
\fBfind\fR(1), \fBpax\fR(1), \fBglob\fR(3C), \fBsetlocale\fR(3C),
\fBwordexp\fR(3C), \fBattributes\fR(5), \fBfnmatch\fR(5), \fBstandards\fR(5)