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

Re: \n or \r\n?



On Wed, May 20, 1998 at 10:54:41PM +0100, Petr Stehlik wrote:
> As I pointed out: the same object code linked with PureC libs does
> different thing than when linked with MiNTlibs. That should be fixed in
> MiNTlibs, not by rewritting every possible source code.

Agreed.

PureC *does* CRLF->LF->CRLF conversion in the library unless the files
were opened with "b" mode ("rb", "wb+" etc.). That way, programs behave like
they should (they never get to see the CR when processing ASCII files), yet
you get correct CRLF-terminated files.

Some MSDOS libraries seem to do the same thing. And as the programmer should
know if he is dealing with ASCII or binary files, there is no problem with
that conversion, so IMHO the Mintlib should do it, too.

cu
Michael