mirror of https://github.com/ARMmbed/mbed-os.git
add variable arguemnt support to stream
parent
8c540341dd
commit
f13226663c
|
|
@ -37,6 +37,8 @@ public:
|
|||
char *gets(char *s, int size);
|
||||
int printf(const char* format, ...);
|
||||
int scanf(const char* format, ...);
|
||||
int vprintf(const char* format, va_list args);
|
||||
int vscanf(const char* format, va_list args);
|
||||
|
||||
operator std::FILE*() {return _file;}
|
||||
|
||||
|
|
|
|||
|
|
@ -108,4 +108,16 @@ int Stream::scanf(const char* format, ...) {
|
|||
return r;
|
||||
}
|
||||
|
||||
int Stream::vprintf(const char* format, va_list args) {
|
||||
fflush(_file);
|
||||
int r = vfprintf(_file, format, args);
|
||||
return r;
|
||||
}
|
||||
|
||||
int Stream::vscanf(const char* format, va_list args) {
|
||||
fflush(_file);
|
||||
int r = vfscanf(_file, format, args);
|
||||
return r;
|
||||
}
|
||||
|
||||
} // namespace mbed
|
||||
|
|
|
|||
Loading…
Reference in New Issue