⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 io.c

📁 一个编译器修改的例子
💻 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 + -