URL: <http://savannah.nongnu.org/patch/?6791>
Summary: Minor fixes to stdio.h documentation Project: AVR C Runtime Library Submitted by: tvjsin Submitted on: Mon 23 Mar 2009 17:37:53 GMT Category: None Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: 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. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Mon 23 Mar 2009 17:37:53 GMT Name: stdio.diff Size: 699B By: tvjsin <http://savannah.nongnu.org/patch/download.php?file_id=17777> _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/patch/?6791> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev