Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-src by
Diff: common/Stream.cpp
- Revision:
- 431:255afbe6270c
- Parent:
- 212:34d62c0b2af6
--- a/common/Stream.cpp Tue Dec 09 14:30:09 2014 +0000 +++ b/common/Stream.cpp Tue Dec 09 14:45:08 2014 +0000 @@ -24,7 +24,7 @@ char buf[12]; /* :0x12345678 + null byte */ std::sprintf(buf, ":%p", this); _file = std::fopen(buf, "w+"); - setbuf(_file, NULL); + mbed_set_unbuffered_stream(_file); } Stream::~Stream() { @@ -41,11 +41,11 @@ } int Stream::getc() { fflush(_file); - return std::fgetc(_file); + return mbed_getc(_file); } char* Stream::gets(char *s, int size) { fflush(_file); - return std::fgets(s,size,_file); + return mbed_gets(s,size,_file); } int Stream::close() {