juniskane commented on pull request #425: URL: https://github.com/apache/incubator-nuttx-apps/pull/425#issuecomment-708997593
fflush(stdin) is in comp.lang.c FAQ: http://c-faq.com/stdio/stdinflush.html Chapter and verse is ISO/IEC 9899:1999 section 7.19.5.2 The fflush function, clause 2: _"If stream points to an output stream or an update stream in which the most recent operation was not input, the fflush function causes any unwritten data for that stream to be delivered to the host environment to be written to the file; otherwise, the behavior is undefined."_ Some systems indeed define fflush(stdin) to flush out the unread data in the buffer, it is just not portable. We can keep doing that in NuttX, if we wish. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
