| 259 | ****************************************************************************/ |
| 260 | |
| 261 | int main(int argc, char **argv, char **envp) |
| 262 | { |
| 263 | #ifdef HOST_CYGWIN |
| 264 | char *convpath = NULL; |
| 265 | bool wintool = false; |
| 266 | #endif |
| 267 | enum pathtype_e pathtype = USER_PATH; |
| 268 | enum os_e os; |
| 269 | enum compiler_e compiler; |
| 270 | const char *progname = argv[0]; |
| 271 | const char *cmdarg; |
| 272 | char *ccname; |
| 273 | char * const *dirlist; |
| 274 | size_t respsize = 0; |
| 275 | char *response = NULL; |
| 276 | int ndirs; |
| 277 | int ret; |
| 278 | int ch; |
| 279 | int i; |
| 280 | |
| 281 | /* Handle command line options */ |
| 282 | |
| 283 | while ((ch = getopt(argc, argv, "wsh")) >= 0) |
| 284 | { |
| 285 | switch (ch) |
| 286 | { |
| 287 | case 'w': |
| 288 | #ifdef HOST_CYGWIN |
| 289 | wintool = true; |
| 290 | #endif |
| 291 | break; |
| 292 | |
| 293 | case 's': |
| 294 | pathtype = SYSTEM_PATH; |
| 295 | break; |
| 296 | |
| 297 | case 'h': |
| 298 | show_help(progname, EXIT_SUCCESS); |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | if (optind >= argc) |
| 303 | { |
| 304 | fprintf(stderr, "ERROR: Missing <compiler-path>\n"); |
| 305 | show_advice(progname, EXIT_FAILURE); |
| 306 | } |
| 307 | |
| 308 | ccname = basename(argv[optind]); |
| 309 | optind++; |
| 310 | |
| 311 | if (optind >= argc) |
| 312 | { |
| 313 | fprintf(stderr, "ERROR: At least one directory must be supplied\n"); |
| 314 | show_advice(progname, EXIT_FAILURE); |
| 315 | } |
| 316 | |
| 317 | dirlist = &argv[optind]; |
| 318 | ndirs = argc - optind; |
nothing calls this directly
no test coverage detected