mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
We would rather use the ucrt for these, but sometimes dependencies on the mingw stdio functions creep in. 仕方ない. The cost is only paid if they are used; otherwise the symbols are garbage-collected at link time.
28 lines
523 B
C
Vendored
28 lines
523 B
C
Vendored
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
extern int __mingw_vfscanf (FILE *stream, const char *format, va_list argp);
|
|
|
|
int __mingw_scanf (const char *format, ...);
|
|
int __mingw_vscanf (const char *format, va_list argp);
|
|
|
|
int
|
|
__mingw_scanf (const char *format, ...)
|
|
{
|
|
va_list argp;
|
|
int r;
|
|
|
|
va_start (argp, format);
|
|
r = __mingw_vfscanf (stdin, format, argp);
|
|
va_end (argp);
|
|
|
|
return r;
|
|
}
|
|
|
|
int
|
|
__mingw_vscanf (const char *format, va_list argp)
|
|
{
|
|
return __mingw_vfscanf (stdin, format, argp);
|
|
}
|
|
|