5754 prtconf: assertion failure in libpcidb if vendor cannot be looked up
[illumos-gate.git] / usr / src / man / man3gen / gmatch.3gen
blob15dd15cf6c2ed7037dff2011516c2f799788a73f
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH GMATCH 3GEN "Dec 29, 1996"
7 .SH NAME
8 gmatch \- shell global pattern matching
9 .SH SYNOPSIS
10 .LP
11 .nf
12 cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lgen\fR [ \fIlibrary\fR ... ]
13 #include <libgen.h>
15 \fBint\fR \fBgmatch\fR(\fBconst char *\fR\fIstr\fR, \fBconst char *\fR\fIpattern\fR);
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
21 \fBgmatch()\fR checks whether the null-terminated string \fIstr\fR matches the
22 null-terminated pattern string \fIpattern\fR. See the \fBsh\fR(1), section
23 \fBFile Name Generation\fR, for a discussion of pattern matching. A backslash
24 (\fB\e\fR) is used as an escape character in pattern strings.
25 .SH RETURN VALUES
26 .sp
27 .LP
28 \fBgmatch()\fR returns non-zero if the pattern matches the string, zero if the
29 pattern does not.
30 .SH EXAMPLES
31 .LP
32 \fBExample 1 \fRExamples of \fBgmatch()\fR function.
33 .sp
34 .LP
35 In the following example, \fBgmatch()\fR returns non-zero (true) for all
36 strings with "\fBa\fR" or "\fB-\fR" as their last character.
38 .sp
39 .in +2
40 .nf
41 char *s;
42 gmatch (s, "*[a\e-]" )
43 .fi
44 .in -2
46 .SH ATTRIBUTES
47 .sp
48 .LP
49 See \fBattributes\fR(5) for descriptions of the following attributes:
50 .sp
52 .sp
53 .TS
54 box;
55 c | c
56 l | l .
57 ATTRIBUTE TYPE  ATTRIBUTE VALUE
59 MT-Level        MT-Safe
60 .TE
62 .SH SEE ALSO
63 .sp
64 .LP
65 \fBsh\fR(1), \fBattributes\fR(5)
66 .SH NOTES
67 .sp
68 .LP
69 When compiling multithreaded applications, the \fB_REENTRANT\fR flag must be
70 defined on the compile line.  This flag should only be used in multithreaded
71 applications.