📄 io.c
字号:
#include "error.h"#include "io.h"#include "lex.h"#include "statement.h"#include <stdlib.h>List *search_path;FILE *c_out, *h_out;const char *input_file_name = "<stdin>";void open_input_file(const char *file_name){ if (file_name != 0) { input_file_name = file_name; if ((yyin = fopen(file_name, "r")) == 0) { perror("Error opening input file (fatal)"); exit(1); } }}void open_output_files(void){ if ((h_out = fopen("cb.h", "w")) == 0 || (c_out = fopen("cb.c", "w")) == 0) { perror("Error opening output file (fatal)"); exit(1); } fprintf(h_out,"#include \"rts.h\"\n"); fprintf(c_out,"#include \"cb.h\"\n");#ifdef DEBUG printf("#include \"rts.h\"\n"); printf("#include \"cb.h\"\n");#endif}void close_files(void){ fclose(yyin); fclose(c_out); fclose(h_out);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -