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

RE: [MiNT] Here documents and CRLF



> From: owner-mint@fishpool.com [mailto:owner-mint@fishpool.com]On Behalf
> Of Guido Flohr
> Sent: Wednesday, June 16, 1999 11:07 PM
> To: MiNT mailing list
> Subject: Re: [MiNT] Here documents and CRLF
>
>
> On Wed, Jun 16, 1999 at 05:56:59PM +0200, Julian Reschke wrote:
> > > From: owner-mint@fishpool.com
> [mailto:owner-mint@fishpool.com]On Behalf
> > > Of Guido Flohr
> > > Sent: Wednesday, June 16, 1999 2:28 AM
> > > To: MiNT mailing list
> > > Subject: Re: [MiNT] Here documents and CRLF
> > > ...
> > > I think the only part of UNIXMODE that gets evaluated by the
> MiNTLib is
> > > the "b" resp. the missing "b".  As far as I remember there is
> an internal
> > > function _binmode() (or was it a global variable) that you
> can manually
> > > set.  For FILE*-stream, you can also pass "rb" instead of "b"
> in the open
> > > type argument.
> >
> > Actually, you *have* to pass "b" if it is meant to be binary --
> everything
> > else is not proper ANSI-C.
>
> Yes, but on POSIX systems the "b" is ignored (because there is no
> difference between text and binary streams).  Does ANSI-C really demand

Could you please refer me to the relevant part of POSIX that defines that?

> that the "b" is recognized?  My understanding was that it is more portable
> to omit the "b" (and rather let M$-DOGgy systems fail)

This is certainly wrong. ANSI-C is a proper subset of POSIX, and ANSI-C says
you *must* use "b" to get a binary string.