Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- parse.org.c 2011-10-14 07:56:20.000000000 +0700
- +++ parse.c 2011-10-14 08:20:07.000000000 +0700
- @@ -107,7 +107,12 @@
- if (!optarg)
- return parse_err(errlog, argv[0], o, len,
- "requires an argument");
- - problem = opt_table[i].cb_arg(optarg, opt_table[i].u.arg);
- + do {
- + problem = opt_table[i].cb_arg(optarg, opt_table[i].u.arg);
- + if (optarg && optarg == argv[arg+1])
- + consume_option(argc, argv, arg+1);
- + }
- + while(!problem && (optarg = argv[arg+1]) && *optarg != '-');
- }
- if (problem) {
- @@ -123,8 +128,6 @@
- /* All finished with that option? */
- if (*offset == 0) {
- consume_option(argc, argv, arg);
- - if (optarg && optarg == argv[arg])
- - consume_option(argc, argv, arg);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement