[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] stdio problem fixed
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] stdio problem fixed |
Date: |
Tue, 18 Mar 2003 10:38:45 +0100 (MET) |
"Sander Pool" <address@hidden> wrote:
> So in any case, when you return a non-null value printf still works
> but puts does not, it only prints the first character.
Hmm.
> Still, is this expected behavior?
[Perhaps the following should rather be discussed at the avr-libc-dev
mailing list.]
Probably not. I'm not sure, what should i do about an error return of
the put() function? Currently, vfprintf() still continues, but
doesn't increase the »characters sent« counter (that will form the
return value). [f]puts() obviously aborts upon seeing an error.
I'm willing to make both functions behave the same. I don't see a
clear way mandated by the standard whether any output attempt needs to
be aborted after an error or not. So i could either make [f]puts()
continue on error (but have to remember the error flag since it needs
to be returned), or make vfprintf() stop on error.
I tend towards the latter, it sounds more logical to me to stop on
error.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/