File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 22012201\begin {tabbing }
22022202stru\= ct \funnm {option} \{ \\
22032203\> const char *name; \textrm {/* name of the option */} \\
2204- \> int has\_ arg; \textrm {/* value : yes, no, \emsl {optional} */} \\
2204+ \> int has\_ arg; \textrm {/* meaning : yes, no, \emsl {optional} */} \\
22052205\> int *flag; \textrm {/*~}\= \textrm {if \texttt {NULL }, the function returns
22062206\texttt {val }}, \\
22072207\>\> \textrm {otherwise returns 0}
22242224\item If \texttt {flag } is set, \texttt {getopt\_ long } returns 0, which makes
22252225these long options without the short variant get processed in a single branch of
22262226\texttt {case }.
2227+ \item The actual permitted values of the \texttt {has\_ arg } member are defines
2228+ \texttt {no\_ argument }, \texttt {required\_ argument } and \texttt {optional\_ argument }.
22272229\item There is also \texttt {getopt\_ long\_ only }, which allows long options
22282230to begin with a single dash (\texttt {-option }).
22292231\item The \texttt {getopt\_ long } function is possible to use in two ways.
You can’t perform that action at this time.
0 commit comments