patchAVR C Runtime Library - Patches: patch #6791, Minor fixes to stdio.h...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #6791: Minor fixes to stdio.h documentation

Submitter:  Tero Sinervo <tvjsin>
Submitted:  Mon 23 Mar 2009 05:37:53 PM UTC
   
 
Category:  None Priority:  9 - Immediate
Status:  Done Privacy:  Public
Assigned to:  joerg_wunsch Open/Closed:  Closed

Tue 08 Jun 2010 11:29:02 AM UTC, comment #1: 

Applied, thanks!

Joerg Wunsch <joerg_wunsch>
Group administrator
Mon 23 Mar 2009 05:37:53 PM UTC, original submission:  

Found two references to wrong streams in stdio.h documentation.



/**
   The function \c printf performs formatted output to stream
   \c stderr.  See \c vfprintf() for details.
*/
extern int printf(const char *__fmt, ...);



Shouldn't "stderr" be "stdout" here? I checked the C standard and actual avr libc operation and output did end only in stdout.




    \anchor stdio_note3 \par Note 3:
    This implementation has been chosen because the cost of maintaining
    an alias is considerably smaller than the cost of maintaining full
    copies of each stream.  Yet, providing an implementation that offers
    the complete set of standard streams was deemed to be useful.  Not
    only that writing \c printf() instead of <tt>fprintf(mystream, ...)</tt>
    saves typing work, but since avr-gcc needs to resort to pass all
    arguments of variadic functions on the stack (as opposed to passing
    them in registers for functions that take a fixed number of
    parameters), the ability to pass one parameter less by implying
    \c stdin will also save some execution time.



"stdin" should probably be "stdin or stdout" as printf() will imply stdout and scanf() stdin.


Diff attached. Hope its format is to your liking.

Tero Sinervo <tvjsin>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #17777:  stdio.diff added by tvjsin (699B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by arcanum (Updated the item)
  • -email is unavailable- added by tvjsin (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-06-08 joerg_wunsch StatusNone Done
        Assigned toNone joerg_wunsch
        Open/ClosedOpen Closed
    2009-03-23 arcanum Priority5 - Normal 9 - Immediate
    2009-03-23 tvjsin Attached File- Added stdio.diff, #17777

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code