[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5920] Fix defect introduced 20140622T1608Z: files written
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5920] Fix defect introduced 20140622T1608Z: files written in text mode |
Date: |
Thu, 26 Jun 2014 15:08:14 +0000 |
Revision: 5920
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5920
Author: chicares
Date: 2014-06-26 15:08:12 +0000 (Thu, 26 Jun 2014)
Log Message:
-----------
Fix defect introduced 20140622T1608Z: files written in text mode
Modified Paths:
--------------
lmi/trunk/ihs_server7702.cpp
Modified: lmi/trunk/ihs_server7702.cpp
===================================================================
--- lmi/trunk/ihs_server7702.cpp 2014-06-23 19:25:23 UTC (rev 5919)
+++ lmi/trunk/ihs_server7702.cpp 2014-06-26 15:08:12 UTC (rev 5920)
@@ -40,6 +40,7 @@
#include "ihs_irc7702.hpp"
#include "ihs_server7702io.hpp"
#include "ihs_x_type.hpp"
+#include "miscellany.hpp" // ios_out_trunc_binary()
#include "path_utility.hpp" // initialize_filesystem()
#include <cstdlib>
@@ -97,7 +98,7 @@
// Run testdeck to validate this chain of conversions:
// Server7702Input --> gpt_input --> Server7702Input
std::string f = input.UniqueIdentifier + ".gpt";
- std::ofstream ofs_input(f.c_str());
+ std::ofstream ofs_input(f.c_str(), ios_out_trunc_binary());
gpt_input z = input.operator gpt_input();
gpt_xml_document x(z);
x.write(ofs_input);
@@ -106,7 +107,7 @@
contract.Process();
std::cout << contract.GetOutput();
f += ".txt";
- std::ofstream ofs_output(f.c_str());
+ std::ofstream ofs_output(f.c_str(), ios_out_trunc_binary());
ofs_output << contract.GetOutput();
while('\n' == std::cin.peek())
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5920] Fix defect introduced 20140622T1608Z: files written in text mode,
Greg Chicares <=