12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574 |
- /**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
- */
- #ifndef _INC_STDIO
- #define _INC_STDIO
- #include <corecrt_stdio_config.h>
- #pragma pack(push,_CRT_PACKING)
- #pragma push_macro("snprintf")
- #undef snprintf
- #pragma push_macro("vsnprintf")
- #undef vsnprintf
- #pragma push_macro("snwprintf")
- #undef snwprintf
- #pragma push_macro("vsnwprintf")
- #undef vsnwprintf
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define BUFSIZ 512
- #define _NFILE _NSTREAM_
- #define _NSTREAM_ 512
- #define _IOB_ENTRIES 20
- #define EOF (-1)
- #ifndef _FILE_DEFINED
- struct _iobuf {
- #ifdef _UCRT
- void *_Placeholder;
- #else
- char *_ptr;
- int _cnt;
- char *_base;
- int _flag;
- int _file;
- int _charbuf;
- int _bufsiz;
- char *_tmpfname;
- #endif
- };
- typedef struct _iobuf FILE;
- #define _FILE_DEFINED
- #endif
- #ifdef _POSIX_
- #define _P_tmpdir "/"
- #define _wP_tmpdir L"/"
- #else
- #define _P_tmpdir "\\"
- #define _wP_tmpdir L"\\"
- #endif
- #define L_tmpnam (sizeof(_P_tmpdir) + 12)
- #ifdef _POSIX_
- #define L_ctermid 9
- #define L_cuserid 32
- #endif
- #define SEEK_CUR 1
- #define SEEK_END 2
- #define SEEK_SET 0
- #define STDIN_FILENO 0
- #define STDOUT_FILENO 1
- #define STDERR_FILENO 2
- #define FILENAME_MAX 260
- #define FOPEN_MAX 20
- #define _SYS_OPEN 20
- #define TMP_MAX 32767
- #ifndef NULL
- #ifdef __cplusplus
- #ifndef _WIN64
- #define NULL 0
- #else
- #define NULL 0LL
- #endif /* W64 */
- #else
- #define NULL ((void *)0)
- #endif
- #endif
- #include <_mingw_off_t.h>
- _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index);
- #ifndef _STDIO_DEFINED
- #ifdef _WIN64
- _CRTIMP FILE *__cdecl __iob_func(void);
- #define _iob __iob_func()
- #else
- #ifdef _MSVCRT_
- extern FILE _iob[]; /* A pointer to an array of FILE */
- #define __iob_func() (_iob)
- #else
- extern FILE (* __MINGW_IMP_SYMBOL(_iob))[]; /* A pointer to an array of FILE */
- #define __iob_func() (* __MINGW_IMP_SYMBOL(_iob))
- #define _iob __iob_func()
- #endif
- #endif
- #endif
- #ifndef _FPOS_T_DEFINED
- #define _FPOS_T_DEFINED
- #undef _FPOSOFF
- #if (!defined(NO_OLDNAMES) || defined(__GNUC__))
- __MINGW_EXTENSION typedef __int64 fpos_t;
- #define _FPOSOFF(fp) ((long)(fp))
- #else
- __MINGW_EXTENSION typedef long long fpos_t;
- #define _FPOSOFF(fp) ((long)(fp))
- #endif
- #endif
- #ifndef _STDSTREAM_DEFINED
- #define _STDSTREAM_DEFINED
- #define stdin (__acrt_iob_func(0))
- #define stdout (__acrt_iob_func(1))
- #define stderr (__acrt_iob_func(2))
- #endif
- #define _IOFBF 0x0000
- #define _IOLBF 0x0040
- #define _IONBF 0x0004
- #ifndef _UCRT
- #define _IOREAD 0x0001
- #define _IOWRT 0x0002
- #define _IOMYBUF 0x0008
- #define _IOEOF 0x0010
- #define _IOERR 0x0020
- #define _IOSTRG 0x0040
- #define _IORW 0x0080
- #ifdef _POSIX_
- #define _IOAPPEND 0x0200
- #endif
- #endif
- #define _TWO_DIGIT_EXPONENT 0x1
- #if __MINGW_FORTIFY_LEVEL > 0
- __mingw_bos_declare;
- #endif
- #ifndef _STDIO_DEFINED
- extern
- __attribute__((__format__ (gnu_scanf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...);
- extern
- __attribute__((__format__ (gnu_scanf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp);
- extern
- __attribute__((__format__ (gnu_scanf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __mingw_scanf(const char * __restrict__ _Format,...);
- extern
- __attribute__((__format__ (gnu_scanf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __mingw_vscanf(const char * __restrict__ Format, va_list argp);
- extern
- __attribute__((__format__ (gnu_scanf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...);
- extern
- __attribute__((__format__ (gnu_scanf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_vfscanf (FILE * __restrict__ fp, const char * __restrict__ Format,va_list argp);
- extern
- __attribute__((__format__ (gnu_printf, 3, 0))) __MINGW_ATTRIB_NONNULL(3)
- int __cdecl __mingw_vsnprintf(char * __restrict__ _DstBuf,size_t _MaxCount,const char * __restrict__ _Format,
- va_list _ArgList);
- extern
- __attribute__((__format__ (gnu_printf, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- int __cdecl __mingw_snprintf(char * __restrict__ s, size_t n, const char * __restrict__ format, ...);
- extern
- __attribute__((__format__ (gnu_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __mingw_printf(const char * __restrict__ , ... ) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (gnu_printf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __mingw_vprintf (const char * __restrict__ , va_list) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_sprintf (char * __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (gnu_printf, 2, 3))) __attribute__((nonnull (1,2)))
- int __cdecl __mingw_asprintf(char ** __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (gnu_printf, 2, 0))) __attribute__((nonnull (1,2)))
- int __cdecl __mingw_vasprintf(char ** __restrict__ , const char * __restrict__ , va_list) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (ms_scanf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...);
- extern
- __attribute__((__format__ (ms_scanf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __ms_scanf(const char * __restrict__ _Format,...);
- extern
- __attribute__((__format__ (ms_scanf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...);
- extern
- __attribute__((__format__ (ms_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __ms_printf(const char * __restrict__ , ... ) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (ms_printf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __ms_vprintf (const char * __restrict__ , va_list) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (ms_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_fprintf (FILE * __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (ms_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_vfprintf (FILE * __restrict__ , const char * __restrict__ , va_list) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (ms_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_sprintf (char * __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW;
- extern
- __attribute__((__format__ (ms_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_vsprintf (char * __restrict__ , const char * __restrict__ , va_list) __MINGW_NOTHROW;
- #ifdef _UCRT
- int __cdecl __stdio_common_vsprintf(unsigned __int64 options, char *str, size_t len, const char *format, _locale_t locale, va_list valist);
- int __cdecl __stdio_common_vfprintf(unsigned __int64 options, FILE *file, const char *format, _locale_t locale, va_list valist);
- int __cdecl __stdio_common_vsscanf(unsigned __int64 options, const char *input, size_t length, const char *format, _locale_t locale, va_list valist);
- int __cdecl __stdio_common_vfscanf(unsigned __int64 options, FILE *file, const char *format, _locale_t locale, va_list valist);
- #endif
- #undef __MINGW_PRINTF_FORMAT
- #undef __MINGW_SCANF_FORMAT
- #if defined(__clang__)
- #define __MINGW_PRINTF_FORMAT printf
- #define __MINGW_SCANF_FORMAT scanf
- #elif defined(_UCRT) || __USE_MINGW_ANSI_STDIO
- #define __MINGW_PRINTF_FORMAT gnu_printf
- #define __MINGW_SCANF_FORMAT gnu_scanf
- #else
- #define __MINGW_PRINTF_FORMAT ms_printf
- #define __MINGW_SCANF_FORMAT ms_scanf
- #endif
- #if __USE_MINGW_ANSI_STDIO && !defined(_CRTBLD)
- /*
- * User has expressed a preference for C99 conformance...
- */
- #ifdef _GNU_SOURCE
- __mingw_ovr
- __attribute__ ((__format__ (gnu_printf, 2, 3))) __attribute__((nonnull (1,2)))
- int asprintf(char **__ret, const char *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vasprintf( __ret, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- __mingw_ovr
- __attribute__ ((__format__ (gnu_printf, 2, 0))) __attribute__((nonnull (1,2)))
- int vasprintf(char **__ret, const char *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vasprintf( __ret, __format, __local_argv );
- }
- #endif /* _GNU_SOURCE */
- /* There seems to be a bug about builtins and static overrides of them
- in g++. So we need to do here some trickery. */
- #ifdef __cplusplus
- extern "C++" {
- #endif
- __mingw_ovr
- __attribute__((__format__ (gnu_scanf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int sscanf(const char *__source, const char *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vsscanf( __source, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- __mingw_ovr
- __attribute__((__format__ (gnu_scanf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int scanf(const char *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vfscanf( stdin, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- __mingw_ovr
- __attribute__((__format__ (gnu_scanf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int fscanf(FILE *__stream, const char *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vfscanf( __stream, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
- #ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wshadow"
- #endif
- __mingw_ovr
- __attribute__((__format__ (gnu_scanf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int vsscanf (const char *__source, const char *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vsscanf( __source, __format, __local_argv );
- }
- __mingw_ovr
- __attribute__((__format__ (gnu_scanf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int vscanf(const char *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vfscanf( stdin, __format, __local_argv );
- }
- __mingw_ovr
- __attribute__((__format__ (gnu_scanf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int vfscanf (FILE *__stream, const char *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vfscanf( __stream, __format, __local_argv );
- }
- #ifdef __GNUC__
- #pragma GCC diagnostic pop
- #endif
- #endif /* __NO_ISOCEXT */
- __mingw_ovr
- __attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int fprintf (FILE *__stream, const char *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vfprintf( __stream, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- __mingw_ovr
- __attribute__((__format__ (gnu_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int printf (const char *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vfprintf( stdout, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- #if __MINGW_FORTIFY_VA_ARG
- __mingw_bos_ovr
- __attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int sprintf (char *__stream, const char *__format, ...)
- {
- if (__mingw_bos_known(__stream)) {
- int __retval = __mingw_snprintf( __stream, __mingw_bos(__stream, 1), __format, __builtin_va_arg_pack() );
- if (__retval >= 0)
- __mingw_bos_ptr_chk(__stream, (size_t)__retval + 1, 1);
- return __retval;
- }
- return __mingw_sprintf( __stream, __format, __builtin_va_arg_pack() );
- }
- #else /* !__MINGW_FORTIFY_VA_ARG */
- __mingw_ovr
- __attribute__((__format__ (gnu_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int sprintf (char *__stream, const char *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vsprintf( __stream, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- #endif /* __MINGW_FORTIFY_VA_ARG */
- __mingw_ovr
- __attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int vfprintf (FILE *__stream, const char *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vfprintf( __stream, __format, __local_argv );
- }
- __mingw_ovr
- __attribute__((__format__ (gnu_printf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int vprintf (const char *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vfprintf( stdout, __format, __local_argv );
- }
- __mingw_bos_ovr
- __attribute__((__format__ (gnu_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int vsprintf (char *__stream, const char *__format, __builtin_va_list __local_argv)
- {
- #if __MINGW_FORTIFY_LEVEL > 0
- if (__mingw_bos_known(__stream)) {
- int __retval = __mingw_vsnprintf( __stream, __mingw_bos(__stream, 1), __format, __local_argv );
- if (__retval >= 0)
- __mingw_bos_ptr_chk(__stream, (size_t)__retval + 1, 1);
- return __retval;
- }
- #endif
- return __mingw_vsprintf( __stream, __format, __local_argv );
- }
- /* #ifndef __NO_ISOCEXT */ /* externs in libmingwex.a */
- #if __MINGW_FORTIFY_VA_ARG
- __mingw_bos_ovr
- __attribute__((__format__ (gnu_printf, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- int snprintf (char *__stream, size_t __n, const char *__format, ...)
- {
- __mingw_bos_ptr_chk_warn(__stream, __n, 1);
- return __mingw_snprintf( __stream, __n, __format, __builtin_va_arg_pack() );
- }
- #else /* !__MINGW_FORTIFY_VA_ARG */
- __mingw_ovr
- __attribute__((__format__ (gnu_printf, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- int snprintf (char *__stream, size_t __n, const char *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vsnprintf( __stream, __n, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- #endif /* __MINGW_FORTIFY_VA_ARG */
- __mingw_bos_ovr
- __attribute__((__format__ (gnu_printf, 3, 0))) __MINGW_ATTRIB_NONNULL(3)
- int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_list __local_argv)
- {
- #if __MINGW_FORTIFY_LEVEL > 0
- __mingw_bos_ptr_chk_warn(__stream, __n, 1);
- #endif
- return __mingw_vsnprintf( __stream, __n, __format, __local_argv );
- }
- /* Override __builtin_printf-routines ... Kludge for libstdc++ ...*/
- #define __builtin_vsnprintf __mingw_vsnprintf
- #define __builtin_vsprintf __mingw_vsprintf
- /* #endif */ /* __NO_ISOCEXT */
- #ifdef __cplusplus
- }
- #endif
- #else /* !__USE_MINGW_ANSI_STDIO */
- #undef __builtin_vsnprintf
- #undef __builtin_vsprintf
- /*
- * Default configuration: simply direct all calls to MSVCRT...
- */
- #ifdef _UCRT
- #ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wshadow"
- #endif
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl fprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,...);
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl printf(const char * __restrict__ _Format,...);
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl sprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl vfprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,va_list _ArgList);
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl vprintf(const char * __restrict__ _Format,va_list _ArgList);
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl vsprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- __attribute__((__format__ (__MINGW_SCANF_FORMAT, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...);
- __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- __attribute__((__format__ (__MINGW_SCANF_FORMAT, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl scanf(const char * __restrict__ _Format,...);
- __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- __attribute__((__format__ (__MINGW_SCANF_FORMAT, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...);
- #ifdef _GNU_SOURCE
- __attribute__ ((__format__ (__MINGW_PRINTF_FORMAT, 2, 0)))
- int __cdecl vasprintf(char ** __restrict__ _Ret,const char * __restrict__ _Format,va_list _Args);
- __attribute__ ((__format__ (__MINGW_PRINTF_FORMAT, 2, 3)))
- int __cdecl asprintf(char ** __restrict__ _Ret,const char * __restrict__ _Format,...);
- #endif /*_GNU_SOURCE*/
- __attribute__((__format__ (__MINGW_SCANF_FORMAT, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int vfscanf (FILE *__stream, const char *__format, __builtin_va_list __local_argv);
- __attribute__((__format__ (__MINGW_SCANF_FORMAT, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int vsscanf (const char * __restrict__ __source, const char * __restrict__ __format, __builtin_va_list __local_argv);
- __attribute__((__format__ (__MINGW_SCANF_FORMAT, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int vscanf(const char *__format, __builtin_va_list __local_argv);
- #ifdef __GNUC__
- #pragma GCC diagnostic pop
- #endif
- #else
- __attribute__((__format__ (ms_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl fprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,...);
- __attribute__((__format__ (ms_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl printf(const char * __restrict__ _Format,...);
- __attribute__((__format__ (ms_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl sprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- __attribute__((__format__ (ms_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl vfprintf(FILE * __restrict__ _File,const char * __restrict__ _Format,va_list _ArgList);
- __attribute__((__format__ (ms_printf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl vprintf(const char * __restrict__ _Format,va_list _ArgList);
- __attribute__((__format__ (ms_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl vsprintf(char * __restrict__ _Dest,const char * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- __attribute__((__format__ (ms_scanf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl fscanf(FILE * __restrict__ _File,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- __attribute__((__format__ (ms_scanf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl scanf(const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- __attribute__((__format__ (ms_scanf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl sscanf(const char * __restrict__ _Src,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- #ifdef _GNU_SOURCE
- int __cdecl vasprintf(char ** __restrict__ __ret,const char * __restrict__ __format,va_list __ap) __attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 0)));
- int __cdecl asprintf(char ** __restrict__ __ret,const char * __restrict__ __format,...) __attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3)));
- #endif /*_GNU_SOURCE*/
- #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
- #ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wshadow"
- #endif
- __attribute__((__format__ (ms_scanf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __ms_vscanf(const char * __restrict__ Format, va_list argp);
- __attribute__((__format__ (ms_scanf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_vfscanf (FILE * __restrict__ fp, const char * __restrict__ Format,va_list argp);
- __attribute__((__format__ (ms_scanf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp);
- __mingw_ovr
- __attribute__((__format__ (ms_scanf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int vfscanf (FILE *__stream, const char *__format, __builtin_va_list __local_argv)
- {
- return __ms_vfscanf (__stream, __format, __local_argv);
- }
- __mingw_ovr
- __attribute__((__format__ (ms_scanf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int vsscanf (const char * __restrict__ __source, const char * __restrict__ __format, __builtin_va_list __local_argv)
- {
- return __ms_vsscanf( __source, __format, __local_argv );
- }
- __mingw_ovr
- __attribute__((__format__ (ms_scanf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- int vscanf(const char *__format, __builtin_va_list __local_argv)
- {
- return __ms_vscanf (__format, __local_argv);
- }
- #ifdef __GNUC__
- #pragma GCC diagnostic pop
- #endif
- #endif /* __NO_ISOCEXT */
- #endif /* _UCRT */
- #endif /* __USE_MINGW_ANSI_STDIO */
- _CRTIMP int __cdecl _filbuf(FILE *_File);
- _CRTIMP int __cdecl _flsbuf(int _Ch,FILE *_File);
- #ifdef _POSIX_
- _CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode);
- #else
- _CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode,int _ShFlag);
- #endif
- void __cdecl clearerr(FILE *_File);
- int __cdecl fclose(FILE *_File);
- _CRTIMP int __cdecl _fcloseall(void);
- #ifdef _POSIX_
- FILE *__cdecl fdopen(int _FileHandle,const char *_Mode) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- #else
- _CRTIMP FILE *__cdecl _fdopen(int _FileHandle,const char *_Mode);
- #endif
- int __cdecl feof(FILE *_File);
- int __cdecl ferror(FILE *_File);
- int __cdecl fflush(FILE *_File);
- int __cdecl fgetc(FILE *_File);
- _CRTIMP int __cdecl _fgetchar(void);
- int __cdecl fgetpos(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); /* 64bit only, no 32bit version */
- int __cdecl fgetpos64(FILE * __restrict__ _File ,fpos_t * __restrict__ _Pos); /* fgetpos already 64bit */
- char *__cdecl fgets(char * __restrict__ _Buf,int _MaxCount,FILE * __restrict__ _File);
- _CRTIMP int __cdecl _fileno(FILE *_File);
- #ifdef _POSIX_
- int __cdecl fileno(FILE *_File) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- #endif
- _CRTIMP char *__cdecl _tempnam(const char *_DirName,const char *_FilePrefix);
- _CRTIMP int __cdecl _flushall(void);
- FILE *__cdecl fopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- FILE *fopen64(const char * __restrict__ filename,const char * __restrict__ mode);
- int __cdecl fputc(int _Ch,FILE *_File);
- _CRTIMP int __cdecl _fputchar(int _Ch);
- int __cdecl fputs(const char * __restrict__ _Str,FILE * __restrict__ _File);
- size_t __cdecl fread(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File);
- FILE *__cdecl freopen(const char * __restrict__ _Filename,const char * __restrict__ _Mode,FILE * __restrict__ _File) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos);
- int __cdecl fsetpos64(FILE *_File,const fpos_t *_Pos); /* fsetpos already 64bit */
- int __cdecl fseek(FILE *_File,long _Offset,int _Origin);
- long __cdecl ftell(FILE *_File);
- /* Shouldn't be any fseeko32 in glibc, 32bit to 64bit casting should be fine */
- /* int fseeko32(FILE* stream, _off_t offset, int whence);*/ /* fseeko32 redirects to fseeko64 */
- _CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
- _CRTIMP __int64 __cdecl _ftelli64(FILE *_File);
- #ifdef _UCRT
- __mingw_static_ovr int fseeko(FILE *_File, _off_t _Offset, int _Origin) {
- return fseek(_File, _Offset, _Origin);
- }
- __mingw_static_ovr int fseeko64(FILE *_File, _off64_t _Offset, int _Origin) {
- return _fseeki64(_File, _Offset, _Origin);
- }
- __mingw_static_ovr _off_t ftello(FILE *_File) {
- return ftell(_File);
- }
- __mingw_static_ovr _off64_t ftello64(FILE *_File) {
- return _ftelli64(_File);
- }
- #else
- int fseeko64(FILE* stream, _off64_t offset, int whence);
- int fseeko(FILE* stream, _off_t offset, int whence);
- /* Returns truncated 64bit off_t */
- _off_t ftello(FILE * stream);
- _off64_t ftello64(FILE * stream);
- #endif
- #ifndef _FILE_OFFSET_BITS_SET_FSEEKO
- #define _FILE_OFFSET_BITS_SET_FSEEKO
- #if (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64))
- #define fseeko fseeko64
- #endif /* (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)) */
- #endif /* _FILE_OFFSET_BITS_SET_FSEEKO */
- #ifndef _FILE_OFFSET_BITS_SET_FTELLO
- #define _FILE_OFFSET_BITS_SET_FTELLO
- #if (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64))
- #define ftello ftello64
- #endif /* (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)) */
- #endif /* _FILE_OFFSET_BITS_SET_FTELLO */
- size_t __cdecl fwrite(const void * __restrict__ _Str,size_t _Size,size_t _Count,FILE * __restrict__ _File);
- int __cdecl getc(FILE *_File);
- int __cdecl getchar(void);
- _CRTIMP int __cdecl _getmaxstdio(void);
- char *__cdecl gets(char *_Buffer) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- int __cdecl _getw(FILE *_File);
- #ifndef _CRT_PERROR_DEFINED
- #define _CRT_PERROR_DEFINED
- void __cdecl perror(const char *_ErrMsg);
- #endif
- #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
- _CRTIMP int __cdecl _pclose(FILE *_File);
- _CRTIMP FILE *__cdecl _popen(const char *_Command,const char *_Mode);
- #if !defined(NO_OLDNAMES) && !defined(popen)
- #define popen _popen
- #define pclose _pclose
- #endif
- #endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */
- int __cdecl putc(int _Ch,FILE *_File);
- int __cdecl putchar(int _Ch);
- int __cdecl puts(const char *_Str);
- _CRTIMP int __cdecl _putw(int _Word,FILE *_File);
- #ifndef _CRT_DIRECTORY_DEFINED
- #define _CRT_DIRECTORY_DEFINED
- int __cdecl remove(const char *_Filename);
- int __cdecl rename(const char *_OldFilename,const char *_NewFilename);
- _CRTIMP int __cdecl _unlink(const char *_Filename);
- #ifndef NO_OLDNAMES
- int __cdecl unlink(const char *_Filename) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- #endif
- #endif
- void __cdecl rewind(FILE *_File);
- _CRTIMP int __cdecl _rmtmp(void);
- void __cdecl setbuf(FILE * __restrict__ _File,char * __restrict__ _Buffer) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _CRTIMP int __cdecl _setmaxstdio(int _Max);
- _CRTIMP unsigned int __cdecl _set_output_format(unsigned int _Format);
- _CRTIMP unsigned int __cdecl _get_output_format(void);
- int __cdecl setvbuf(FILE * __restrict__ _File,char * __restrict__ _Buf,int _Mode,size_t _Size);
- #ifdef _UCRT
- __mingw_ovr
- __MINGW_ATTRIB_PURE
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- int __cdecl _scprintf(const char * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vsprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- __attribute__((__format__ (__MINGW_SCANF_FORMAT, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- int __cdecl _snscanf(const char * __restrict__ _Src,size_t _MaxCount,const char * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vsscanf(0, _Src, _MaxCount, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- #else
- __MINGW_ATTRIB_PURE
- __attribute__((__format__ (ms_printf, 1, 2))) __MINGW_ATTRIB_NONNULL(1)
- _CRTIMP int __cdecl _scprintf(const char * __restrict__ _Format,...);
- __attribute__((__format__ (ms_scanf, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- _CRTIMP int __cdecl _snscanf(const char * __restrict__ _Src,size_t _MaxCount,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- #endif
- __MINGW_ATTRIB_PURE
- __attribute__((__format__ (ms_printf, 1, 0))) __MINGW_ATTRIB_NONNULL(1)
- _CRTIMP int __cdecl _vscprintf(const char * __restrict__ _Format,va_list _ArgList);
- FILE *__cdecl tmpfile(void) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- char *__cdecl tmpnam(char *_Buffer);
- int __cdecl ungetc(int _Ch,FILE *_File);
- #ifdef _UCRT
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 3, 0))) __MINGW_ATTRIB_NONNULL(3)
- int __cdecl _vsnprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- int __cdecl _snprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = _vsnprintf(_Dest, _Count, _Format, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- #else
- __attribute__((__format__ (ms_printf, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- _CRTIMP int __cdecl _snprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- __attribute__((__format__ (ms_printf, 3, 0))) __MINGW_ATTRIB_NONNULL(3)
- _CRTIMP int __cdecl _vsnprintf(char * __restrict__ _Dest,size_t _Count,const char * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- #endif
- #if __MINGW_FORTIFY_LEVEL > 0
- char * __cdecl __gets_chk(char *, size_t);
- char * __cdecl __mingw_call_gets_warn(char *) __MINGW_ASM_CALL(gets)
- __attribute__((__warning__("Using gets() is always unsafe - use fgets() instead")));
- char * __cdecl __mingw_call_fgets(char * __restrict__, int, FILE * __restrict__) __MINGW_ASM_CALL(fgets);
- size_t __cdecl __mingw_call_fread(void * __restrict__, size_t, size_t, FILE * __restrict__) __MINGW_ASM_CALL(fread);
- char * __cdecl __mingw_call_tmpnam(char *) __MINGW_ASM_CALL(tmpnam);
- __mingw_bos_extern_ovr
- char * gets(char * __dst)
- {
- if (__mingw_bos_known(__dst))
- return __gets_chk(__dst, __mingw_bos(__dst, 1));
- return __mingw_call_gets_warn(__dst);
- }
- __mingw_bos_extern_ovr
- char * fgets(char * __restrict__ __dst, int __n, FILE * __restrict__ __f)
- {
- __mingw_bos_ptr_chk_warn(__dst, __n, 1);
- return __mingw_call_fgets(__dst, __n, __f);
- }
- __mingw_bos_extern_ovr
- size_t fread(void * __restrict__ __dst, size_t __sz, size_t __n, FILE * __restrict__ __f)
- {
- __mingw_bos_ptr_chk_warn(__dst, __sz * __n, 0);
- return __mingw_call_fread(__dst, __sz, __n, __f);
- }
- __mingw_bos_extern_ovr
- char * tmpnam(char * __dst)
- {
- __mingw_bos_ptr_chk_warn(__dst, L_tmpnam, 1);
- return __mingw_call_tmpnam(__dst);
- }
- #endif /* __MINGW_FORTIFY_LEVEL > 0 */
- #if __USE_MINGW_ANSI_STDIO == 0
- #ifdef _UCRT
- #ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wshadow"
- #endif
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 3, 0))) __MINGW_ATTRIB_NONNULL(3)
- int vsnprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, va_list __local_argv);
- __attribute__((__format__ (__MINGW_PRINTF_FORMAT, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- int snprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, ...);
- #ifdef __GNUC__
- #pragma GCC diagnostic pop
- #endif
- #else
- /* this is here to deal with software defining
- * vsnprintf as _vsnprintf, eg. libxml2. */
- #ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wshadow"
- #endif
- __attribute__((__format__ (ms_printf, 3, 0))) __MINGW_ATTRIB_NONNULL(3)
- int __cdecl __ms_vsnprintf(char * __restrict__ d,size_t n,const char * __restrict__ format,va_list arg)
- __MINGW_ATTRIB_DEPRECATED_MSVC2005 __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- __mingw_bos_ovr
- __attribute__((__format__ (ms_printf, 3, 0))) __MINGW_ATTRIB_NONNULL(3)
- int vsnprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, va_list __local_argv)
- {
- #if __MINGW_FORTIFY_LEVEL > 0
- __mingw_bos_ptr_chk_warn(__stream, __n, 1);
- #endif
- if (__builtin_constant_p(__n) && __n == 0)
- return _vscprintf(__format, __local_argv);
- return __ms_vsnprintf (__stream, __n, __format, __local_argv);
- }
- __attribute__((__format__ (ms_printf, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- int __cdecl __ms_snprintf(char * __restrict__ s, size_t n, const char * __restrict__ format, ...);
- #ifndef __NO_ISOCEXT
- #if __MINGW_FORTIFY_VA_ARG
- __mingw_bos_ovr
- __attribute__((__format__ (ms_printf, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- int snprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, ...)
- {
- __mingw_bos_ptr_chk_warn(__stream, __n, 1);
- if (__builtin_constant_p(__n) && __n == 0)
- return _scprintf(__format, __builtin_va_arg_pack());
- return __ms_snprintf(__stream, __n, __format, __builtin_va_arg_pack());
- }
- #else /* !__MINGW_FORTIFY_VA_ARG */
- __mingw_ovr
- __attribute__((__format__ (ms_printf, 3, 4))) __MINGW_ATTRIB_NONNULL(3)
- int snprintf (char * __restrict__ __stream, size_t __n, const char * __restrict__ __format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- if (__builtin_constant_p(__n) && __n == 0)
- __retval = _vscprintf(__format, __local_argv);
- else
- __retval = __ms_vsnprintf (__stream, __n, __format, __local_argv);
- __builtin_va_end( __local_argv );
- return __retval;
- }
- #endif /* !__MINGW_FORTIFY_VA_ARG */
- #endif /* !__NO_ISOCEXT */
- #if __MINGW_FORTIFY_VA_ARG
- int __cdecl __mingw_call_ms_sprintf(char * __restrict__, const char * __restrict__, ...) __MINGW_ASM_CALL(sprintf);
- __mingw_bos_extern_ovr
- __attribute__((__format__ (ms_printf, 2, 3))) __MINGW_ATTRIB_NONNULL(2)
- int sprintf (char * __restrict__ __stream, const char * __restrict__ __format, ...)
- {
- if (__mingw_bos_known(__stream)) {
- int __retval = __ms_snprintf( __stream, __mingw_bos(__stream, 1), __format, __builtin_va_arg_pack() );
- if (__retval >= 0)
- __mingw_bos_ptr_chk(__stream, (size_t)__retval + 1, 1);
- return __retval;
- }
- return __mingw_call_ms_sprintf( __stream, __format, __builtin_va_arg_pack() );
- }
- #endif /* __MINGW_FORTIFY_VA_ARG */
- #if __MINGW_FORTIFY_LEVEL > 0
- int __cdecl __mingw_call_ms_vsprintf(char * __restrict__, const char * __restrict__, va_list) __MINGW_ASM_CALL(vsprintf);
- __mingw_bos_extern_ovr
- __attribute__((__format__ (ms_printf, 2, 0))) __MINGW_ATTRIB_NONNULL(2)
- int vsprintf (char * __restrict__ __stream, const char * __restrict__ __format, va_list __local_argv)
- {
- if (__mingw_bos_known(__stream)) {
- int __retval = __ms_vsnprintf( __stream, __mingw_bos(__stream, 1), __format, __local_argv );
- if (__retval >= 0)
- __mingw_bos_ptr_chk(__stream, (size_t)__retval + 1, 1);
- return __retval;
- }
- return __mingw_call_ms_vsprintf( __stream, __format, __local_argv );
- }
- #endif /* __MINGW_FORTIFY_LEVEL > 0 */
- #ifdef __GNUC__
- #pragma GCC diagnostic pop
- #endif
- #endif /* _UCRT */
- #endif /* __USE_MINGW_ANSI_STDIO */
- _CRTIMP int __cdecl _set_printf_count_output(int _Value);
- _CRTIMP int __cdecl _get_printf_count_output(void);
- #ifndef _WSTDIO_DEFINED
- #define _WSTDIO_DEFINED
- /* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_vswscanf (const wchar_t * __restrict__ _Str,const wchar_t * __restrict__ Format,va_list argp);
- /* __attribute__((__format__ (gnu_wscanf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __mingw_wscanf(const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (gnu_wscanf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __mingw_vwscanf(const wchar_t * __restrict__ Format, va_list argp);
- /* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_vfwscanf (FILE * __restrict__ fp, const wchar_t * __restrict__ Format,va_list argp);
- /* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (gnu_wprintf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __mingw_wprintf(const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (gnu_wprintf, 2, 0))) */__MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
- /*__attribute__((__format__ (gnu_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __mingw_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
- /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
- int __cdecl __mingw_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...);
- /* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3)
- int __cdecl __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list);
- /* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...);
- /* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __mingw_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list);
- /* __attribute__((__format__ (ms_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (ms_wscanf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __ms_wscanf(const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (ms_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (ms_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (ms_wprintf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __ms_wprintf(const wchar_t * __restrict__ _Format,...);
- /* __attribute__((__format__ (ms_wprintf, 2, 0))) */__MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
- /*__attribute__((__format__ (ms_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
- int __cdecl __ms_vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
- /* __attribute__((__format__ (ms_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_swprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ , ...);
- /* __attribute__((__format__ (ms_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
- int __cdecl __ms_vswprintf(wchar_t * __restrict__ , const wchar_t * __restrict__ ,va_list);
- #ifdef _UCRT
- int __cdecl __stdio_common_vswprintf(unsigned __int64 options, wchar_t *str, size_t len, const wchar_t *format, _locale_t locale, va_list valist);
- int __cdecl __stdio_common_vfwprintf(unsigned __int64 options, FILE *file, const wchar_t *format, _locale_t locale, va_list valist);
- int __cdecl __stdio_common_vswscanf(unsigned __int64 options, const wchar_t *input, size_t length, const wchar_t *format, _locale_t locale, va_list valist);
- int __cdecl __stdio_common_vfwscanf(unsigned __int64 options, FILE *file, const wchar_t *format, _locale_t locale, va_list valist);
- #endif
- #if __USE_MINGW_ANSI_STDIO && !defined(_CRTBLD)
- /*
- * User has expressed a preference for C99 conformance...
- */
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int swscanf(const wchar_t *__source, const wchar_t *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vswscanf( __source, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wscanf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
- int wscanf(const wchar_t *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vfwscanf( stdin, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wscanf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int fwscanf(FILE *__stream, const wchar_t *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vfwscanf( __stream, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
- int vswscanf (const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, __builtin_va_list __local_argv)
- {
- return __mingw_vswscanf( __source, __format, __local_argv );
- }
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wscanf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
- int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vfwscanf( stdin, __format, __local_argv );
- }
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wscanf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
- int vfwscanf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vfwscanf( __stream, __format, __local_argv );
- }
- #endif /* __NO_ISOCEXT */
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wprintf, 2, 3))) */ __MINGW_ATTRIB_NONNULL(2)
- int fwprintf (FILE *__stream, const wchar_t *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vfwprintf( __stream, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wprintf, 1, 2))) */ __MINGW_ATTRIB_NONNULL(1)
- int wprintf (const wchar_t *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vfwprintf( stdout, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wprintf, 2, 0))) */ __MINGW_ATTRIB_NONNULL(2)
- int vfwprintf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vfwprintf( __stream, __format, __local_argv );
- }
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wprintf, 1, 0))) */ __MINGW_ATTRIB_NONNULL(1)
- int vwprintf (const wchar_t *__format, __builtin_va_list __local_argv)
- {
- return __mingw_vfwprintf( stdout, __format, __local_argv );
- }
- #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
- #if __MINGW_FORTIFY_VA_ARG
- __mingw_bos_ovr
- /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
- int snwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...)
- {
- __mingw_bos_ptr_chk_warn(__stream, __n * sizeof(wchar_t), 1);
- return __mingw_snwprintf( __stream, __n, __format, __builtin_va_arg_pack() );
- }
- #else /* !__MINGW_FORTIFY_VA_ARG */
- __mingw_ovr
- /* __attribute__((__format__ (gnu_wprintf, 3, 4))) */ __MINGW_ATTRIB_NONNULL(3)
- int snwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, ...)
- {
- int __retval;
- __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
- __retval = __mingw_vsnwprintf( __stream, __n, __format, __local_argv );
- __builtin_va_end( __local_argv );
- return __retval;
- }
- #endif /* __MINGW_FORTIFY_VA_ARG */
- __mingw_bos_ovr
- /* __attribute__((__format__ (gnu_wprintf, 3, 0))) */ __MINGW_ATTRIB_NONNULL(3)
- int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builtin_va_list __local_argv)
- {
- #if __MINGW_FORTIFY_LEVEL > 0
- __mingw_bos_ptr_chk_warn(__stream, __n * sizeof(wchar_t), 1);
- #endif
- return __mingw_vsnwprintf( __stream, __n, __format, __local_argv );
- }
- #endif /* __NO_ISOCEXT */
- #else /* !__USE_MINGW_ANSI_STDIO */
- #ifdef _UCRT
- __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, _File, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- int __cdecl swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, _Src, (size_t)-1, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- __mingw_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- int __cdecl wscanf(const wchar_t * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, stdin, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- __mingw_ovr
- __MINGW_ATTRIB_NONNULL(2)
- int vfwscanf (FILE *__stream, const wchar_t *__format, va_list __local_argv)
- {
- return __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, __stream, __format, NULL, __local_argv);
- }
- __mingw_ovr
- __MINGW_ATTRIB_NONNULL(2)
- int vswscanf (const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, va_list __local_argv)
- {
- return __stdio_common_vswscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, __source, (size_t)-1, __format, NULL, __local_argv);
- }
- __mingw_ovr
- __MINGW_ATTRIB_NONNULL(1)
- int vwscanf(const wchar_t *__format, va_list __local_argv)
- {
- return __stdio_common_vfwscanf(_CRT_INTERNAL_LOCAL_SCANF_OPTIONS, stdin, __format, NULL, __local_argv);
- }
- __mingw_static_ovr
- int __cdecl fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vfwprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- __mingw_ovr
- int __cdecl wprintf(const wchar_t * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vfwprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- __mingw_ovr
- int __cdecl vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList)
- {
- return __stdio_common_vfwprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _File, _Format, NULL, _ArgList);
- }
- __mingw_ovr
- int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList)
- {
- return __stdio_common_vfwprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, stdout, _Format, NULL, _ArgList);
- }
- #else
- int __cdecl fwscanf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- int __cdecl swscanf(const wchar_t * __restrict__ _Src,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- int __cdecl wscanf(const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
- int __cdecl __ms_vwscanf (const wchar_t * __restrict__ , va_list);
- int __cdecl __ms_vfwscanf (FILE * __restrict__ ,const wchar_t * __restrict__ ,va_list);
- int __cdecl __ms_vswscanf (const wchar_t * __restrict__ ,const wchar_t * __restrict__ ,va_list);
- __mingw_ovr
- __MINGW_ATTRIB_NONNULL(2)
- int vfwscanf (FILE *__stream, const wchar_t *__format, __builtin_va_list __local_argv)
- {
- return __ms_vfwscanf (__stream, __format, __local_argv);
- }
- __mingw_ovr
- __MINGW_ATTRIB_NONNULL(2)
- int vswscanf (const wchar_t * __restrict__ __source, const wchar_t * __restrict__ __format, __builtin_va_list __local_argv)
- {
- return __ms_vswscanf( __source, __format, __local_argv );
- }
- __mingw_ovr
- __MINGW_ATTRIB_NONNULL(1)
- int vwscanf(const wchar_t *__format, __builtin_va_list __local_argv)
- {
- return __ms_vwscanf (__format, __local_argv);
- }
- #endif /* __NO_ISOCEXT */
- int __cdecl fwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,...);
- int __cdecl wprintf(const wchar_t * __restrict__ _Format,...);
- int __cdecl vfwprintf(FILE * __restrict__ _File,const wchar_t * __restrict__ _Format,va_list _ArgList);
- int __cdecl vwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
- #endif /* _UCRT */
- #endif /* __USE_MINGW_ANSI_STDIO */
- #ifndef WEOF
- #define WEOF (wint_t)(0xFFFF)
- #endif
- #ifdef _POSIX_
- _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode);
- #else
- _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag);
- #endif
- wint_t __cdecl fgetwc(FILE *_File);
- _CRTIMP wint_t __cdecl _fgetwchar(void);
- wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File);
- _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch);
- wint_t __cdecl getwc(FILE *_File);
- wint_t __cdecl getwchar(void);
- wint_t __cdecl putwc(wchar_t _Ch,FILE *_File);
- wint_t __cdecl putwchar(wchar_t _Ch);
- wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File);
- wchar_t *__cdecl fgetws(wchar_t * __restrict__ _Dst,int _SizeInWords,FILE * __restrict__ _File);
- int __cdecl fputws(const wchar_t * __restrict__ _Str,FILE * __restrict__ _File);
- _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _CRTIMP int __cdecl _putws(const wchar_t *_Str);
- #ifdef _UCRT
- __mingw_ovr
- int __cdecl _scwprintf(const wchar_t * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- __mingw_static_ovr __MINGW_ATTRIB_DEPRECATED_SEC_WARN
- int __cdecl _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_LEGACY_VSPRINTF_NULL_TERMINATION, _Dest, _Count, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- #if __USE_MINGW_ANSI_STDIO == 0
- __mingw_ovr
- int snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, format);
- __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, s, n, format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- __mingw_ovr
- int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg)
- {
- int __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, s, n, format, NULL, arg);
- return __ret < 0 ? -1 : __ret;
- }
- #endif
- __mingw_ovr
- int __cdecl _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...)
- {
- __builtin_va_list __ap;
- int __ret;
- __builtin_va_start(__ap, _Format);
- __ret = __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Dest, (size_t)-1, _Format, NULL, __ap);
- __builtin_va_end(__ap);
- return __ret;
- }
- __mingw_ovr
- int __cdecl _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args)
- {
- return __stdio_common_vswprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Dest, (size_t)-1, _Format, NULL, _Args);
- }
- __mingw_ovr
- int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format, va_list _ArgList)
- {
- int _Result = __stdio_common_vswprintf(_CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR, NULL, 0, _Format, NULL, _ArgList);
- return _Result < 0 ? -1 : _Result;
- }
- #else
- _CRTIMP int __cdecl _scwprintf(const wchar_t * __restrict__ _Format,...);
- _CRTIMP int __cdecl _swprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,...);
- _CRTIMP int __cdecl _vswprintf_c(wchar_t * __restrict__ _DstBuf,size_t _SizeInWords,const wchar_t * __restrict__ _Format,va_list _ArgList);
- _CRTIMP int __cdecl _snwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,...) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _CRTIMP int __cdecl _vsnwprintf(wchar_t * __restrict__ _Dest,size_t _Count,const wchar_t * __restrict__ _Format,va_list _Args) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _CRTIMP int __cdecl _vscwprintf(const wchar_t * __restrict__ _Format,va_list _ArgList);
- #ifndef __NO_ISOCEXT /* externs in libmingwex.a */
- #if __USE_MINGW_ANSI_STDIO == 0
- int __cdecl __ms_snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...);
- int __cdecl __ms_vsnwprintf (wchar_t * __restrict__ , size_t, const wchar_t * __restrict__ , va_list);
- __mingw_ovr
- int snwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, ...)
- {
- int r;
- va_list argp;
- __builtin_va_start (argp, format);
- r = _vsnwprintf (s, n, format, argp);
- __builtin_va_end (argp);
- return r;
- }
- __mingw_ovr
- int __cdecl vsnwprintf (wchar_t * __restrict__ s, size_t n, const wchar_t * __restrict__ format, va_list arg)
- {
- return _vsnwprintf(s,n,format,arg);
- }
- #endif
- #endif /* ! __NO_ISOCEXT */
- _CRTIMP int __cdecl _swprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,...);
- _CRTIMP int __cdecl _vswprintf(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Format,va_list _Args);
- #endif /* _UCRT */
- #ifndef RC_INVOKED
- #include <swprintf.inl>
- #endif
- #ifdef _CRT_NON_CONFORMING_SWPRINTFS
- #ifndef __cplusplus
- #define _swprintf_l __swprintf_l
- #define _vswprintf_l __vswprintf_l
- #endif
- #endif
- _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix);
- _CRTIMP int __cdecl _snwscanf(const wchar_t * __restrict__ _Src,size_t _MaxCount,const wchar_t * __restrict__ _Format,...);
- _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode);
- _CRTIMP FILE *__cdecl _wfopen(const wchar_t * __restrict__ _Filename,const wchar_t *__restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- _CRTIMP FILE *__cdecl _wfreopen(const wchar_t * __restrict__ _Filename,const wchar_t * __restrict__ _Mode,FILE * __restrict__ _OldFile) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
- #ifndef _CRT_WPERROR_DEFINED
- #define _CRT_WPERROR_DEFINED
- _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg);
- #endif
- _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode);
- #if !defined(NO_OLDNAMES) && !defined(wpopen)
- #define wpopen _wpopen
- #endif
- _CRTIMP int __cdecl _wremove(const wchar_t *_Filename);
- _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer);
- #if __MSVCRT_VERSION__ >= 0x800
- _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File);
- _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File);
- _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File);
- #endif
- #undef _CRT_GETPUTWCHAR_NOINLINE
- #if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE) || defined (__CRT__NO_INLINE)
- #define getwchar() fgetwc(stdin)
- #define putwchar(_c) fputwc((_c),stdout)
- #else
- __CRT_INLINE wint_t __cdecl getwchar() {return (fgetwc(stdin)); }
- __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) {return (fputwc(_C,stdout)); }
- #endif
- #define getwc(_stm) fgetwc(_stm)
- #define putwc(_c,_stm) fputwc(_c,_stm)
- #if __MSVCRT_VERSION__ >= 0x800
- #define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm)
- #define _getwc_nolock(_c) _fgetwc_nolock(_c)
- #endif
- #endif
- #define _STDIO_DEFINED
- #endif
- #ifdef _UCRT
- _CRTIMP int __cdecl _fgetc_nolock(FILE *_File);
- _CRTIMP int __cdecl _fputc_nolock(int _Char, FILE *_File);
- _CRTIMP int __cdecl _getc_nolock(FILE *_File);
- _CRTIMP int __cdecl _putc_nolock(int _Char, FILE *_File);
- #else
- #define _fgetc_nolock(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream))
- #define _fputc_nolock(_c,_stream) (--(_stream)->_cnt >= 0 ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream)))
- #define _getc_nolock(_stream) _fgetc_nolock(_stream)
- #define _putc_nolock(_c,_stream) _fputc_nolock(_c,_stream)
- #endif
- #define _getchar_nolock() _getc_nolock(stdin)
- #define _putchar_nolock(_c) _putc_nolock((_c),stdout)
- #define _getwchar_nolock() _getwc_nolock(stdin)
- #define _putwchar_nolock(_c) _putwc_nolock((_c),stdout)
- _CRTIMP void __cdecl _lock_file(FILE *_File);
- _CRTIMP void __cdecl _unlock_file(FILE *_File);
- #if __MSVCRT_VERSION__ >= 0x800
- _CRTIMP int __cdecl _fclose_nolock(FILE *_File);
- _CRTIMP int __cdecl _fflush_nolock(FILE *_File);
- _CRTIMP size_t __cdecl _fread_nolock(void * __restrict__ _DstBuf,size_t _ElementSize,size_t _Count,FILE * __restrict__ _File);
- _CRTIMP int __cdecl _fseek_nolock(FILE *_File,long _Offset,int _Origin);
- _CRTIMP long __cdecl _ftell_nolock(FILE *_File);
- __MINGW_EXTENSION _CRTIMP int __cdecl _fseeki64_nolock(FILE *_File,__int64 _Offset,int _Origin);
- __MINGW_EXTENSION _CRTIMP __int64 __cdecl _ftelli64_nolock(FILE *_File);
- _CRTIMP size_t __cdecl _fwrite_nolock(const void * __restrict__ _DstBuf,size_t _Size,size_t _Count,FILE * __restrict__ _File);
- _CRTIMP int __cdecl _ungetc_nolock(int _Ch,FILE *_File);
- #endif
- #if !defined(NO_OLDNAMES) || !defined(_POSIX)
- #define P_tmpdir _P_tmpdir
- #define SYS_OPEN _SYS_OPEN
- char *__cdecl tempnam(const char *_Directory,const char *_FilePrefix) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- int __cdecl fcloseall(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- FILE *__cdecl fdopen(int _FileHandle,const char *_Format) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- int __cdecl fgetchar(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- int __cdecl fileno(FILE *_File) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- int __cdecl flushall(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- int __cdecl fputchar(int _Ch) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- int __cdecl getw(FILE *_File) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- int __cdecl putw(int _Ch,FILE *_File) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- int __cdecl rmtmp(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
- #endif
- #ifndef __MINGW_MBWC_CONVERT_DEFINED
- #define __MINGW_MBWC_CONVERT_DEFINED
- /**
- * __mingw_str_wide_utf8
- * Converts a null terminated UCS-2 string to a multibyte (UTF-8) equivalent.
- * Caller is supposed to free allocated buffer with __mingw_str_free().
- * @param[in] wptr Pointer to wide string.
- * @param[out] mbptr Pointer to multibyte string.
- * @param[out] buflen Optional parameter for length of allocated buffer.
- * @return Number of characters converted, 0 for failure.
- *
- * WideCharToMultiByte - http://msdn.microsoft.com/en-us/library/dd374130(VS.85).aspx
- */
- int __cdecl __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen);
- /**
- * __mingw_str_utf8_wide
- * Converts a null terminated UTF-8 string to a UCS-2 equivalent.
- * Caller is supposed to free allocated buffer with __mingw_str_free().
- * @param[out] mbptr Pointer to multibyte string.
- * @param[in] wptr Pointer to wide string.
- * @param[out] buflen Optional parameter for length of allocated buffer.
- * @return Number of characters converted, 0 for failure.
- *
- * MultiByteToWideChar - http://msdn.microsoft.com/en-us/library/dd319072(VS.85).aspx
- */
- int __cdecl __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen);
- /**
- * __mingw_str_free
- * Frees buffer create by __mingw_str_wide_utf8 and __mingw_str_utf8_wide.
- * @param[in] ptr memory block to free.
- *
- */
- void __cdecl __mingw_str_free(void *ptr);
- #endif /* __MINGW_MBWC_CONVERT_DEFINED */
- #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
- #ifndef _WSPAWN_DEFINED
- #define _WSPAWN_DEFINED
- _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
- _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
- _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
- _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...);
- _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
- _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
- _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList);
- _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env);
- #endif
- #ifndef _P_WAIT
- #define _P_WAIT 0
- #define _P_NOWAIT 1
- #define _OLD_P_OVERLAY 2
- #define _P_NOWAITO 3
- #define _P_DETACH 4
- #define _P_OVERLAY 2
- #define _WAIT_CHILD 0
- #define _WAIT_GRANDCHILD 1
- #endif
- #ifndef _SPAWNV_DEFINED
- #define _SPAWNV_DEFINED
- _CRTIMP intptr_t __cdecl _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList);
- _CRTIMP intptr_t __cdecl _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
- _CRTIMP intptr_t __cdecl _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList);
- _CRTIMP intptr_t __cdecl _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env);
- #endif
- #endif /* _CRT_USE_WINAPI_FAMILY_DESKTOP_APP */
- #ifdef __cplusplus
- }
- #endif
- #pragma pop_macro("snprintf")
- #pragma pop_macro("vsnprintf")
- #pragma pop_macro("snwprintf")
- #pragma pop_macro("vsnwprintf")
- #pragma pack(pop)
- #include <sec_api/stdio_s.h>
- #endif
|