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

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

?? i386-pc-mingw32-popt.3.html

?? linux 命令行處理popt模塊說明文檔
?? HTML
?? 第 1 頁 / 共 3 頁
字號(hào):
</TABLE>
<P>
A
<B>poptContext</B> keeps track of which options have already been  parsed and
which remain, among other things. If a program wishes to  restart option
processing of a set of arguments, it can reset the  <B>poptContext</B> by passing
the context as the sole argument to  <B>poptResetContext()</B>. <P>
When argument processing
is complete, the process should free the  <B>poptContext</B> as it contains dynamically
allocated components. The  <B>poptFreeContext()</B> function takes a <B></B> <B>poptContext</B>
as its sole argument and frees the resources the  context is using. <P>
Here
are the prototypes of both <B>poptResetContext()</B> and  <B>poptFreeContext()</B>: <P>
<BR>
<PRE>#include &lt;popt.h&gt;void poptFreeContext(poptContext con);void poptResetContext(poptContext
con);</PRE><P>

<H3><A NAME="sect6" HREF="#toc6"></B>3. Parsing the Command Line</A></H3>
After an application has created a <B>poptContext</B>,
it may begin  parsing arguments. <B>poptGetNextOpt()</B> performs the actual  argument
parsing. <P>
<BR>
<PRE>#include &lt;popt.h&gt;int poptGetNextOpt(poptContext con);</PRE><P>
</B>Taking the context as
its sole argument, this function parses the next command-line argument found.
After finding the next argument in the option table, the function fills
in the object pointed to by the option  table entry's <I>arg</I><I></I> pointer if it
is not <B>NULL</B>. If the val entry for the option is  non-0, the function then
returns that value. Otherwise,  <B>poptGetNextOpt()</B> continues on to the next
argument. <P>
<B>poptGetNextOpt()</B> returns -1 when the final argument has been  parsed,
and other negative values when errors occur. This makes it a  good idea
to  keep the <I>val</I> elements in the options table greater than 0.<I></I> <P>
If all of
the command-line options are handled through <I>arg</I><I></I> pointers, command-line parsing
is reduced to the following line of code: <P>
<BR>
<PRE>rc = poptGetNextOpt(poptcon);
</PRE><P>
Many applications require more complex command-line parsing than this, however,
and use the following structure: <P>
<BR>
<PRE>while ((rc = poptGetNextOpt(poptcon)) &gt; 0) {
     switch (rc) {
          /* specific arguments are handled here */
     }
}
</PRE><P>
When returned options are handled, the application needs to know the value
of any arguments that were specified after the option. There are two ways
to discover them. One is to ask popt to fill in a variable with the  value
of the option through the option table's <I>arg</I> elements. The <I></I> other is to use
<B>poptGetOptArg()</B>: <P>
<BR>
<PRE>#include &lt;popt.h&gt;const char * poptGetOptArg(poptContext con);</PRE><P>
</B>This function
returns the argument given for the final option returned by <B>poptGetNextOpt()</B>,
or it returns <B>NULL</B> if no argument was specified. <P>

<H3><A NAME="sect7" HREF="#toc7">4. Leftover Arguments</A></H3>
Many
applications take an arbitrary number of command-line arguments, such as
a list of file names. When popt encounters an argument that does not begin
with a -, it assumes it is such an argument and adds it to a list of leftover
arguments. Three functions allow applications to access such arguments:
<BR>
<PRE></PRE>
<DL>

<DT><B>const char * poptGetArg(poptContext </B><I>con</I><B>);</B>This function returns the next
leftover argument and marks it as </DT>
<DD>processed. </DD>
</DL>
<P>
<BR>
<PRE></PRE>
<DL>

<DT><B>const char * poptPeekArg(poptContext </B><I>con</I><B>);</B>The next leftover argument is
returned but not marked as processed. </DT>
<DD>This allows an application to look
ahead into the argument list, without modifying the list. </DD>
</DL>
<P>
<BR>
<PRE></PRE>
<DL>

<DT><B>const char ** poptGetArgs(poptContext </B><I>con</I><B>);</B>All the leftover arguments are
returned in a manner identical to  </DT>
<DD><I>argv</I>.  The final element in the returned
array points to  <B>NULL</B>, indicating the end of the arguments. <P>
</DD>
</DL>

