| 124 | |
| 125 | |
| 126 | static int parse_args(int argc, char **argv) |
| 127 | { |
| 128 | int ho_error; |
| 129 | |
| 130 | if ((ho_error=handle_options(&argc, &argv, my_long_options, get_one_option))) |
| 131 | local_exit(ho_error); |
| 132 | |
| 133 | /* |
| 134 | The following code is to make the command compatible with the old |
| 135 | version that required one to use the -n and -s options |
| 136 | */ |
| 137 | |
| 138 | if (argc == 2) |
| 139 | { |
| 140 | sym_fname= argv[0]; |
| 141 | dump_fname= argv[1]; |
| 142 | } |
| 143 | else if (argc == 1) |
| 144 | { |
| 145 | if (!sym_fname) |
| 146 | sym_fname = argv[0]; |
| 147 | else if (!dump_fname) |
| 148 | dump_fname = argv[0]; |
| 149 | else |
| 150 | { |
| 151 | usage(); |
| 152 | local_exit(1); |
| 153 | } |
| 154 | } |
| 155 | else if (argc != 0 || !sym_fname) |
| 156 | { |
| 157 | usage(); |
| 158 | local_exit(1); |
| 159 | } |
| 160 | return 0; |
| 161 | } |
| 162 | |
| 163 | |
| 164 | static void open_files() |
no test coverage detected