From 19cff41eb4261b20374058f16807a229af46f304 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 23 Aug 2014 15:03:55 +0200 Subject: Changed frontend-api from FILE to std::istream --- passes/cmds/write_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'passes/cmds/write_file.cc') diff --git a/passes/cmds/write_file.cc b/passes/cmds/write_file.cc index a7cd7b438..813e215ba 100644 --- a/passes/cmds/write_file.cc +++ b/passes/cmds/write_file.cc @@ -41,7 +41,7 @@ struct WriteFileFrontend : public Frontend { log(" EOT\n"); log("\n"); } - virtual void execute(FILE *&f, std::string filename, std::vector args, RTLIL::Design*) + virtual void execute(std::istream *&f, std::string filename, std::vector args, RTLIL::Design*) { bool append_mode = false; std::string output_filename; @@ -67,7 +67,7 @@ struct WriteFileFrontend : public Frontend { char buffer[64 * 1024]; size_t bytes; - while (0 < (bytes = fread(buffer, 1, sizeof(buffer), f))) + while (0 < (bytes = f->readsome(buffer, sizeof(buffer)))) fwrite(buffer, bytes, 1, of); fclose(of); -- cgit v1.2.3