_gggg_eeee_tttt_oooo_pppp_tttt returns the next option letter in _a_r_g_v that matches a letter in
_o_p_t_s_t_r_i_n_g. It supports all the rules of the command syntax standard [see
_iiii_nnnn_tttt_rrrr_oooo(1)]. Since all new commands are intended to adhere to the command
syntax standard, they should use _gggg_eeee_tttt_oooo_pppp_tttt_ssss(1), _gggg_eeee_tttt_oooo_pppp_tttt(3C), or _gggg_eeee_tttt_ssss_uuuu_bbbb_oooo_pppp_tttt(3C)
to parse positional parameters and check for options that are legal for
that command.
_o_p_t_s_t_r_i_n_g must contain the option letters that the command using _gggg_eeee_tttt_oooo_pppp_tttt
will recognize. If a letter is followed by a colon, the option is
expected to have an argument, or group of arguments, which may be
separated from it by white space. _o_p_t_a_r_g is set to point to the start of
the option argument on return from _gggg_eeee_tttt_oooo_pppp_tttt.
_gggg_eeee_tttt_oooo_pppp_tttt places in _o_p_t_i_n_d the _a_r_g_v index of the next argument to be
processed. _o_p_t_i_n_d is external and is initialized to 1 before the first
call to _gggg_eeee_tttt_oooo_pppp_tttt. When all options have been processed (i.e., up to the
first non-option argument), _gggg_eeee_tttt_oooo_pppp_tttt returns _----_1111. The special option ``_----_----''
(two hyphens) may be used to delimit the end of the options; when it is
encountered, _----_1111 is returned and ``_----_----'' is skipped. This is useful in
delimiting non-option arguments that begin with ``_----'' (hyphen).
_gggg_eeee_tttt_oooo_pppp_tttt_rrrr_eeee_ssss_eeee_tttt can be used to reset all the internal state of _gggg_eeee_tttt_oooo_pppp_tttt so that
it may be used again on a different set of arguments.
EEEEXXXXAAAAMMMMPPPPLLLLEEEE
The following code fragment shows how one might process the arguments for
a command that can take the mutually exclusive options _aaaa and _bbbb, and the