mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
Use actual enum names in wgetopt
No functional change here.
This commit is contained in:
parent
abc2fc2cb0
commit
6bc545d503
1 changed files with 2 additions and 4 deletions
|
@ -250,16 +250,14 @@ void wgetopter_t::_update_long_opt(int argc, string_array_t argv, const struct w
|
|||
woptind++;
|
||||
assert(nextchar[nameend] == '\0' || nextchar[nameend] == '=');
|
||||
if (nextchar[nameend] == '=') {
|
||||
// Don't test has_arg with >, because some C compilers don't allow it to be used on
|
||||
// enums.
|
||||
if (pfound->has_arg)
|
||||
if (pfound->has_arg != no_argument)
|
||||
woptarg = &nextchar[nameend + 1];
|
||||
else {
|
||||
nextchar += std::wcslen(nextchar);
|
||||
*retval = '?';
|
||||
return;
|
||||
}
|
||||
} else if (pfound->has_arg == 1) {
|
||||
} else if (pfound->has_arg == required_argument) {
|
||||
if (woptind < argc)
|
||||
woptarg = argv[woptind++];
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue