| 394 | |
| 395 | |
| 396 | void open_files() |
| 397 | { |
| 398 | create_file_names(); |
| 399 | |
| 400 | if (input_file == 0) |
| 401 | { |
| 402 | input_file = fopen(input_file_name, "r"); |
| 403 | if (input_file == 0) |
| 404 | open_error(input_file_name); |
| 405 | } |
| 406 | |
| 407 | action_file = fopen(action_file_name, "w"); |
| 408 | if (action_file == 0) |
| 409 | open_error(action_file_name); |
| 410 | |
| 411 | text_file = fopen(text_file_name, "w"); |
| 412 | if (text_file == 0) |
| 413 | open_error(text_file_name); |
| 414 | |
| 415 | if (vflag) |
| 416 | { |
| 417 | verbose_file = fopen(verbose_file_name, "w"); |
| 418 | if (verbose_file == 0) |
| 419 | open_error(verbose_file_name); |
| 420 | } |
| 421 | |
| 422 | if (dflag) |
| 423 | { |
| 424 | defines_file = fopen(defines_file_name, "w"); |
| 425 | if (defines_file == 0) |
| 426 | open_error(defines_file_name); |
| 427 | union_file = fopen(union_file_name, "w"); |
| 428 | if (union_file == 0) |
| 429 | open_error(union_file_name); |
| 430 | } |
| 431 | |
| 432 | output_file = fopen(output_file_name, "w"); |
| 433 | if (output_file == 0) |
| 434 | open_error(output_file_name); |
| 435 | |
| 436 | if (rflag) |
| 437 | { |
| 438 | code_file = fopen(code_file_name, "w"); |
| 439 | if (code_file == 0) |
| 440 | open_error(code_file_name); |
| 441 | } |
| 442 | else |
| 443 | code_file = output_file; |
| 444 | } |
| 445 | |
| 446 | |
| 447 | int main(int argc, char **argv) |
no test coverage detected