From 139ed04b665ad96a16abe3fc498ea2a61a2afd9e Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 6 Dec 2020 09:00:22 +1000 Subject: [PATCH] analyse: stub out an output file --- tools/analyse.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/analyse.cpp b/tools/analyse.cpp index 8a0d419..75d9133 100644 --- a/tools/analyse.cpp +++ b/tools/analyse.cpp @@ -17,6 +17,7 @@ #include #include #include +#include /////////////////////////////////////////////////////////////////////////////// @@ -91,6 +92,8 @@ int main (int argc, char const **argv) std::cerr << p << '\n'; + std::ofstream output (argv[ARGS_OUTPUT], std::ios::out | std::ios::trunc); + output.exceptions (std::ios::badbit | std::ios::eofbit | std::ios::failbit); cruft::mapped_file data (argv[ARGS_INPUT]); std::cout << "size: " << data.size () << '\n';