int main(int argc, char **argv) { int exit_status; MR_progname = argv[0]; parse_options(argc, argv); set_output_file(output_file_name); switch (output_task) { case TASK_OUTPUT_LIB_INIT: /* Output a .init file */ exit_status = output_lib_init_file(); break; case TASK_OUTPUT_INIT_PROG: /* Output a _init.erl file. */ exit_status = output_init_program(); break; default: fprintf(stderr, "%s: unknown task\n", MR_progname); exit(EXIT_FAILURE); } return exit_status; }
int main(int argc, char **argv) { int exit_status; MR_progname = argv[0]; parse_options(argc, argv); #ifdef CHECK_GET_LINE check_fp = fopen(".check_get_line", "w"); /* If the open fails, we won't write to the file */ #endif set_output_file(output_file_name); switch (output_task) { case TASK_OUTPUT_LIB_INIT: /* Output a .init file */ exit_status = output_lib_init_file(); break; case TASK_OUTPUT_STANDALONE_INIT: case TASK_OUTPUT_INIT_PROG: /* ** Output a _init.c file or a standalone initialisation ** interface. */ exit_status = output_init_program(); break; default: fprintf(stderr, "mkinit: unknown task\n"); exit(EXIT_FAILURE); } return exit_status; }