Flush buffer after newline in putc, fputc, and puts (but not fputs)

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3607 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2011-05-14 17:37:47 +00:00
parent 6e4aa998e8
commit a854f248b4
5 changed files with 64 additions and 18 deletions
+2
View File
@@ -1136,6 +1136,8 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, const char *src, va_list ap)
#ifdef CONFIG_STDIO_LINEBUFFER
if (*src == '\n')
{
/* Should return an error on a failure to flush */
(void)obj->flush(obj);
}
#endif