#include "emul_io_file.h" FILE *fp; void emul_out_file(char c) { fputc(c, fp); } char emul_cin_file() { return fgetc(fp); } void emul_open_file(char *filename, char *mode) { if ((fp = fopen(filename, mode)) == NULL) { fprintf(stderr, "File open failed: %s\n", filename); } } void emul_close_file() { fclose(fp); }