URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [libiberty/] [fnmatch.txh] - Rev 451
Go to most recent revision | Compare with Previous | Blame | View Log
@deftypefn Replacement int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags})Matches @var{string} against @var{pattern}, returning zero if itmatches, @code{FNM_NOMATCH} if not. @var{pattern} may contain thewildcards @code{?} to match any one character, @code{*} to match anyzero or more characters, or a set of alternate characters in squarebrackets, like @samp{[a-gt8]}, which match one character (@code{a}through @code{g}, or @code{t}, or @code{8}, in this example) if that onecharacter is in the set. A set may be inverted (i.e., match anythingexcept what's in the set) by giving @code{^} or @code{!} as the firstcharacter in the set. To include those characters in the set, list themas anything other than the first character of the set. To include adash in the set, list it last in the set. A backslash character makesthe following character not special, so for example you could matchagainst a literal asterisk with @samp{\*}. To match a literalbackslash, use @samp{\\}.@code{flags} controls various aspects of the matching process, and is aboolean OR of zero or more of the following values (defined in@code{<fnmatch.h>}):@table @code@item FNM_PATHNAME@itemx FNM_FILE_NAME@var{string} is assumed to be a path name. No wildcard will ever match@code{/}.@item FNM_NOESCAPEDo not interpret backslashes as quoting the following special character.@item FNM_PERIODA leading period (at the beginning of @var{string}, or if@code{FNM_PATHNAME} after a slash) is not matched by @code{*} or@code{?} but must be matched explicitly.@item FNM_LEADING_DIRMeans that @var{string} also matches @var{pattern} if some initial partof @var{string} matches, and is followed by @code{/} and zero or morecharacters. For example, @samp{foo*} would match either @samp{foobar}or @samp{foobar/grill}.@item FNM_CASEFOLDIgnores case when performing the comparison.@end table@end deftypefn
Go to most recent revision | Compare with Previous | Blame | View Log
