[Top][All Lists]

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

Re: [avr-gcc-list] Standard IO - function fwrite

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Standard IO - function fwrite
Date: Thu, 7 Jun 2007 07:04:02 +0200 (MET DST)

Marjan Fojkar <address@hidden> wrote:

> I expected that if one byte is successfully written then the
> function returns 1 if byte is not written then it returns 0.

This is how it works.

> In case of error it returns e.g. EOF.

No, it returns a `short write count' (less than requested), i.e.  it
could only be zero in your case since you only request one object.

This is exactly how the C standard requires it.

Of course, this all depends whether your backend put() function can
actually return an error indication.

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]