diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-07-12 06:58:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-07-12 06:58:20 -0700 |
commit | 48fb45fc49128d64fc7b78e7359fc5753976632f (patch) | |
tree | 057c09e675c9b70db20ddc20698b54f982745065 | |
parent | c3fb490230d775b05606a125231ae64bc75a5391 (diff) | |
download | txr-48fb45fc49128d64fc7b78e7359fc5753976632f.tar.gz txr-48fb45fc49128d64fc7b78e7359fc5753976632f.tar.bz2 txr-48fb45fc49128d64fc7b78e7359fc5753976632f.zip |
Don't open text files using "t" mode on Cygwin.
Retracting the recent change to add the "t" mode when
opening non-binary streams on Cygwin, which arranges
for line ending conversion. This restores the Unix-like
treatment of text files on Cygwin, which is expected
of programs.
The Windows native version of TXR will do line ending
conversion thanks to the behavior of text streams in the
Cygnal fork of Cygwin.
* stream.c (format_mode): Only add the "t" option
on Cygwin if compatibility with 144 and 145 is selected.
* txr.1: Updated compatibility notes.
-rw-r--r-- | stream.c | 2 | ||||
-rw-r--r-- | txr.1 | 11 |
2 files changed, 8 insertions, 5 deletions
@@ -1317,7 +1317,7 @@ static val format_mode(const struct stdio_mode m) *ptr++ = 'b'; #ifdef __CYGWIN__ - if (!m.binary && (!opt_compat || opt_compat > 143)) + if (!m.binary && (opt_compat == 144 || opt_compat == 145)) *ptr++ = 't'; #endif @@ -43522,6 +43522,13 @@ of these version values, the described behaviors are provided if is given an argument which is equal or lower. For instance .code "-C 103" selects the behaviors described below for version 105, but not those for 102. +.IP 145 +In versions 144 and 145, \*(TX opened files in text mode on Cygwin, +enabling conversion between CR-LF line endings and abstract newline +characters. This behavior change was retracted, so that files on Cygwin are +opened without specifying text mode, causing the streams to be effectively +binary. The intended "Windows native" behavior of streams being text mode is +instead provided in the Windows version of \*(TX by the Cygnal library. .IP 143 Until version 143, the .code stdlib @@ -43537,10 +43544,6 @@ mark, if the symbol was previously defined as a special variable. Also, until version 143 many more places in the \*(TX pattern language used bind expressions rather than Lisp expressions. The compatibility option restores these behaviors. -Lastly, starting in version 144, on the Cygwin platform, streams -opened in text mode perform conversion between the CR-LF line -endings in the external representations and newline characters -in the stream. .IP 142 Until version 142, the \*(TX pattern language supported a prefix convention on data sources. Data sources beginning with the character |