msvcrt: Convert all the scanf functions to use MS ABI varargs.

This commit is contained in:
Alexandre Julliard 2009-01-02 21:44:40 +01:00
parent 07ca8f4f8f
commit f8de2ebb0b
2 changed files with 26 additions and 26 deletions

View file

@ -93,12 +93,12 @@ static int wchar2digit(MSVCRT_wchar_t c, int base) {
*/
int CDECL MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...)
{
va_list valist;
__ms_va_list valist;
int res;
va_start(valist, format);
__ms_va_start(valist, format);
res = MSVCRT_vfscanf(file, format, valist);
va_end(valist);
__ms_va_end(valist);
return res;
}
@ -107,12 +107,12 @@ int CDECL MSVCRT_fscanf(MSVCRT_FILE *file, const char *format, ...)
*/
int CDECL MSVCRT_scanf(const char *format, ...)
{
va_list valist;
__ms_va_list valist;
int res;
va_start(valist, format);
__ms_va_start(valist, format);
res = MSVCRT_vfscanf(MSVCRT_stdin, format, valist);
va_end(valist);
__ms_va_end(valist);
return res;
}
@ -121,12 +121,12 @@ int CDECL MSVCRT_scanf(const char *format, ...)
*/
int CDECL MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...)
{
va_list valist;
__ms_va_list valist;
int res;
va_start(valist, format);
__ms_va_start(valist, format);
res = MSVCRT_vfwscanf(file, format, valist);
va_end(valist);
__ms_va_end(valist);
return res;
}
@ -136,12 +136,12 @@ int CDECL MSVCRT_fwscanf(MSVCRT_FILE *file, const MSVCRT_wchar_t *format, ...)
*/
int CDECL MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...)
{
va_list valist;
__ms_va_list valist;
int res;
va_start(valist, format);
__ms_va_start(valist, format);
res = MSVCRT_vfwscanf(MSVCRT_stdin, format, valist);
va_end(valist);
__ms_va_end(valist);
return res;
}
@ -151,12 +151,12 @@ int CDECL MSVCRT_wscanf(const MSVCRT_wchar_t *format, ...)
*/
int CDECL MSVCRT_sscanf(const char *str, const char *format, ...)
{
va_list valist;
__ms_va_list valist;
int res;
va_start(valist, format);
__ms_va_start(valist, format);
res = MSVCRT_vsscanf(str, format, valist);
va_end(valist);
__ms_va_end(valist);
return res;
}
@ -166,12 +166,12 @@ int CDECL MSVCRT_sscanf(const char *str, const char *format, ...)
*/
int CDECL MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format, ...)
{
va_list valist;
__ms_va_list valist;
int res;
va_start(valist, format);
__ms_va_start(valist, format);
res = MSVCRT_vswscanf(str, format, valist);
va_end(valist);
__ms_va_end(valist);
return res;
}
@ -181,11 +181,11 @@ int CDECL MSVCRT_swscanf(const MSVCRT_wchar_t *str, const MSVCRT_wchar_t *format
*/
int CDECL _cscanf(const char *format, ...)
{
va_list valist;
__ms_va_list valist;
int res;
va_start(valist, format);
__ms_va_start(valist, format);
res = MSVCRT_vcscanf(format, valist);
va_end(valist);
__ms_va_end(valist);
return res;
}

View file

@ -48,7 +48,7 @@
#ifdef CONSOLE
#define _GETC_(file) (consumed++, _getch())
#define _UNGETC_(nch, file) do { _ungetch(nch); consumed--; } while(0)
#define _FUNCTION_ static int MSVCRT_vcscanf(const char *format, va_list ap)
#define _FUNCTION_ static int MSVCRT_vcscanf(const char *format, __ms_va_list ap)
#else
#ifdef STRING
#undef _EOF_
@ -56,19 +56,19 @@
#define _GETC_(file) (consumed++, *file++)
#define _UNGETC_(nch, file) do { file--; consumed--; } while(0)
#ifdef WIDE_SCANF
#define _FUNCTION_ static int MSVCRT_vswscanf(const MSVCRT_wchar_t *file, const MSVCRT_wchar_t *format, va_list ap)
#define _FUNCTION_ static int MSVCRT_vswscanf(const MSVCRT_wchar_t *file, const MSVCRT_wchar_t *format, __ms_va_list ap)
#else /* WIDE_SCANF */
#define _FUNCTION_ static int MSVCRT_vsscanf(const char *file, const char *format, va_list ap)
#define _FUNCTION_ static int MSVCRT_vsscanf(const char *file, const char *format, __ms_va_list ap)
#endif /* WIDE_SCANF */
#else /* STRING */
#ifdef WIDE_SCANF
#define _GETC_(file) (consumed++, MSVCRT_fgetwc(file))
#define _UNGETC_(nch, file) do { MSVCRT_ungetwc(nch, file); consumed--; } while(0)
#define _FUNCTION_ static int MSVCRT_vfwscanf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, va_list ap)
#define _FUNCTION_ static int MSVCRT_vfwscanf(MSVCRT_FILE* file, const MSVCRT_wchar_t *format, __ms_va_list ap)
#else /* WIDE_SCANF */
#define _GETC_(file) (consumed++, MSVCRT_fgetc(file))
#define _UNGETC_(nch, file) do { MSVCRT_ungetc(nch, file); consumed--; } while(0)
#define _FUNCTION_ static int MSVCRT_vfscanf(MSVCRT_FILE* file, const char *format, va_list ap)
#define _FUNCTION_ static int MSVCRT_vfscanf(MSVCRT_FILE* file, const char *format, __ms_va_list ap)
#endif /* WIDE_SCANF */
#endif /* STRING */
#endif /* CONSOLE */