<H3><A NAME="sect8" HREF="#toc8">5. Automatic
Help Messages</A></H3>
The <B>popt</B> library can automatically generate help messages
which describe the options a program accepts. There are two types of help
messages which can be generated. Usage messages are a short messages which
lists valid options, but does not describe them. Help messages describe
each option on one (or more) lines, resulting in a longer, but more useful,
message. Whenever automatic help messages are used, the <B>descrip</B> and <B>argDescrip</B>
fields <B>struct poptOption</B> members should be filled in for each option. <P>
The
<B>POPT_AUTOHELP</B> macro makes it easy to add <B>--usage</B> and <B>--help</B> messages to your
program, and is described in part 1 of this man page. If more control is
needed over your help messages, the following two functions are available:
<P>
<BR>
<PRE>#include &lt;popt.h&gt;void poptPrintHelp(poptContext con, FILE * f, int flags);void
poptPrintUsage(poptContext con, FILE * f, int flags);</PRE><P>
</B><B>poptPrintHelp()</B> displays
the standard help message to the stdio file descriptor f, while <B>poptPrintUsage()</B>
displays the shorter usage message. Both functions currently ignore the
<B>flags</B> argument; it is there to allow future changes. <P>

<H2><A NAME="sect9" HREF="#toc9">Error Handling</A></H2>
All of
the popt functions that can return errors return integers.  When an error
occurs, a negative error code is returned. The  following table summarizes
the error codes that occur: <P>
<BR>
<PRE>     Error                      DescriptionPOPT_ERROR_NOARG       Argument
missing for an option.POPT_ERROR_BADOPT      Option's argument couldn't be
parsed.POPT_ERROR_OPTSTOODEEP Option aliasing nested too deeply.POPT_ERROR_BADQUOTE
   Quotations do not match.POPT_ERROR_BADNUMBER   Option couldn't be converted
to number.POPT_ERROR_OVERFLOW    A given number was too big or small.</PRE><P>
Here
is a more detailed discussion of each error: <P>

<DL>

<DT><B>POPT_ERROR_NOARG</B> </DT>
<DD>An option
that requires an argument was specified on the command line, but no argument
was given. This can be returned only by <B>poptGetNextOpt()</B>. <P>
</DD>

<DT><B>POPT_ERROR_BADOPT</B>
</DT>
<DD>An option was specified in <I>argv</I> but is not in the option <I></I> table. This error
can be returned only from <B>poptGetNextOpt()</B>. <P>
</DD>

<DT><B>POPT_ERROR_OPTSTOODEEP</B> </DT>
<DD>A set
of option aliases is nested too deeply. Currently, popt  follows options
only 10 levels to prevent infinite recursion. Only  <B>poptGetNextOpt()</B> can
return this error. <P>
</DD>

<DT><B>POPT_ERROR_BADQUOTE</B> </DT>
<DD>A parsed string has a quotation mismatch
(such as a single quotation mark). <B>poptParseArgvString()</B>, <B>poptReadConfigFile()</B>,
or  <B>poptReadDefaultConfig()</B> can return this error. <P>
</DD>

<DT><B>POPT_ERROR_BADNUMBER</B>
</DT>
<DD>A conversion from a string to a number (int or long) failed due to the
string containing nonnumeric characters. This occurs when <B>poptGetNextOpt()</B>
is processing an argument of type <B></B> <B>POPT_ARG_INT</B>, <B>POPT_ARG_LONG</B>,  POPT_ARG_FLOAT<B>,
or </B>POPT_ARG_DOUBLE<B>.</B> <P>
</DD>

<DT><B>POPT_ERROR_OVERFLOW</B> </DT>
<DD>A string-to-number conversion failed
because the number was too large or too small. Like <B>POPT_ERROR_BADNUMBER</B>,
this error  can occur only when <B>poptGetNextOpt()</B> is processing an  argument
of type <B>POPT_ARG_INT</B>, <B>POPT_ARG_LONG</B>,  POPT_ARG_FLOAT<B>, or </B>POPT_ARG_DOUBLE<B>.</B>
<P>
</DD>

<DT><B>POPT_ERROR_ERRNO</B> </DT>
<DD>A system call returned with an error, and <I>errno</I> still
<I></I> contains the error from the system call. Both  <B>poptReadConfigFile()</B> and
<B>poptReadDefaultConfig()</B> can  return this error. <P>
</DD>
</DL>
<P>
Two functions are available
to make it easy for applications to provide good error messages. <BR>
<PRE></PRE>
<DL>

