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