LibC: Implement vscanf

libstdc++v3 checks whether vscanf is available and only then makes C99
stdio functions available in the std namespace.
This commit is contained in:
Gunnar Beutner 2021-05-08 20:35:25 +02:00 committed by Andreas Kling
parent e6747fefa7
commit 4c6a91d0c0
Notes: sideshowbarker 2024-07-18 18:27:12 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -1257,6 +1257,11 @@ int vfscanf(FILE* stream, const char* fmt, va_list ap)
return vsscanf(buffer, fmt, ap);
}
int vscanf(const char* fmt, va_list ap)
{
return vfscanf(stdin, fmt, ap);
}
void flockfile([[maybe_unused]] FILE* filehandle)
{
dbgln("FIXME: Implement flockfile()");

View file

@ -89,6 +89,7 @@ void perror(const char*);
int scanf(const char* fmt, ...) __attribute__((format(scanf, 1, 2)));
int sscanf(const char* str, const char* fmt, ...) __attribute__((format(scanf, 2, 3)));
int fscanf(FILE*, const char* fmt, ...) __attribute__((format(scanf, 2, 3)));
int vscanf(const char*, va_list) __attribute__((format(scanf, 1, 0)));
int vfscanf(FILE*, const char*, va_list) __attribute__((format(scanf, 2, 0)));
int vsscanf(const char*, const char*, va_list) __attribute__((format(scanf, 2, 0)));
int setvbuf(FILE*, char* buf, int mode, size_t);