ltlcross: end CSV lines with \n, not \r\n

* src/bin/ltlcross.cc (print_stats_csv): Revert the recent
addition of \r, it is caussing too many issues.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2013-12-06 11:29:31 +01:00
parent 846e33b9e5
commit 6c21089599
2 changed files with 9 additions and 4 deletions

7
NEWS
View file

@ -37,7 +37,12 @@ New in spot 1.2a (not released)
http://spot.lip6.fr/userdoc/csv.html
for some discussion and examples of the last few features.
* Bug fixes:
- ltlcross' CSV output now stricly follows RFC 4180.
- ltlcross' CSV output has been changed to be more RFC 4180
compliant: it no longuer output useless cosmetic spaces, and
use double-quotes with proper escaping for strings. The only
RFC 4180 rule that it does not follow is that it will terminate
lines with \n instead of \r\n because the latter cause issues
with a couple of tools.
- ltlcross failed to report missing input or output escape sequences
on all but the first configured translator.

View file

@ -1535,18 +1535,18 @@ print_stats_csv(const char* filename)
*out << "\"formula\",\"tool\",";
statistics::fields(*out, !opt_omit, has_sr);
*out << "\r\n";
*out << '\n';
for (unsigned r = 0; r < rounds; ++r)
for (unsigned t = 0; t < ntrans; ++t)
if (!opt_omit || vstats[r][t].ok)
{
*out << "\"";
*out << '"';
spot::escape_rfc4180(*out, formulas[r]);
*out << "\",\"";
spot::escape_rfc4180(*out, translators[t].name);
*out << "\",";
vstats[r][t].to_csv(*out, !opt_omit, has_sr);
*out << "\r\n";
*out << '\n';
}
delete outfile;
}