parent
7e584e6293
commit
6bed064f60
|
@ -764,11 +764,7 @@ _ecore_getopt_parse_find_nonargs_base(const Ecore_Getopt *parser, int argc, char
|
||||||
dst++;
|
dst++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (base != argc)
|
memmove(argv + dst, nonargs, used * sizeof(char *));
|
||||||
memmove(argv + dst, nonargs, used * sizeof(char *));
|
|
||||||
else
|
|
||||||
/* return 0 since argv[0] is technically the nonargs base */
|
|
||||||
base = 0;
|
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1606,7 +1602,7 @@ _ecore_getopt_find_help(const Ecore_Getopt *parser)
|
||||||
* retrieved with ecore_app_args_get().
|
* retrieved with ecore_app_args_get().
|
||||||
* @param argv command line parameters.
|
* @param argv command line parameters.
|
||||||
*
|
*
|
||||||
* @return index of first non-option parameter, 0 if only a progname is passed, or -1 on error.
|
* @return index of first non-option parameter or -1 on error.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv)
|
ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv)
|
||||||
|
@ -1646,20 +1642,9 @@ ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int a
|
||||||
nonargs = argc;
|
nonargs = argc;
|
||||||
|
|
||||||
i = 1;
|
i = 1;
|
||||||
if (nonargs)
|
while (i < nonargs)
|
||||||
{
|
if (!_ecore_getopt_parse_arg(parser, values, argc, argv, &i, &nonargs))
|
||||||
while (i < nonargs)
|
goto error;
|
||||||
if (!_ecore_getopt_parse_arg(parser, values, argc, argv, &i, &nonargs))
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int tmp = 0;
|
|
||||||
|
|
||||||
while (i < argc)
|
|
||||||
if (!_ecore_getopt_parse_arg(parser, values, argc, argv, &i, &tmp))
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nonargs;
|
return nonargs;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue