| 241 | #endif |
| 242 | |
| 243 | static void exchange (char **argv) |
| 244 | { |
| 245 | char *temp, **first, **last; |
| 246 | |
| 247 | /* Reverse all the elements [first_nonopt, fe_optind) */ |
| 248 | first = &argv[first_nonopt]; |
| 249 | last = &argv[fe_optind-1]; |
| 250 | while (first < last) { |
| 251 | temp = *first; *first = *last; *last = temp; first++; last--; |
| 252 | } |
| 253 | /* Put back the options in order */ |
| 254 | first = &argv[first_nonopt]; |
| 255 | first_nonopt += (fe_optind - last_nonopt); |
| 256 | last = &argv[first_nonopt - 1]; |
| 257 | while (first < last) { |
| 258 | temp = *first; *first = *last; *last = temp; first++; last--; |
| 259 | } |
| 260 | |
| 261 | /* Put back the non options in order */ |
| 262 | first = &argv[first_nonopt]; |
| 263 | last_nonopt = fe_optind; |
| 264 | last = &argv[last_nonopt-1]; |
| 265 | while (first < last) { |
| 266 | temp = *first; *first = *last; *last = temp; first++; last--; |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | /* Scan elements of ARGV (whose length is ARGC) for option characters |
| 271 | given in OPTSTRING. |
no outgoing calls
no test coverage detected