<DT><B>const char *const poptStrerror(const int </B><I>error</I><B>);</B>This function takes a popt
error code and returns a string describing </DT>
<DD>the error, just as with the
standard <B>strerror()</B> function. </DD>
</DL>
<P>
<BR>
<PRE></PRE>
<DL>

<DT><B>const char * poptBadOption(poptContext </B><I>con</I><B>, int </B><I>flags</I><B>);</B>If an error occurred
during <B>poptGetNextOpt()</B>, this function  </DT>
<DD>returns the option that caused
the error. If the <I>flags</I> argument<I></I> is set to <B>POPT_BADOPTION_NOALIAS</B>, the outermost
option is  returned. Otherwise, <I>flags</I> should be 0, and the option that is
<I></I> returned may have been specified through an alias. </DD>
</DL>
<P>
These two functions
make popt error handling trivial for most  applications. When an error is
detected from most of the functions,  an error message is printed along
with the error string from  <B>poptStrerror()</B>. When an error occurs during
argument parsing,  code similiar to the following displays a useful error
message: <P>
<BR>
<PRE>fprintf(stderr, "%s: %s\n",
        poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
        poptStrerror(rc));
</PRE><P>

<H2><A NAME="sect10" HREF="#toc10">Option Aliasing</A></H2>
One of the primary benefits of using popt over <B>getopt()</B>
is the  ability to use option aliasing. This lets the user specify options
that  popt expands into other options when they are specified. If the standard
 grep program made use of popt, users could add a <B>--text</B> option  that expanded
to <B>-i -n -E -2</B> to let them more easily find  information in text files. <P>

<H3><A NAME="sect11" HREF="#toc11">1. Specifying
Aliases</A></H3>
Aliases are normally specified in two places: <I>/etc/popt</I><I></I> and the
<B>.popt</B> file in the user's home directory (found through  the <B>HOME</B> environment
variable). Both files have the same format,  an arbitrary number of lines
formatted like this: <P>
<I>appname</I><B> alias </B><I>newoption</I><B></B><I> expansion</I> <P>
The <I>appname</I> is the
name of the application, which must be the <I></I> same as the <I>name</I> parameter
passed to <I></I> <B>poptGetContext()</B>. This allows each file to specify aliases for
 multiple programs. The <B>alias</B> keyword specifies that an alias is  being
