[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] line-endings and MiNT-Lib?



I took a bit of time playing with 2 simultaneous versions of the mintlib.
One is 0.57.2 with my patch (does the CRLF stuff well), and the current
cvs.

It appears does the stuff in unix/write.c adding '\r' is never done, even
when my patch is applied. Instead, in the patched version, '\r' is added
in front of '\n' in stdio stuff after printf() and before calling the
final write() function, in unix/write.c.

More precisely, '\r' is added in __stdio_text_write() function from
stdio/sysd-stdio.c. And this function is setup for a file descriptor instead
of __stdio_write() in stdio/internals.c, in the function __stdio_check_funcs()
if the descriptor mode is not binary ((FILE *)fp->__mode.__binary).

So there is a bug somewhere which does not set textmode for stdin/stdout/stderr
on initialization.

-- 
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Spécialité: Développement, jeux