summaryrefslogtreecommitdiff
path: root/passes/cmds/write_file.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-23 15:03:55 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-23 15:03:55 +0200
commit19cff41eb4261b20374058f16807a229af46f304 (patch)
tree10cdd990dfbba21e7851127fca75de4c74cdd274 /passes/cmds/write_file.cc
parent5dce303a2a2c27d50e99856b6f33467798e13020 (diff)
Changed frontend-api from FILE to std::istream
Diffstat (limited to 'passes/cmds/write_file.cc')
-rw-r--r--passes/cmds/write_file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/passes/cmds/write_file.cc b/passes/cmds/write_file.cc
index a7cd7b43..813e215b 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<std::string> args, RTLIL::Design*)
+ virtual void execute(std::istream *&f, std::string filename, std::vector<std::string> 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);