Re: DOS Newline Character
From: Lawrence DčOliveiro (ldo_at_geek-central.gen.new_zealand)
Date: 12/05/04
- Next message: Lawrence DčOliveiro: "Re: DOS Newline Character"
- Previous message: Lawrence DčOliveiro: "Re: DOS Newline Character"
- In reply to: Michael C.: "Re: DOS Newline Character"
- Next in thread: Robert Newson: "Re: DOS Newline Character"
- Reply: Robert Newson: "Re: DOS Newline Character"
- Reply: Roger Leigh: "Re: DOS Newline Character"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 05 Dec 2004 17:54:03 +1300
In article <slrncr2p40.mr9.mcsuper5@jaguar.softshoppe.net>,
"Michael C." <mcsuper5@usol.com> wrote:
>["Followup-To:" header set to alt.os.linux.]
>On Sat, 04 Dec 2004 15:00:55 +1300,
>Lawrence D1Oliveiro <ldo@geek-central.gen.new_zealand> wrote:
>> In article <slrncq355i.br9.sybrenUSE@sybren.thirdtower.com>,
>> Sybren Stuvel <sybrenUSE@YOURthirdtower.com.imagination> wrote:
>>
>> >ANSI C only tells us about "the OS-specific newline". Nowhere does it
>> >specify that "the newline specific to another OS" should be translated
>> >to a '\n'.
>> >
>> >If I'm wrong, please proove it, instead of repeating the same thing
>> >over and over again. Show us which lines of the ANSI C standard.
>>
>> It doesn't say "newline convention specific to the _current_ OS", does
>> it? It only says "OS-specific newline". Therefore _all_ OS-specific
>> newlines should be translated to \n, not just those specific to the
>> _current_ OS.
>
>Please tell me that you don't teach logic. Using that logic, I
>could write an OS that ended lines with a \b and any
>implementation of the standard would have to handle that
>correctly as well.
In practical terms, only if it got into common use. Then yes, we would
certainly have to deal with it. Otherwise we would just ignore you. :)
>It's unfortunate that we have three standards for EOL, but
>there's no reason that ANSI C should have to concern itself with
>handling cross-platform files.
It's a cross-platform world nowadays, like it or not.
For those who were putting up POSIX as an excuse for Linux not to have
to deal with this, it's worth pointing out that the Windows NT family is
officially POSIX-compliant, whereas as far as I know, Linux has not
passed POSIX compliance, nor is it likely ever to. So the idea that
POSIX compliance means that you musn't cope with line ending conventions
other than LF-only is a load of hogwash.
>It isn't too difficult to work around...
Agreed, but at present _every_ application has to reinvent the solution.
It's not too difficult to solve the problem in stdio once and for all.
- Next message: Lawrence DčOliveiro: "Re: DOS Newline Character"
- Previous message: Lawrence DčOliveiro: "Re: DOS Newline Character"
- In reply to: Michael C.: "Re: DOS Newline Character"
- Next in thread: Robert Newson: "Re: DOS Newline Character"
- Reply: Robert Newson: "Re: DOS Newline Character"
- Reply: Roger Leigh: "Re: DOS Newline Character"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|