Transform \r\n to \n on Windows.
@@ -986,6 +986,9 @@ static int get_line (c2m_ctx_t c2m_ctx) { /* translation phase 1 and 2 */
VARR_TRUNC (char, cs->ln, 0);
for (c = ln_get (c2m_ctx); c != EOF && c != '\n'; c = ln_get (c2m_ctx))
VARR_PUSH (char, cs->ln, c);
+#ifdef _WIN32
+ if (VARR_LENGTH (char, cs->ln) != 0 && VARR_LAST (char, cs->ln) == '\r') VARR_POP (char, cs->ln);
+#endif
eof_p = c == EOF;
if (eof_p) {
if (VARR_LENGTH (char, cs->ln) == 0) return FALSE;
