亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲美女区一区| 精品日本一线二线三线不卡| 国产综合色视频| 美国欧美日韩国产在线播放| 日韩激情视频网站| 日韩1区2区3区| 亚洲一区成人在线| 午夜欧美在线一二页| 亚洲成av人影院在线观看网| 亚洲一区视频在线观看视频| 午夜电影一区二区| 免费高清成人在线| 国产成人精品免费在线| 国产在线不卡一卡二卡三卡四卡| 韩国av一区二区三区在线观看| 国产精品一区二区在线看| 国产成人午夜精品影院观看视频 | 成人黄色777网| 色婷婷av一区二区三区gif| 在线观看日产精品| 在线电影欧美成精品| 日本一二三不卡| 五月综合激情婷婷六月色窝| 国产精品中文字幕一区二区三区| 91日韩在线专区| 精品国产伦理网| 偷拍一区二区三区| 成人精品电影在线观看| 91精品国产一区二区| 综合亚洲深深色噜噜狠狠网站| 免费在线观看一区二区三区| 丁香桃色午夜亚洲一区二区三区| 欧美日韩综合在线免费观看| 欧美国产精品一区二区三区| 美女性感视频久久| 欧美三级电影在线看| 亚洲免费观看高清完整版在线观看熊| 九九在线精品视频| 欧美猛男超大videosgay| 亚洲精品成人天堂一二三| 国产成人精品aa毛片| 久久久精品国产免费观看同学| 亚洲超碰精品一区二区| 欧美三级三级三级| 视频在线观看91| 日韩亚洲欧美高清| 日本不卡的三区四区五区| 欧美美女黄视频| 视频一区免费在线观看| 欧美精品在线观看一区二区| 亚洲成人av一区二区三区| 欧美日韩三级在线| 美脚の诱脚舐め脚责91| 国产亚洲欧美激情| 99久久综合国产精品| 一区二区激情视频| 日韩午夜精品电影| 成人精品电影在线观看| 亚洲一区二区三区中文字幕| 欧美一区二区三区在线视频| 激情欧美一区二区| 一区二区三区.www| 欧美成人精品高清在线播放| 99久久777色| 奇米色一区二区| |精品福利一区二区三区| 日韩欧美精品三级| 欧洲精品在线观看| 成人污污视频在线观看| 五月天网站亚洲| 亚洲精品视频一区二区| 久久久三级国产网站| 在线免费不卡视频| 国产ts人妖一区二区| 图片区小说区区亚洲影院| 成人免费一区二区三区在线观看| 欧美性视频一区二区三区| 国产高清久久久| 久久黄色级2电影| 午夜欧美2019年伦理| 亚洲地区一二三色| 伊人开心综合网| 国产精品成人在线观看| 国产91精品久久久久久久网曝门| 亚洲一级二级在线| 91丨porny丨蝌蚪视频| 亚洲国产日韩精品| 亚洲欧美电影院| 亚洲欧洲av色图| 亚洲欧美综合网| 久久精品男人天堂av| 亚洲精品一区二区三区在线观看 | 国产精品久久久久久亚洲伦| 精品久久国产老人久久综合| 精品国产一区二区三区久久影院| 91精品国产美女浴室洗澡无遮挡| 欧美日韩视频在线一区二区| 欧美日韩国产首页| 日韩精品资源二区在线| 久久久噜噜噜久久人人看| 国产欧美va欧美不卡在线| 国产精品视频看| 亚洲一级在线观看| 极品少妇一区二区| 成人av影院在线| 91 com成人网| 国产亚洲精品中文字幕| 悠悠色在线精品| 久久av老司机精品网站导航| 不卡电影一区二区三区| 在线观看成人小视频| 久久日韩精品一区二区五区| 中文字幕视频一区| 久国产精品韩国三级视频| 91蜜桃免费观看视频| 日韩欧美国产一二三区| 国产精品国产三级国产普通话三级 | 久久成人18免费观看| 日本精品免费观看高清观看| 欧美一级高清片在线观看| 亚洲人xxxx| 成人一区二区三区在线观看| 2020国产精品| 1024国产精品| 樱桃国产成人精品视频| 国产一区美女在线| 91精品欧美福利在线观看| 中文字幕在线观看不卡| 福利视频网站一区二区三区| 91精品在线免费| 五月婷婷激情综合| 欧美另类一区二区三区| 亚洲第一狼人社区| 欧美美女视频在线观看| 亚洲狠狠爱一区二区三区| av在线综合网| 中文字幕一区二区三区视频| av中文字幕一区| 一区二区三区日韩| 一本大道综合伊人精品热热 | 日本美女一区二区三区视频| 欧美日韩视频在线观看一区二区三区 | 国产欧美精品在线观看| 国产尤物一区二区在线| 国产精品三级电影| 日本韩国精品在线| 爽好久久久欧美精品| 日韩手机在线导航| 成人激情黄色小说| 亚洲综合在线五月| 日韩精品一区在线| av在线不卡电影| 日本成人中文字幕| 欧美激情资源网| 欧美日韩精品高清| 成人免费不卡视频| 七七婷婷婷婷精品国产| 日本一区二区三区免费乱视频| 91精品福利视频| 国产成人一区二区精品非洲| 自拍视频在线观看一区二区| 911精品产国品一二三产区| 精品午夜久久福利影院| 亚洲一区二区三区中文字幕在线 | 日韩高清一级片| 亚洲免费伊人电影| 久久综合久久综合久久| 欧美系列一区二区| 色综合久久88色综合天天免费| 国产精品主播直播| 蜜臀av国产精品久久久久| 亚洲欧美激情插| 国产精品理论片| 亚洲国产精品黑人久久久| 精品毛片乱码1区2区3区| 欧美区视频在线观看| 色婷婷av一区| 欧美四级电影在线观看| 欧美综合一区二区三区| 色婷婷av一区二区三区大白胸| 91原创在线视频| 日本精品裸体写真集在线观看| 91一区二区三区在线观看| 99re热这里只有精品免费视频| 99精品视频在线观看| 色网综合在线观看| 欧美日韩aaa| 欧美精品丝袜中出| 久久精品夜夜夜夜久久| 日韩一区在线播放| 午夜a成v人精品| 激情小说欧美图片| 色偷偷88欧美精品久久久| 欧美日韩你懂的| 久久理论电影网| 亚洲一区二区三区四区在线免费观看 | 成人午夜电影久久影院| 欧美日精品一区视频| 久久亚洲精品小早川怜子| 国产精品国产自产拍高清av|