defined; currently popt configuration files support only aliases, but other

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品理伦片| 免费观看日韩av| 国产精品人成在线观看免费 | 91精品福利视频| 成人伦理片在线| 成人一区二区在线观看| 丁香婷婷综合色啪| 不卡的av中国片| 99麻豆久久久国产精品免费| 成人三级伦理片| 成人18视频在线播放| eeuss鲁一区二区三区| 成人aaaa免费全部观看| 色综合咪咪久久| 欧洲精品在线观看| 欧美日韩电影一区| 91精品国产一区二区三区| 欧美一区二区三区四区久久| 欧美一区二区国产| 亚洲精品一区二区精华| 久久精品欧美日韩精品| 中文字幕第一页久久| 亚洲色图制服丝袜| 亚洲大片免费看| 青青草精品视频| 国产精品正在播放| 94-欧美-setu| 欧美日本国产视频| 日韩精品一区在线| 国产目拍亚洲精品99久久精品| 国产精品久久久一本精品| 亚洲精品国产高清久久伦理二区| 一区二区成人在线| 美国欧美日韩国产在线播放| 高清不卡一区二区| 欧美三级视频在线观看| 日韩欧美色综合| 国产精品对白交换视频| 日韩精品乱码免费| 国产成人综合亚洲网站| 在线看日本不卡| 日韩免费看的电影| 一区在线观看免费| 奇米影视一区二区三区小说| 国产精品系列在线观看| 在线一区二区视频| 欧美成人性战久久| 亚洲欧美一区二区久久| 日本不卡免费在线视频| 成人av免费网站| 日韩视频在线永久播放| 国产精品看片你懂得| 日本aⅴ免费视频一区二区三区 | 欧美午夜电影一区| 精品盗摄一区二区三区| 一区二区三区在线视频免费观看| 麻豆精品在线看| 在线观看日韩精品| 国产三区在线成人av| 亚洲r级在线视频| 成人的网站免费观看| 欧美一区二区网站| 亚洲精品免费看| 国产精品综合一区二区三区| 欧美性生活一区| 中文字幕av不卡| 蜜臀a∨国产成人精品| 91年精品国产| 久久久天堂av| 人人狠狠综合久久亚洲| 91成人免费在线视频| 国产精品理论在线观看| 国产麻豆精品在线| 91精品国产综合久久福利软件| 亚洲乱码精品一二三四区日韩在线| 国内精品久久久久影院一蜜桃| 欧美日韩一二三区| 亚洲欧美偷拍三级| 国产mv日韩mv欧美| 亚洲精品在线三区| 日韩中文字幕一区二区三区| 一道本成人在线| 国产精品免费aⅴ片在线观看| 老司机免费视频一区二区| 欧美视频一区在线观看| 亚洲欧美一区二区在线观看| 国产精品资源网| 欧美精品一区二区高清在线观看| 日韩精品亚洲专区| 欧美日韩在线精品一区二区三区激情| 国产精品超碰97尤物18| 国产成人精品免费在线| 久久综合资源网| 久久精品久久综合| 日韩一区二区中文字幕| 日韩国产一区二| 在线成人av网站| 性做久久久久久久免费看| 日本精品一区二区三区高清| 亚洲日本丝袜连裤袜办公室| 91蝌蚪porny| 1024亚洲合集| 99vv1com这只有精品| 国产精品久久久久影院| 北条麻妃一区二区三区| 国产精品狼人久久影院观看方式| 成人免费视频播放| 国产精品家庭影院| 99久久精品国产观看| 尤物视频一区二区| 欧美综合在线视频| 午夜精品久久久久久久久久久| 欧美日韩一区二区三区免费看| 亚洲综合免费观看高清完整版| 欧美亚洲国产怡红院影院| 亚洲最大成人网4388xx| 欧美色综合网站| 强制捆绑调教一区二区| 久久老女人爱爱| 成人深夜福利app| 亚洲人123区| 欧美乱熟臀69xxxxxx| 日本美女一区二区三区视频| 精品国精品自拍自在线| 国产成人午夜精品5599| 国产精品美女久久久久aⅴ| 99re66热这里只有精品3直播 | 亚洲天堂久久久久久久| 色网综合在线观看| 日日夜夜一区二区| 精品国产乱子伦一区| 成人午夜在线免费| 一区二区三区四区高清精品免费观看| 欧美日韩免费在线视频| 麻豆成人av在线| 亚洲国产精品高清| 91国偷自产一区二区使用方法| 日本va欧美va瓶| 国产精品水嫩水嫩| 欧美日韩一区三区四区| 精品无人码麻豆乱码1区2区 | 欧美亚洲精品一区| 久久国产精品露脸对白| 国产女人18水真多18精品一级做| 91国偷自产一区二区使用方法| 日韩av中文字幕一区二区| 国产欧美精品国产国产专区| 日本精品裸体写真集在线观看| 久久精品国产亚洲一区二区三区 | 午夜久久福利影院| 国产亚洲一本大道中文在线| 91天堂素人约啪| 日本网站在线观看一区二区三区| 国产欧美久久久精品影院| 精品视频一区三区九区| 国产成人精品一区二| 亚洲成人久久影院| 国产欧美综合在线| 91.成人天堂一区| 大胆亚洲人体视频| 天天操天天综合网| 国产精品婷婷午夜在线观看| 欧美一二三区在线| 91免费看视频| 韩国三级在线一区| 亚洲成年人影院| 国产精品第一页第二页第三页| 欧美一区二区三区视频在线| 91麻豆高清视频| 国产精品一区不卡| 日韩电影在线一区二区三区| 亚洲色图另类专区| 国产欧美日韩在线| 欧美成人精精品一区二区频| 在线观看三级视频欧美| 成人午夜私人影院| 韩国精品免费视频| 青青青爽久久午夜综合久久午夜| 一区二区视频在线| 国产精品久久久久久久浪潮网站 | 亚洲制服丝袜av| 国产丝袜在线精品| 欧美不卡一区二区| 337p亚洲精品色噜噜噜| 色综合夜色一区| 成人丝袜高跟foot| 国产成人午夜片在线观看高清观看| 日韩av中文字幕一区二区| 亚洲一区二区三区四区在线观看| 国产精品乱码一区二区三区软件| 日韩免费在线观看| 欧美精品粉嫩高潮一区二区| 色女孩综合影院| 91在线免费看| 99麻豆久久久国产精品免费优播| 丰满亚洲少妇av| 国产成人精品免费在线| 国产精一区二区三区| 国产麻豆日韩欧美久久| 国产在线视频不卡二|