[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] stdio write problem in mintlib
On Sun, Dec 30, 2007 at 05:10:56PM +0100, Vincent Rivi?re wrote:
> Alan Hourihane a ?crit :
>> Yeah, it's o.k. turns out to be the shell.
>> Not to worry.
>
> Unfortunately, you're wrong. The problem is in the MiNTLib.
> The main idea is that the text mode (CR+LF) should only be used with
> regular files (if not disabled by UNIXMODE=b), and never used with pipes.
> The shell statement `command` does exactly what is expected : it runs the
> command to a pipe, then replaces spaces and LF by single spaces. The CR
> characters are treated as normal characters (not removed). It should not be
> a problem, because no end-of-line CR should be present in the pipe.
> I know very well the problem, because some time ago, I had a discussion
> about that with Cygwin people, where the situation is similar.
>
> The current MiNTLib always configures stdout in textmode, regardless if it
> is connected to a device (console), a file, or a pipe. It really should
> check for that, like Cygwin.
O.k. so we need to fix MiNTLib.
Alan.