[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: Thursday, June 17, 1999 10:16 PM
> To: MiNT mailing list
> Subject: Re: [MiNT] Here documents and CRLF
>
>
> On Thu, Jun 17, 1999 at 10:08:04PM +0200, Julian Reschke wrote:
> > > From: owner-mint@fishpool.com
> [mailto:owner-mint@fishpool.com]On Behalf
> > > Of Kristoffer Lawson
> > > > > No, ANSI does not demabr that it is recognized in any
> particular way
> > > > > (ie. it can be ignored), but as mentioned if you want
> your code to be
> > > > > portable to non-UNIX systems, you should stick the 'b' in
> when reading
> > > >
> > > > You *must*.
> > >
> > > Well I don't think the standard uses such terms as "must" in
> that context,
> > > but probably something like "undefined if not used" or "implementation
> > > defined" or whatever.
> >
> > OK, you may leave the "b" out, but it is then undefined behaviour.
> >
> > Sounds like you *must* specify a "b" if it's supposed to be
> ANSI compliant
> > :-)
>
> And I think that Kristoffer and Yours Truly want to say that you *must*
> specify a "b" if you want to be portable for non-POSIX systems.  And I
> think that MiNT *is* POSIX-compliant here because POSIX does not say how
> to achieve that "b" has no meaning.  Under Linux (BSD, SysV, ...) it
> really has no meaning and under MiNT it has no meaning if you leave the
> line that sets UNIXMODE in the original mint.cnf you got, untouched.
>
> Anyway, the "b" does not hurt.

Keep in mind that the standard line delimiter for TOS systems can't be
changed just by saying "we want it the UNIX way". There are lots of sources
of text information on a TOS system, and except for some ports of UNIX tools
these files always will have CR/LF (not to speak of text files that you
might have copied from -- gasp -- a DOS/Windows system).

Regards, jr