Merge "Move public scanf functions away from implementation."

This commit is contained in:
Treehugger Robot 2017-11-13 17:17:10 +00:00 committed by Gerrit Code Review
commit 13e86af056
3 changed files with 10 additions and 18 deletions

View file

@ -940,11 +940,21 @@ int vfprintf(FILE* fp, const char* fmt, va_list ap) {
return __vfprintf(fp, fmt, ap);
}
int vfscanf(FILE* fp, const char* fmt, va_list ap) {
ScopedFileLock sfl(fp);
return __svfscanf(fp, fmt, ap);
}
int vfwprintf(FILE* fp, const wchar_t* fmt, va_list ap) {
ScopedFileLock sfl(fp);
return __vfwprintf(fp, fmt, ap);
}
int vfwscanf(FILE* fp, const wchar_t* fmt, va_list ap) {
ScopedFileLock sfl(fp);
return __vfwscanf(fp, fmt, ap);
}
int vprintf(const char* fmt, va_list ap) {
return vfprintf(stdout, fmt, ap);
}

View file

@ -838,12 +838,3 @@ static u_char* __sccl(char* tab, u_char* fmt) {
}
/* NOTREACHED */
}
int vfscanf(FILE* fp, const char* fmt0, __va_list ap) {
int r;
FLOCKFILE(fp);
r = __svfscanf(fp, fmt0, ap);
FUNLOCKFILE(fp);
return (r);
}

View file

@ -654,12 +654,3 @@ match_failure:
return (nassigned);
}
#pragma GCC diagnostic pop
int vfwscanf(FILE* __restrict fp, const wchar_t* __restrict fmt, __va_list ap) {
int r;
FLOCKFILE(fp);
r = __vfwscanf(fp, fmt, ap);
FUNLOCKFILE(fp);
return (r);
}