avr-gcc-list
[Top][All Lists]
Advanced

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

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


From: Eric Weddington
Subject: RE: [avr-gcc-list] Standard IO - function fwrite
Date: Sat, 02 Jun 2007 17:05:53 -0600

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Marjan Fojkar
> Sent: Saturday, June 02, 2007 9:34 AM
> To: address@hidden
> Subject: [avr-gcc-list] Standard IO - function fwrite
> 
> Hello!
> 
> Has anyone used function fwrite? I think it does not return 
> right value. 
> It should return number of objects successfully written but 
> in my case 
> it returns written character. I also write zeros through ostream so i 
> had to write this way:
> while(fwrite(&s_out_pool.m_buffer[s_out_pool.m_read_idx], 1, 
> 1, ostream) 
>  >= 0)
> {/* do something */}
> Right way would be:
> while(fwrite(&s_out_pool.m_buffer[s_out_pool.m_read_idx], 1, 
> 1, ostream) 
>  > 0)
> {/* do something */}

If you think you found a bug in avr-libc, then please fill out a Bug Tracker
on the avr-libc project on Savannah. That way the issue won't get lost in
emails.

Thanks
Eric Weddington





reply via email to

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