summaryrefslogtreecommitdiff
path: root/passes/techmap
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-23 13:54:21 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-23 13:54:21 +0200
commit5dce303a2a2c27d50e99856b6f33467798e13020 (patch)
tree4f32f6e720ef5bb063e48c9d5ab6bd8356c6b3d6 /passes/techmap
parentfff12c719fc2d61e36e85f27080a4043078b0929 (diff)
Changed backend-api from FILE to std::ostream
Diffstat (limited to 'passes/techmap')
-rw-r--r--passes/techmap/extract.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/passes/techmap/extract.cc b/passes/techmap/extract.cc
index ebf4d77f..eaa0f9fa 100644
--- a/passes/techmap/extract.cc
+++ b/passes/techmap/extract.cc
@@ -747,11 +747,12 @@ struct ExtractPass : public Pass {
}
}
- FILE *f = fopen(mine_outfile.c_str(), "wt");
- if (f == NULL)
+ std::ofstream f;
+ f.open(mine_outfile.c_str(), std::ofstream::trunc);
+ if (f.fail())
log_error("Can't open output file `%s'.\n", mine_outfile.c_str());
- Backend::backend_call(map, f, mine_outfile, "ilang");
- fclose(f);
+ Backend::backend_call(map, &f, mine_outfile, "ilang");
+ f.close();
}
delete map;