Advertisement
Guest User

CGMiner Glob Patch2

a guest
Oct 13th, 2011
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. --- parse.org.c 2011-10-14 07:56:20.000000000 +0700
  2. +++ parse.c 2011-10-14 08:20:07.000000000 +0700
  3. @@ -107,7 +107,12 @@
  4. if (!optarg)
  5. return parse_err(errlog, argv[0], o, len,
  6. "requires an argument");
  7. - problem = opt_table[i].cb_arg(optarg, opt_table[i].u.arg);
  8. + do {
  9. + problem = opt_table[i].cb_arg(optarg, opt_table[i].u.arg);
  10. + if (optarg && optarg == argv[arg+1])
  11. + consume_option(argc, argv, arg+1);
  12. + }
  13. + while(!problem && (optarg = argv[arg+1]) && *optarg != '-');
  14. }
  15.  
  16. if (problem) {
  17. @@ -123,8 +128,6 @@
  18. /* All finished with that option? */
  19. if (*offset == 0) {
  20. consume_option(argc, argv, arg);
  21. - if (optarg && optarg == argv[arg])
  22. - consume_option(argc, argv, arg);
  23. }
  24. return 1;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement