| 55 | } |
| 56 | |
| 57 | const char *CommandLine::get_parameter(int i, const char *longopt, char shortopt) |
| 58 | { |
| 59 | const int opt_in = find_option(_argc, _argv, longopt, shortopt); |
| 60 | const int arg_in = opt_in + 1 + i; |
| 61 | |
| 62 | if (arg_in >= _argc) |
| 63 | return NULL; |
| 64 | |
| 65 | for (int j = opt_in; j < arg_in; ++j) { |
| 66 | if (is_end_options_marker(_argv[j + 1])) |
| 67 | return NULL; |
| 68 | } |
| 69 | |
| 70 | return _argv[arg_in]; |
| 71 | } |
| 72 | |
| 73 | bool CommandLine::has_option(const char *longopt, char shortopt) |
| 74 | { |