summaryrefslogtreecommitdiff
path: root/legacy/ecore
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2010-11-23 14:46:12 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2010-11-23 14:46:12 +0000
commit6bed064f60d9078515670257f1b6481d0a70f94f (patch)
tree5d515d97018ccab5f76b0a02db9cb4340cb79024 /legacy/ecore
parent7e584e62933db075f6a2b2c11d318fd47615a77f (diff)
revert this for crankypants
SVN revision: 54888
Diffstat (limited to 'legacy/ecore')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_getopt.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore_getopt.c b/legacy/ecore/src/lib/ecore/ecore_getopt.c
index 6dc2a27176..83840afe18 100644
--- a/legacy/ecore/src/lib/ecore/ecore_getopt.c
+++ b/legacy/ecore/src/lib/ecore/ecore_getopt.c
@@ -764,11 +764,7 @@ _ecore_getopt_parse_find_nonargs_base(const Ecore_Getopt *parser, int argc, char
764 dst++; 764 dst++;
765 } 765 }
766 766
767 if (base != argc) 767 memmove(argv + dst, nonargs, used * sizeof(char *));
768 memmove(argv + dst, nonargs, used * sizeof(char *));
769 else
770 /* return 0 since argv[0] is technically the nonargs base */
771 base = 0;
772 return base; 768 return base;
773} 769}
774 770
@@ -1606,7 +1602,7 @@ _ecore_getopt_find_help(const Ecore_Getopt *parser)
1606 * retrieved with ecore_app_args_get(). 1602 * retrieved with ecore_app_args_get().
1607 * @param argv command line parameters. 1603 * @param argv command line parameters.
1608 * 1604 *
1609 * @return index of first non-option parameter, 0 if only a progname is passed, or -1 on error. 1605 * @return index of first non-option parameter or -1 on error.
1610 */ 1606 */
1611int 1607int
1612ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv) 1608ecore_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
1646 nonargs = argc; 1642 nonargs = argc;
1647 1643
1648 i = 1; 1644 i = 1;
1649 if (nonargs) 1645 while (i < nonargs)
1650 { 1646 if (!_ecore_getopt_parse_arg(parser, values, argc, argv, &i, &nonargs))
1651 while (i < nonargs) 1647 goto error;
1652 if (!_ecore_getopt_parse_arg(parser, values, argc, argv, &i, &nonargs))
1653 goto error;
1654 }
1655 else
1656 {
1657 int tmp = 0;
1658
1659 while (i < argc)
1660 if (!_ecore_getopt_parse_arg(parser, values, argc, argv, &i, &tmp))
1661 goto error;
1662 }
1663 1648
1664 return nonargs; 1649 return nonargs;
1665 1650