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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? optind.html

?? posix標(biāo)準(zhǔn)英文,html格式
?? HTML
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2004 IEEE and The Open Group, All Rights Reserved --><title>getopt</title></head><body bgcolor="white"><basefont size="3"> <a name="getopt"></a> <a name="tag_03_234"></a><!-- getopt --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2004 Edition<br>Copyright &copy; 2001-2004 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_03_234_01"></a>NAME</h4><blockquote>getopt, optarg, opterr, optind, optopt - command option parsing</blockquote><h4><a name="tag_03_234_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><p><code><tt>#include &lt;<a href="../basedefs/unistd.h.html">unistd.h</a>&gt;<br><br> int getopt(int</tt> <i>argc</i><tt>, char * const</tt> <i>argv</i><tt>[], const char *</tt><i>optstring</i><tt>);<br> extern char *optarg;<br> extern int optind, opterr, optopt;<br></tt></code></p></blockquote><h4><a name="tag_03_234_03"></a>DESCRIPTION</h4><blockquote><p>The <i>getopt</i>() function is a command-line parser that shall follow Utility Syntax Guidelines 3, 4, 5, 6, 7, 9, and 10 inthe Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap12.html#tag_12_02">Section 12.2,Utility Syntax Guidelines</a>.</p><p>The parameters <i>argc</i> and <i>argv</i> are the argument count and argument array as passed to <i>main</i>() (see <a href="exec.html"><i><a href="../functions/exec.html">exec</a></i>()</a> ). The argument <i>optstring</i> is a string of recognizedoption characters; if a character is followed by a colon, the option takes an argument. All option characters allowed by UtilitySyntax Guideline 3 are allowed in <i>optstring</i>. The implementation may accept other characters as an extension.</p><p>The variable <i>optind</i> is the index of the next element of the <i>argv</i>[] vector to be processed. It shall be initializedto 1 by the system, and <i>getopt</i>() shall update it when it finishes with each element of <i>argv</i>[]. When an element of<i>argv</i>[] contains multiple option characters, it is unspecified how <i>getopt</i>() determines which options have already beenprocessed.</p><p>The <i>getopt</i>() function shall return the next option character (if one is found) from <i>argv</i> that matches a characterin <i>optstring</i>, if there is one that matches. If the option takes an argument, <i>getopt</i>() shall set the variable<i>optarg</i> to point to the option-argument as follows:</p><ol><li><p>If the option was the last character in the string pointed to by an element of <i>argv</i>, then <i>optarg</i> shall contain thenext element of <i>argv</i>, and <i>optind</i> shall be incremented by 2. If the resulting value of <i>optind</i> is greater than<i>argc</i>, this indicates a missing option-argument, and <i>getopt</i>() shall return an error indication.</p></li><li><p>Otherwise, <i>optarg</i> shall point to the string following the option character in that element of <i>argv</i>, and<i>optind</i> shall be incremented by 1.</p></li></ol><p>If, when <i>getopt</i>() is called:</p><pre><i>argv</i><tt>[optind]</tt>  is a null pointer<tt>*</tt>*<i>argv</i><tt>[optind]</tt>  is not the character <tt>- </tt> <i>argv</i><tt>[optind]</tt>  points to the string <tt>"-"</tt></pre><p><i>getopt</i>() shall return -1 without changing <i>optind</i>. If:</p><pre><i>argv</i><tt>[optind]</tt>   points to the string <tt>"--"</tt></pre><p><i>getopt</i>() shall return -1 after incrementing <i>optind</i>.</p><p>If <i>getopt</i>() encounters an option character that is not contained in <i>optstring</i>, it shall return the question-mark (<tt>'?'</tt> ) character. If it detects a missing option-argument, it shall return the colon character ( <tt>':'</tt> ) if thefirst character of <i>optstring</i> was a colon, or a question-mark character ( <tt>'?'</tt> ) otherwise. In either case,<i>getopt</i>() shall set the variable <i>optopt</i> to the option character that caused the error. If the application has not setthe variable <i>opterr</i> to 0 and the first character of <i>optstring</i> is not a colon, <i>getopt</i>() shall also print adiagnostic message to <i>stderr</i> in the format specified for the <a href="../utilities/getopts.html"><i>getopts</i></a>utility.</p><p>The <i>getopt</i>() function need not be reentrant. A function that is not required to be reentrant is not required to bethread-safe.</p></blockquote><h4><a name="tag_03_234_04"></a>RETURN VALUE</h4><blockquote><p>The <i>getopt</i>() function shall return the next option character specified on the command line.</p><p>A colon ( <tt>':'</tt> ) shall be returned if <i>getopt</i>() detects a missing argument and the first character of<i>optstring</i> was a colon ( <tt>':'</tt> ).</p><p>A question mark ( <tt>'?'</tt> ) shall be returned if <i>getopt</i>() encounters an option character not in <i>optstring</i> ordetects a missing argument and the first character of <i>optstring</i> was not a colon ( <tt>':'</tt> ).</p><p>Otherwise, <i>getopt</i>() shall return -1 when all command line options are parsed.</p></blockquote><h4><a name="tag_03_234_05"></a>ERRORS</h4><blockquote><p>No errors are defined.</p></blockquote><hr><div class="box"><em>The following sections are informative.</em></div><h4><a name="tag_03_234_06"></a>EXAMPLES</h4><blockquote><h5><a name="tag_03_234_06_01"></a>Parsing Command Line Options</h5><p>The following code fragment shows how you might process the arguments for a utility that can take the mutually-exclusive options<i>a</i> and <i>b</i> and the options <i>f</i> and <i>o</i>, both of which require arguments:</p><pre><tt>#include &lt;unistd.h&gt;<br>intmain(int argc, char *argv[ ]){    int c;    int bflg, aflg, errflg;    char *ifile;    char *ofile;    extern char *optarg;    extern int optind, optopt;    . . .    while ((c = getopt(argc, argv, ":abf:o:")) != -1) {        switch(c) {        case 'a':            if (bflg)                errflg++;            else                aflg++;            break;        case 'b':            if (aflg)                errflg++;            else {                bflg++;                bproc();            }            break;        case 'f':            ifile = optarg;            break;        case 'o':            ofile = optarg;            break;            case ':':       /* -f or -o without operand */                    fprintf(stderr,                            "Option -%c requires an operand\n", optopt);                    errflg++;                    break;        case '?':                    fprintf(stderr,                            "Unrecognized option: -%c\n", optopt);            errflg++;        }    }    if (errflg) {        fprintf(stderr, "usage: . . . ");        exit(2);    }    for ( ; optind &lt; argc; optind++) {        if (access(argv[optind], R_OK)) {    . . .}</tt></pre><p>This code accepts any of the following as equivalent:</p><pre><tt>cmd -ao arg path pathcmd -a -o arg path pathcmd -o arg -a path pathcmd -a -o arg -- path pathcmd -a -oarg path pathcmd -aoarg path path</tt></pre><h5><a name="tag_03_234_06_02"></a>Checking Options and Arguments</h5><p>The following example parses a set of command line options and prints messages to standard output for each option and argumentthat it encounters.</p><pre><tt>#include &lt;unistd.h&gt;#include &lt;stdio.h&gt;...int c;char *filename;extern char *optarg;extern int optind, optopt, opterr;...while ((c = getopt(argc, argv, ":abf:")) != -1) {    switch(c) {    case 'a':        printf("a is set\n");        break;    case 'b':        printf("b is set\n");        break;    case 'f':        filename = optarg;        printf("filename is %s\n", filename);        break;    case ':':        printf("-%c without filename\n", optopt);        break;    case '?':        printf("unknown arg %c\n", optopt);        break;    }}</tt></pre><h5><a name="tag_03_234_06_03"></a>Selecting Options from the Command Line</h5><p>The following example selects the type of database routines the user wants to use based on the <i>Options</i> argument.</p><pre><tt>#include &lt;unistd.h&gt;#include &lt;string.h&gt;...char *Options = "hdbtl";...int dbtype, i;char c;char *st;...dbtype = 0;while ((c = getopt(argc, argv, Options)) != -1) {    if ((st = strchr(Options, c)) != NULL) {        dbtype = st - Options;        break;    }}</tt></pre></blockquote><h4><a name="tag_03_234_07"></a>APPLICATION USAGE</h4><blockquote><p>The <i>getopt</i>() function is only required to support option characters included in Utility Syntax Guideline 3. Manyhistorical implementations of <i>getopt</i>() support other characters as options. This is an allowed extension, but applicationsthat use extensions are not maximally portable. Note that support for multi-byte option characters is only possible when suchcharacters can be represented as type <b>int</b>.</p></blockquote><h4><a name="tag_03_234_08"></a>RATIONALE</h4><blockquote><p>The <i>optopt</i> variable represents historical practice and allows the application to obtain the identity of the invalidoption.</p><p>The description has been written to make it clear that <i>getopt</i>(), like the <a href="../utilities/getopts.html"><i>getopts</i></a> utility, deals with option-arguments whether separated from the option by&lt;blank&gt;s or not. Note that the requirements on <i>getopt</i>() and <a href="../utilities/getopts.html"><i>getopts</i></a> aremore stringent than the Utility Syntax Guidelines.</p><p>The <i>getopt</i>() function shall return -1, rather than EOF, so that <a href="../basedefs/stdio.h.html"><i>&lt;stdio.h&gt;</i></a> is not required.</p><p>The special significance of a colon as the first character of <i>optstring</i> makes <i>getopt</i>() consistent with the <ahref="../utilities/getopts.html"><i>getopts</i></a> utility. It allows an application to make a distinction between a missingargument and an incorrect option letter without having to examine the option letter. It is true that a missing argument can only bedetected in one case, but that is a case that has to be considered.</p></blockquote><h4><a name="tag_03_234_09"></a>FUTURE DIRECTIONS</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_234_10"></a>SEE ALSO</h4><blockquote><p><a href="exec.html"><i><a href="../functions/exec.html">exec</a></i>()</a>, the Base Definitions volume ofIEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/unistd.h.html"><i>&lt;unistd.h&gt;</i></a>, the Shell and Utilities volume ofIEEE&nbsp;Std&nbsp;1003.1-2001</p></blockquote><h4><a name="tag_03_234_11"></a>CHANGE HISTORY</h4><blockquote><p>First released in Issue 1. Derived from Issue 1 of the SVID.</p></blockquote><h4><a name="tag_03_234_12"></a>Issue 5</h4><blockquote><p>A note indicating that the <i>getopt</i>() function need not be reentrant is added to the DESCRIPTION.</p></blockquote><h4><a name="tag_03_234_13"></a>Issue 6</h4><blockquote><p>IEEE PASC Interpretation 1003.2 #150 is applied.</p></blockquote><div class="box"><em>End of informative text.</em></div><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX &reg; is a registered Trademark of The Open Group.<br>POSIX &reg; is a registered Trademark of The IEEE.<br>[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>]</font></center><!--footer end--><hr size="2" noshade></body></html>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费电影在线| 日韩欧美在线一区二区三区| 激情图片小说一区| 亚洲欧美日韩国产综合在线| 日韩欧美区一区二| 色综合一区二区三区| 韩国三级在线一区| 亚洲五码中文字幕| 国产精品女同一区二区三区| 91精品欧美久久久久久动漫| 91热门视频在线观看| 国产一区二区免费在线| 视频一区中文字幕国产| 一区二区高清在线| 国产精品视频yy9299一区| 欧美v亚洲v综合ⅴ国产v| 欧美另类久久久品| 欧美在线影院一区二区| 成人av一区二区三区| 国产精品99久久久久久有的能看 | 91麻豆视频网站| 国产一区二区三区不卡在线观看| 丝袜亚洲另类丝袜在线| 亚洲午夜av在线| 亚洲精品成人在线| 亚洲视频一二区| 一色屋精品亚洲香蕉网站| 亚洲国产精品精华液2区45| 欧美精品一区二区三| 日韩免费高清电影| 欧美一卡2卡3卡4卡| 91精品在线观看入口| 正在播放亚洲一区| 欧美精选一区二区| 欧美猛男gaygay网站| 欧美色大人视频| 欧美精品久久天天躁| 欧美一区二区三区人| 91精品国产手机| 日韩精品综合一本久道在线视频| 日韩一区二区三区av| 日韩视频免费直播| 日韩女同互慰一区二区| 26uuu亚洲综合色| 久久久国产精品不卡| 色88888久久久久久影院按摩| 久久国产精品99久久人人澡| 亚洲色图视频网| 久久久国产一区二区三区四区小说| 色噜噜狠狠成人网p站| 国产盗摄精品一区二区三区在线| 天天射综合影视| 亚洲最新视频在线观看| 亚洲视频综合在线| 国产精品水嫩水嫩| 久久先锋影音av鲁色资源网| 日韩三级中文字幕| 欧美美女黄视频| 欧美福利视频一区| 欧美亚洲动漫精品| 欧美日本不卡视频| 欧美三级欧美一级| 欧美日韩一区二区三区在线| 欧美亚洲综合久久| 7799精品视频| 精品国内片67194| 国产日韩高清在线| 亚洲欧洲日韩在线| 午夜一区二区三区视频| 亚洲高清视频中文字幕| a4yy欧美一区二区三区| 午夜久久久久久| 欧美电影影音先锋| 亚洲二区在线视频| 国产一区二三区好的| 欧美一区二区三区男人的天堂| 日韩不卡在线观看日韩不卡视频| 成人永久免费视频| 国产精品美女久久久久高潮| 亚洲精品视频免费观看| 国产精品久久久久9999吃药| 精品少妇一区二区三区日产乱码| 精品国产一区二区三区四区四 | 国产精品亚洲视频| 日韩欧美国产系列| 国产精品久久久久三级| 午夜国产精品一区| 国产精品综合在线视频| 欧洲一区二区三区在线| 中文字幕亚洲在| 五月激情综合婷婷| 成a人片亚洲日本久久| 成人午夜视频免费看| 欧美综合天天夜夜久久| 欧美精品一区二区久久久| 一片黄亚洲嫩模| 丁香桃色午夜亚洲一区二区三区| 色噜噜偷拍精品综合在线| 欧美精品乱码久久久久久按摩| 国产午夜精品一区二区三区嫩草 | 欧美日韩午夜影院| 国产欧美日韩精品a在线观看| 秋霞电影网一区二区| 色综合久久九月婷婷色综合| 久久久精品tv| 国产成人免费视频网站| 日韩欧美黄色影院| 欧美aaa在线| 欧美一区二区三区在线观看 | 91在线观看成人| 久久伊99综合婷婷久久伊| 亚洲综合激情另类小说区| 欧美天天综合网| 亚洲成人中文在线| 欧美韩国日本综合| 国产嫩草影院久久久久| 91同城在线观看| av在线不卡观看免费观看| 美日韩黄色大片| 麻豆国产91在线播放| 亚洲精品一线二线三线| 国产欧美日韩在线看| 久久er99热精品一区二区| 欧美va在线播放| 国产美女精品一区二区三区| 精品在线观看免费| 成人午夜电影网站| 久久久精品一品道一区| 亚洲免费观看高清完整版在线 | jlzzjlzz亚洲女人18| 亚洲色图在线视频| 99视频精品在线| 国产精品国模大尺度视频| 成人激情电影免费在线观看| 中文字幕av一区二区三区高 | 日韩小视频在线观看专区| 亚洲国产精品久久久久秋霞影院| 欧美亚洲愉拍一区二区| 一区二区三区产品免费精品久久75| 成人av综合一区| 亚洲乱码日产精品bd| 91麻豆国产自产在线观看| 亚洲日本va午夜在线电影| 色欧美片视频在线观看在线视频| ...xxx性欧美| 色噜噜狠狠一区二区三区果冻| 亚洲精品乱码久久久久久久久| 91久久精品一区二区三| 亚洲福利一区二区| 91精品国产91久久久久久一区二区 | 国产在线不卡一区| 国产日韩欧美精品在线| 成人激情小说网站| 亚洲视频免费看| 欧美日韩国产小视频在线观看| 午夜精品福利一区二区三区av| 欧美精品免费视频| 激情欧美一区二区| 中文字幕欧美三区| 在线观看日韩毛片| 免费观看日韩av| 久久精品人人做| 色妹子一区二区| 免费日韩伦理电影| 欧美激情综合五月色丁香小说| 91色九色蝌蚪| 伦理电影国产精品| 国产欧美日韩另类视频免费观看| 色香蕉成人二区免费| 五月激情丁香一区二区三区| 久久综合视频网| 99视频一区二区| 日韩电影免费一区| 中文成人综合网| 欧美人动与zoxxxx乱| 国产一区二区伦理片| 亚洲精品中文字幕在线观看| 欧美一区二区三区的| 9人人澡人人爽人人精品| 日韩不卡免费视频| 国产精品黄色在线观看| 欧美一区二区在线视频| 成人国产在线观看| 日本伊人午夜精品| 亚洲日本在线视频观看| 日韩欧美电影一区| 91高清视频在线| 国产精品一区二区三区网站| 亚洲一二三区视频在线观看| 337p日本欧洲亚洲大胆精品| 在线亚洲人成电影网站色www| 激情综合色丁香一区二区| 专区另类欧美日韩| 久久久久国产免费免费 | 欧日韩精品视频| 国产一区二区福利视频| 亚洲成a人在线观看| 国产精品私人影院| 欧美va在线播放| 欧美精品色一区二区三区|