Now by-default prepending a newline to stdout
This commit is contained in:
@@ -24,7 +24,7 @@ void DataOutputLayer::Init() {
|
||||
|
||||
// Open the file
|
||||
ofs.open(
|
||||
Configuration::inputFilename,
|
||||
Configuration::outputFilename,
|
||||
std::ios::out | std::ios::binary
|
||||
);
|
||||
|
||||
@@ -102,6 +102,16 @@ void DataOutputLayer::WriteBlock() {
|
||||
*out << " ";
|
||||
}
|
||||
|
||||
// If we are finished, and are outputting to stdout,
|
||||
// and the user didn't specifically opt out, print a newline
|
||||
if (
|
||||
(IsFinished()) &&
|
||||
(Configuration::outputTo == Configuration::OUTPUT_TO::STDOUT) &&
|
||||
(!CommandlineInterface::Get().HasParam("--no-newline"))
|
||||
) {
|
||||
*out << std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user