AW: [En-Nut-Discussion] USART DEFAULT COOKEDMODE

Oliver Schulz olischulz at web.de
Fri May 28 17:11:48 CEST 2004


Hi all,

I think, if we implement some standard c functions, like _open and fopen,
they should behave like standard c functions.
If in standard c the default mode is cooked, we should use the same default.
And it is no big thing to open a device in binary mode.

Cheers,
Oliver.

> -----Ursprüngliche Nachricht-----
> Von: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de]Im Auftrag von Trevor
> O'Grady
> Gesendet: Freitag, 28. Mai 2004 13:11
> An: Ethernut User Chat (English)
> Betreff: RE: [En-Nut-Discussion] USART DEFAULT COOKEDMODE
>
>
> Hi Harald,
> I prefer to use \r\n as I'm in control of every byte (and
> know the number of
> bytes) but that's just a humble low level embedded
> programmers point of view
> :-). I do appreciate the need to be compatible with main
> stream programming
> and I'm happy to live with whatever is agreed.
>
> Part of my "fear" of cooking comes from once spending days on
> an issue where
> the problem was that puts appends a \n and fputs does not.
>
> Regards
> Trevor
> -----Original Message-----
> From: en-nut-discussion-bounces at egnite.de
> [mailto:en-nut-discussion-bounces at egnite.de]On Behalf Of Harald Kipp
> Sent: 28 May 2004 11:42
> To: Ethernut User Chat (English)
> Subject: RE: [En-Nut-Discussion] USART DEFAULT COOKEDMODE
>
>
> Trevor,
>
> At 11:34 28.05.2004 +0100, you wrote:
> >For what its worth I think RAW should be the default. I hate
> it when \r and
> >\n get translated.
>
> Guess you would hate it even more to write
>
>     printf("Hello world\r\n")
>
> instead of
>
>     printf("Hello world\n")
>
> don't you? Please take into account, that
> most high level TCP protocols require the
> carriage return. Today most servers accept
> single linefeeds as delimiters...but the first
> rule is:
>
> "Be conservative on output and tolerant on input"
>
> Harald
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list