mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-18 13:33:43 +00:00
fixed short options
This commit is contained in:
@@ -263,12 +263,12 @@ int parse_options(int argc, char *argv[], struct device_t *dev, struct encoder_t
|
|||||||
if (isalpha(_LONG_OPTS[opt_index].val)) {
|
if (isalpha(_LONG_OPTS[opt_index].val)) {
|
||||||
short_opts[short_index] = _LONG_OPTS[opt_index].val;
|
short_opts[short_index] = _LONG_OPTS[opt_index].val;
|
||||||
++short_index;
|
++short_index;
|
||||||
}
|
|
||||||
if (_LONG_OPTS[opt_index].has_arg == required_argument) {
|
if (_LONG_OPTS[opt_index].has_arg == required_argument) {
|
||||||
short_opts[short_index] = ':';
|
short_opts[short_index] = ':';
|
||||||
++short_index;
|
++short_index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while ((ch = getopt_long(argc, argv, short_opts, _LONG_OPTS, NULL)) >= 0) {
|
while ((ch = getopt_long(argc, argv, short_opts, _LONG_OPTS, NULL)) >= 0) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
|||||||
Reference in New Issue
Block a user