mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
Implemented line-oriented buffering for std output
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3606 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1127,7 +1127,20 @@ int lib_vsprintf(FAR struct lib_outstream_s *obj, const char *src, va_list ap)
|
||||
|
||||
if (*src != '%')
|
||||
{
|
||||
/* Output the character */
|
||||
|
||||
obj->put(obj, *src);
|
||||
|
||||
/* Flush the buffer if a newline is encountered */
|
||||
|
||||
#ifdef CONFIG_STDIO_LINEBUFFER
|
||||
if (*src == '\n')
|
||||
{
|
||||
(void)obj->flush(obj);
|
||||
}
|
||||
#endif
|
||||
/* Process the next character in the format */
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user