亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pattern.texi

?? 一個C源代碼分析器
?? TEXI
?? 第 1 頁 / 共 3 頁
字號:
@node Pattern Matching, I/O Overview, Searching and Sorting, Top@chapter Pattern MatchingThe GNU C Library provides pattern matching facilities for two kinds ofpatterns: regular expressions and file-name wildcards.  The library alsoprovides a facility for expanding variable and command references andparsing text into words in the way the shell does.@menu* Wildcard Matching::    Matching a wildcard pattern against a single string.* Globbing::             Finding the files that match a wildcard pattern.* Regular Expressions::  Matching regular expressions against strings.* Word Expansion::       Expanding shell variables, nested commands,			    arithmetic, and wildcards.			    This is what the shell does with shell commands.@end menu@node Wildcard Matching@section Wildcard Matching@pindex fnmatch.hThis section describes how to match a wildcard pattern against aparticular string.  The result is a yes or no answer: does thestring fit the pattern or not.  The symbols described here are alldeclared in @file{fnmatch.h}.@comment fnmatch.h@comment POSIX.2@deftypefun int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags})This function tests whether the string @var{string} matches the pattern@var{pattern}.  It returns @code{0} if they do match; otherwise, itreturns the nonzero value @code{FNM_NOMATCH}.  The arguments@var{pattern} and @var{string} are both strings.The argument @var{flags} is a combination of flag bits that alter thedetails of matching.  See below for a list of the defined flags.In the GNU C Library, @code{fnmatch} cannot experience an ``error''---italways returns an answer for whether the match succeeds.  However, otherimplementations of @code{fnmatch} might sometimes report ``errors''.They would do so by returning nonzero values that are not equal to@code{FNM_NOMATCH}.@end deftypefunThese are the available flags for the @var{flags} argument:@table @code@comment fnmatch.h@comment GNU@item FNM_FILE_NAMETreat the @samp{/} character specially, for matching file names.  Ifthis flag is set, wildcard constructs in @var{pattern} cannot match@samp{/} in @var{string}.  Thus, the only way to match @samp{/} is withan explicit @samp{/} in @var{pattern}.@comment fnmatch.h@comment POSIX.2@item FNM_PATHNAMEThis is an alias for @code{FNM_FILE_NAME}; it comes from POSIX.2.  Wedon't recommend this name because we don't use the term ``pathname'' forfile names.@comment fnmatch.h@comment POSIX.2@item FNM_PERIODTreat the @samp{.} character specially if it appears at the beginning of@var{string}.  If this flag is set, wildcard constructs in @var{pattern}cannot match @samp{.} as the first character of @var{string}.If you set both @code{FNM_PERIOD} and @code{FNM_FILE_NAME}, then thespecial treatment applies to @samp{.} following @samp{/} as well as to@samp{.} at the beginning of @var{string}.  (The shell uses the@code{FNM_PERIOD} and @code{FNM_FILE_NAME} falgs together for matchingfile names.)@comment fnmatch.h@comment POSIX.2@item FNM_NOESCAPEDon't treat the @samp{\} character specially in patterns.  Normally,@samp{\} quotes the following character, turning off its special meaning(if any) so that it matches only itself.  When quoting is enabled, thepattern @samp{\?} matches only the string @samp{?}, because the questionmark in the pattern acts like an ordinary character.If you use @code{FNM_NOESCAPE}, then @samp{\} is an ordinary character.@comment fnmatch.h@comment GNU@item FNM_LEADING_DIRIgnore a trailing sequence of characters starting with a @samp{/} in@var{string}; that is to say, test whether @var{string} starts with adirectory name that @var{pattern} matches.If this flag is set, either @samp{foo*} or @samp{foobar} as a patternwould match the string @samp{foobar/frobozz}.@comment fnmatch.h@comment GNU@item FNM_CASEFOLDIgnore case in comparing @var{string} to @var{pattern}.@end table@node Globbing@section Globbing@cindex globbingThe archetypal use of wildcards is for matching against the files in adirectory, and making a list of all the matches.  This is called@dfn{globbing}.You could do this using @code{fnmatch}, by reading the directory entriesone by one and testing each one with @code{fnmatch}.  But that would beslow (and complex, since you would have to handle subdirectories byhand).The library provides a function @code{glob} to make this particular useof wildcards convenient.  @code{glob} and the other symbols in thissection are declared in @file{glob.h}.@menu* Calling Glob::        Basic use of @code{glob}.* Flags for Globbing::  Flags that enable various options in @code{glob}.@end menu@node Calling Glob@subsection Calling @code{glob}The result of globbing is a vector of file names (strings).  To returnthis vector, @code{glob} uses a special data type, @code{glob_t}, whichis a structure.  You pass @code{glob} the address of the structure, andit fills in the structure's fields to tell you about the results.@comment glob.h@comment POSIX.2@deftp {Data Type} glob_tThis data type holds a pointer to a word vector.  More precisely, itrecords both the address of the word vector and its size.@table @code@item gl_pathcThe number of elements in the vector.@item gl_pathvThe address of the vector.  This field has type @w{@code{char **}}.@item gl_offsThe offset of the first real element of the vector, from its nominaladdress in the @code{gl_pathv} field.  Unlike the other fields, thisis always an input to @code{glob}, rather than an output from it.If you use a nonzero offset, then that many elements at the beginning ofthe vector are left empty.  (The @code{glob} function fills them withnull pointers.)The @code{gl_offs} field is meaningful only if you use the@code{GLOB_DOOFFS} flag.  Otherwise, the offset is always zeroregardless of what is in this field, and the first real element comes atthe beginning of the vector.@end table@end deftp@comment glob.h@comment POSIX.2@deftypefun int glob (const char *@var{pattern}, int @var{flags}, int (*@var{errfunc}) (const char *@var{filename}, int @var{error-code}), glob_t *@var{vector-ptr})The function @code{glob} does globbing using the pattern @var{pattern}in the current directory.  It puts the result in a newly allocatedvector, and stores the size and address of this vector into@code{*@var{vector-ptr}}.  The argument @var{flags} is a combination ofbit flags; see @ref{Flags for Globbing}, for details of the flags.The result of globbing is a sequence of file names.  The function@code{glob} allocates a string for each resulting word, thenallocates a vector of type @code{char **} to store the addresses ofthese strings.  The last element of the vector is a null pointer.This vector is called the @dfn{word vector}.To return this vector, @code{glob} stores both its address and itslength (number of elements, not counting the terminating null pointer)into @code{*@var{vector-ptr}}.Normally, @code{glob} sorts the file names alphabetically before returning them.  You can turn this off with the flag @code{GLOB_NOSORT}if you want to get the information as fast as possible.  Usually it'sa good idea to let @code{glob} sort them---if you process the files inalphabetical order, the users will have a feel for the rate of progressthat your application is making.If @code{glob} succeeds, it returns 0.  Otherwise, it returns oneof these error codes:@table @code@comment glob.h@comment POSIX.2@item GLOB_ABORTEDThere was an error opening a directory, and you used the flag@code{GLOB_ERR} or your specified @var{errfunc} returned a nonzerovalue.@iftexSee below@end iftex@ifinfo@xref{Flags for Globbing},@end ifinfofor an explanation of the @code{GLOB_ERR} flag and @var{errfunc}.@comment glob.h@comment POSIX.2@item GLOB_NOMATCHThe pattern didn't match any existing files.  If you use the@code{GLOB_NOCHECK} flag, then you never get this error code, becausethat flag tells @code{glob} to @emph{pretend} that the pattern matchedat least one file.@comment glob.h@comment POSIX.2@item GLOB_NOSPACEIt was impossible to allocate memory to hold the result.@end tableIn the event of an error, @code{glob} stores information in@code{*@var{vector-ptr}} about all the matches it has found so far.@end deftypefun@node Flags for Globbing@subsection Flags for GlobbingThis section describes the flags that you can specify in the @var{flags} argument to @code{glob}.  Choose the flags you want,and combine them with the C bitwise OR operator @code{|}.@table @code@comment glob.h@comment POSIX.2@item GLOB_APPENDAppend the words from this expansion to the vector of words produced byprevious calls to @code{glob}.  This way you can effectively expandseveral words as if they were concatenated with spaces between them.In order for appending to work, you must not modify the contents of theword vector structure between calls to @code{glob}.  And, if you set@code{GLOB_DOOFFS} in the first call to @code{glob}, you must alsoset it when you append to the results.Note that the pointer stored in @code{gl_pathv} may no longer be validafter you call @code{glob} the second time, because @code{glob} mighthave relocated the vector.  So always fetch @code{gl_pathv} from the@code{glob_t} structure after each @code{glob} call; @strong{never} savethe pointer across calls.@comment glob.h@comment POSIX.2@item GLOB_DOOFFSLeave blank slots at the beginning of the vector of words.The @code{gl_offs} field says how many slots to leave.The blank slots contain null pointers.@comment glob.h@comment POSIX.2@item GLOB_ERRGive up right away and report an error if there is any difficultyreading the directories that must be read in order to expand @var{pattern}fully.  Such difficulties might include a directory in which you don'thave the requisite access.  Normally, @code{glob} tries its best to keepon going despite any errors, reading whatever directories it can.You can exercise even more control than this by specifying anerror-handler function @var{errfunc} when you call @code{glob}.  If@var{errfunc} is not a null pointer, then @code{glob} doesn't give upright away when it can't read a directory; instead, it calls@var{errfunc} with two arguments, like this:@smallexample(*@var{errfunc}) (@var{filename}, @var{error-code})@end smallexample@noindentThe argument @var{filename} is the name of the directory that@code{glob} couldn't open or couldn't read, and @var{error-code} is the@code{errno} value that was reported to @code{glob}.If the error handler function returns nonzero, then @code{glob} gives upright away.  Otherwise, it continues.@comment glob.h@comment POSIX.2@item GLOB_MARKIf the pattern matches the name of a directory, append @samp{/} to thedirectory's name when returning it.@comment glob.h@comment POSIX.2@item GLOB_NOCHECKIf the pattern doesn't match any file names, return the pattern itselfas if it were a file name that had been matched.  (Normally, when thepattern doesn't match anything, @code{glob} returns that there were nomatches.)@comment glob.h@comment POSIX.2@item GLOB_NOSORTDon't sort the file names; return them in no particular order.(In practice, the order will depend on the order of the entries inthe directory.)  The only reason @emph{not} to sort is to save time.@comment glob.h@comment POSIX.2@item GLOB_NOESCAPEDon't treat the @samp{\} character specially in patterns.  Normally,@samp{\} quotes the following character, turning off its special meaning(if any) so that it matches only itself.  When quoting is enabled, thepattern @samp{\?} matches only the string @samp{?}, because the questionmark in the pattern acts like an ordinary character.If you use @code{GLOB_NOESCAPE}, then @samp{\} is an ordinary character.@code{glob} does its work by calling the function @code{fnmatch}repeatedly.  It handles the flag @code{GLOB_NOESCAPE} by turning on the@code{FNM_NOESCAPE} flag in calls to @code{fnmatch}.@end table@node Regular Expressions@section Regular Expression MatchingThe GNU C library supports two interfaces for matching regularexpressions.  One is the standard POSIX.2 interface, and the other iswhat the GNU system has had for many years.Both interfaces are declared in the header file @file{regex.h}.If you define @w{@code{_POSIX_C_SOURCE}}, then only the POSIX.2functions, structures, and constants are declared.@c !!! we only document the POSIX.2 interface here!!@menu* POSIX Regexp Compilation::    Using @code{regcomp} to prepare to match.* Flags for POSIX Regexps::     Syntax variations for @code{regcomp}.* Matching POSIX Regexps::      Using @code{regexec} to match the compiled				   pattern that you get from @code{regcomp}.* Regexp Subexpressions::       Finding which parts of the string were matched.* Subexpression Complications:: Find points of which parts were matched.* Regexp Cleanup::		Freeing storage; reporting errors.@end menu@node POSIX Regexp Compilation@subsection POSIX Regular Expression CompilationBefore you can actually match a regular expression, you must@dfn{compile} it.  This is not true compilation---it produces a specialdata structure, not machine instructions.  But it is like ordinarycompilation in that its purpose is to enable you to ``execute'' thepattern fast.  (@xref{Matching POSIX Regexps}, for how to use thecompiled regular expression for matching.)There is a special data type for compiled regular expressions:@comment regex.h@comment POSIX.2@deftp {Data Type} regex_tThis type of object holds a compiled regular expression.It is actually a structure.  It has just one field that your programsshould look at:@table @code@item re_nsubThis field holds the number of parenthetical subexpressions in theregular expression that was compiled.@end tableThere are several other fields, but we don't describe them here, becauseonly the functions in the library should use them.@end deftpAfter you create a @code{regex_t} object, you can compile a regularexpression into it by calling @code{regcomp}.@comment regex.h@comment POSIX.2@deftypefun int regcomp (regex_t *@var{compiled}, const char *@var{pattern}, int @var{cflags})The function @code{regcomp} ``compiles'' a regular expression into adata structure that you can use with @code{regexec} to match against astring.  The compiled regular expression format is designed forefficient matching.  @code{regcomp} stores it into @code{*@var{compiled}}.It's up to you to allocate an object of type @code{regex_t} and pass itsaddress to @code{regcomp}.The argument @var{cflags} lets you specify various options that controlthe syntax and semantics of regular expressions.  @xref{Flags for POSIXRegexps}.If you use the flag @code{REG_NOSUB}, then @code{regcomp} omits fromthe compiled regular expression the information necessary to recordhow subexpressions actually match.  In this case, you might as wellpass @code{0} for the @var{matchptr} and @var{nmatch} arguments whenyou call @code{regexec}.If you don't use @code{REG_NOSUB}, then the compiled regular expressiondoes have the capacity to record how subexpressions match.  Also,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品免费在线| 日韩av一二三| 亚洲免费av在线| 午夜精品国产更新| 国产盗摄一区二区| 精品国产免费一区二区三区四区| 欧美三级中文字幕在线观看| 日韩精品资源二区在线| 中文字幕一区二区日韩精品绯色| 蜜臀av一区二区在线观看| 成人精品高清在线| 99国产精品久| 国产日韩欧美高清在线| 亚洲一区免费观看| 成人a免费在线看| 69堂精品视频| 欧美成人精品3d动漫h| 亚洲超丰满肉感bbw| 国产一区中文字幕| 欧美一级日韩免费不卡| 亚洲欧美在线视频观看| 五月婷婷综合激情| 欧美中文字幕一区二区三区| 国产女人水真多18毛片18精品视频| 视频一区国产视频| 91啪在线观看| 欧美α欧美αv大片| 视频一区免费在线观看| 91麻豆国产精品久久| 国产精品高清亚洲| 国产一区视频在线看| 日韩美女天天操| 午夜精品久久久久久久| 色网综合在线观看| 一区二区三区在线观看动漫| 国产成人亚洲综合a∨猫咪| 久久日韩粉嫩一区二区三区| 日韩黄色一级片| 欧美丝袜丝交足nylons| 亚洲成人一二三| 欧美中文字幕久久| 午夜精品福利久久久| 在线观看亚洲专区| 一区二区三区色| 91麻豆精品在线观看| 国产精品萝li| 91啪亚洲精品| 亚洲伦理在线精品| 欧美日韩国产小视频在线观看| 亚洲视频 欧洲视频| 狠狠色丁香婷婷综合久久片| 国产女主播视频一区二区| 国产精选一区二区三区| 日本一区二区久久| 成人高清免费观看| 日韩一区二区三区视频| 国产在线播放一区三区四| 337p日本欧洲亚洲大胆精品| 大陆成人av片| 国产精品久久久久精k8 | 成人激情小说网站| 日韩精品国产精品| 精品国产91亚洲一区二区三区婷婷 | 午夜av一区二区三区| 欧美日韩精品高清| 亚洲免费视频中文字幕| 欧美性生活久久| 污片在线观看一区二区| 精品日本一线二线三线不卡| 国产剧情一区二区三区| 一区二区三区国产豹纹内裤在线| 91国产免费看| 日本欧美久久久久免费播放网| 精品国产乱码久久久久久老虎| 国产真实乱偷精品视频免| 亚洲天堂福利av| 欧美日韩视频专区在线播放| 国产精品亚洲第一| 日韩理论片在线| 日韩欧美一级二级三级久久久| 国产精品123| 2020国产成人综合网| 欧美在线一区二区三区| 欧美a级理论片| 亚洲人快播电影网| 日韩三级视频在线看| 在线观看不卡一区| 激情图区综合网| 国产欧美一区二区精品久导航 | 午夜视频一区在线观看| 精品成人免费观看| 欧美三级三级三级| 精品亚洲成av人在线观看| 亚洲午夜精品17c| 久久婷婷色综合| 在线观看免费视频综合| 97精品久久久久中文字幕| 蜜桃视频在线观看一区| 亚洲午夜私人影院| 久久久久久久久久久久久女国产乱| 国产一区在线观看视频| 亚洲电影一级片| 日本一区二区三区视频视频| 精品国产一区二区三区忘忧草| 91久久人澡人人添人人爽欧美| 国产一级精品在线| 亚洲美女精品一区| 国产精品无遮挡| 337p日本欧洲亚洲大胆色噜噜| 在线看一区二区| av中文字幕在线不卡| 国产制服丝袜一区| 精品在线免费视频| 午夜欧美2019年伦理| 午夜精品一区二区三区三上悠亚| 日本一区二区免费在线观看视频| 久久综合九色综合欧美就去吻| 欧美精品一卡二卡| 99精品桃花视频在线观看| 东方欧美亚洲色图在线| 激情成人综合网| 国产毛片一区二区| 免费成人美女在线观看.| 日本亚洲电影天堂| 爽好久久久欧美精品| 日本一区二区免费在线| 1000部国产精品成人观看| 久久久九九九九| 日本一区二区在线不卡| 国产丝袜欧美中文另类| 欧美极品少妇xxxxⅹ高跟鞋| 精品理论电影在线| 日本一区二区三区免费乱视频| 久久久精品综合| 亚洲欧美怡红院| 日韩美女精品在线| 午夜精品爽啪视频| 日韩高清在线一区| 精品亚洲成a人| 国产在线精品一区二区夜色| 99久久精品国产导航| 91欧美激情一区二区三区成人| 欧美日韩精品欧美日韩精品一| 欧美日韩高清不卡| 久久综合九色欧美综合狠狠| 欧美激情在线一区二区三区| 自拍偷拍亚洲综合| 亚洲国产一区在线观看| 美女视频黄频大全不卡视频在线播放| 日韩国产精品久久久久久亚洲| 中文字幕一区二区三区不卡| 国产精品入口麻豆九色| 亚洲黄色录像片| 日韩av一区二区三区| 国产盗摄精品一区二区三区在线| 91丨porny丨首页| 97久久超碰精品国产| 欧美xxx久久| **欧美大码日韩| 日本色综合中文字幕| 不卡一区在线观看| 欧美视频一区二区三区四区| 精品少妇一区二区三区免费观看| 国产精品免费网站在线观看| 日产精品久久久久久久性色| 国产成人精品亚洲午夜麻豆| 欧美亚洲国产一卡| 久久精品亚洲精品国产欧美 | 一区二区三国产精华液| 日韩**一区毛片| 国产91精品入口| 欧美一区二区三区视频| 日本一区二区不卡视频| 国产日韩视频一区二区三区| 亚洲.国产.中文慕字在线| 国产精品一线二线三线| 4438x亚洲最大成人网| 亚洲国产高清在线| 麻豆91免费观看| 色综合网色综合| 一区二区中文视频| 日韩和欧美的一区| 欧美在线视频不卡| 中文字幕成人在线观看| 国产精品亚洲一区二区三区在线| 欧美日韩亚洲不卡| av亚洲精华国产精华精| 欧美人伦禁忌dvd放荡欲情| 亚洲美女免费在线| 国产成人丝袜美腿| 久久色成人在线| 午夜精品久久久久久久久| 欧美午夜一区二区三区| 中文一区二区在线观看| 国产一区二区三区在线看麻豆| 在线免费观看视频一区| 一区二区欧美在线观看| 成a人片国产精品| 亚洲视频一区在线观看| 国产mv日韩mv欧美|