2000-02-17 20:38:33 +01:00
|
|
|
/*
|
|
|
|
* stdio.h
|
2004-04-21 00:49:32 +02:00
|
|
|
* This file has no copyright assigned and is placed in the Public Domain.
|
|
|
|
* This file is a part of the mingw-runtime package.
|
|
|
|
* No warranty is given; refer to the file DISCLAIMER within the package.
|
2000-02-17 20:38:33 +01:00
|
|
|
*
|
|
|
|
* Definitions of types and prototypes of functions for standard input and
|
|
|
|
* output.
|
|
|
|
*
|
|
|
|
* NOTE: The file manipulation functions provided by Microsoft seem to
|
2002-09-16 11:44:06 +02:00
|
|
|
* work with either slash (/) or backslash (\) as the directory separator.
|
2000-02-17 20:38:33 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _STDIO_H_
|
|
|
|
#define _STDIO_H_
|
|
|
|
|
|
|
|
/* All the headers include this file. */
|
|
|
|
#include <_mingw.h>
|
|
|
|
|
2002-06-13 12:20:48 +02:00
|
|
|
#ifndef RC_INVOKED
|
2000-02-17 20:38:33 +01:00
|
|
|
#define __need_size_t
|
|
|
|
#define __need_NULL
|
|
|
|
#define __need_wchar_t
|
|
|
|
#define __need_wint_t
|
|
|
|
#include <stddef.h>
|
2002-06-13 12:20:48 +02:00
|
|
|
#define __need___va_list
|
|
|
|
#include <stdarg.h>
|
2000-02-17 20:38:33 +01:00
|
|
|
#endif /* Not RC_INVOKED */
|
|
|
|
|
|
|
|
|
2001-08-05 14:52:43 +02:00
|
|
|
/* Flags for the iobuf structure */
|
2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
defining.
* include/excpt.h (): Include windef.h not windows.h.
* include/fcntl.h (_O_SHORT_LIVED): Add define.
(_chmod): Add prototype.
(_creat): Correct prototype.
(SH_DENY*): Rename defines to _SH_DENY*.
(SH_DENY*): Add Non-ANSI names for _SH_DENY*.
include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
_IOAPPEND): Add defines.
(_wfindfirst): Correct prototype.
(_wfdopen): Add prototype.
* include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
prototypes.
* include/string.h (_mbschr, _mbstok, _mbsncat): Remove
prototypes.
(_wcsdup): Correct prototype.
* include/mbstring.h: Remove comments about _mbschr, _mbstok,
_mbsncat being in string.h.
* include/wchar.h (_wfindfirst): Correct prototype.
* include/tchar.h (_tfdopen): Add _UNICODE mappings.
2002-06-18 06:13:18 +02:00
|
|
|
#define _IOREAD 1 /* currently reading */
|
|
|
|
#define _IOWRT 2 /* currently writing */
|
2001-08-05 14:52:43 +02:00
|
|
|
#define _IORW 0x0080 /* opened as "r+w" */
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The three standard file pointers provided by the run time library.
|
|
|
|
* NOTE: These will go to the bit-bucket silently in GUI applications!
|
|
|
|
*/
|
|
|
|
#define STDIN_FILENO 0
|
|
|
|
#define STDOUT_FILENO 1
|
|
|
|
#define STDERR_FILENO 2
|
|
|
|
|
|
|
|
/* Returned by various functions on end of file condition or error. */
|
|
|
|
#define EOF (-1)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The maximum length of a file name. You should use GetVolumeInformation
|
|
|
|
* instead of this constant. But hey, this works.
|
2003-09-24 10:26:23 +02:00
|
|
|
* Also defined in io.h.
|
2000-02-17 20:38:33 +01:00
|
|
|
*/
|
2003-09-24 10:26:23 +02:00
|
|
|
#ifndef FILENAME_MAX
|
2000-02-17 20:38:33 +01:00
|
|
|
#define FILENAME_MAX (260)
|
2003-09-24 10:26:23 +02:00
|
|
|
#endif
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The maximum number of files that may be open at once. I have set this to
|
|
|
|
* a conservative number. The actual value may be higher.
|
|
|
|
*/
|
|
|
|
#define FOPEN_MAX (20)
|
|
|
|
|
2001-08-05 14:52:43 +02:00
|
|
|
/* After creating this many names, tmpnam and tmpfile return NULL */
|
|
|
|
#define TMP_MAX 32767
|
|
|
|
/*
|
|
|
|
* Tmpnam, tmpfile and, sometimes, _tempnam try to create
|
|
|
|
* temp files in the root directory of the current drive
|
|
|
|
* (not in pwd, as suggested by some older MS doc's).
|
|
|
|
* Redefining these macros does not effect the CRT functions.
|
|
|
|
*/
|
|
|
|
#define _P_tmpdir "\\"
|
2005-01-06 12:10:58 +01:00
|
|
|
#ifndef __STRICT_ANSI__
|
|
|
|
#define P_tmpdir _P_tmpdir
|
|
|
|
#endif
|
2001-08-05 14:52:43 +02:00
|
|
|
#define _wP_tmpdir L"\\"
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
/*
|
|
|
|
* The maximum size of name (including NUL) that will be put in the user
|
|
|
|
* supplied buffer caName for tmpnam.
|
2001-08-05 14:52:43 +02:00
|
|
|
* Inferred from the size of the static buffer returned by tmpnam
|
|
|
|
* when passed a NULL argument. May actually be smaller.
|
2000-02-17 20:38:33 +01:00
|
|
|
*/
|
2001-08-05 14:52:43 +02:00
|
|
|
#define L_tmpnam (16)
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
defining.
* include/excpt.h (): Include windef.h not windows.h.
* include/fcntl.h (_O_SHORT_LIVED): Add define.
(_chmod): Add prototype.
(_creat): Correct prototype.
(SH_DENY*): Rename defines to _SH_DENY*.
(SH_DENY*): Add Non-ANSI names for _SH_DENY*.
include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
_IOAPPEND): Add defines.
(_wfindfirst): Correct prototype.
(_wfdopen): Add prototype.
* include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
prototypes.
* include/string.h (_mbschr, _mbstok, _mbsncat): Remove
prototypes.
(_wcsdup): Correct prototype.
* include/mbstring.h: Remove comments about _mbschr, _mbstok,
_mbsncat being in string.h.
* include/wchar.h (_wfindfirst): Correct prototype.
* include/tchar.h (_tfdopen): Add _UNICODE mappings.
2002-06-18 06:13:18 +02:00
|
|
|
#define _IOFBF 0x0000 /* full buffered */
|
|
|
|
#define _IOLBF 0x0040 /* line buffered */
|
|
|
|
#define _IONBF 0x0004 /* not buffered */
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2002-06-18 Casper S. Hornstrup <chorns@users.sourceforge.net>
* include/_mingw.h (__MINGW_IMPORT): Check for prior definition before
defining.
* include/excpt.h (): Include windef.h not windows.h.
* include/fcntl.h (_O_SHORT_LIVED): Add define.
(_chmod): Add prototype.
(_creat): Correct prototype.
(SH_DENY*): Rename defines to _SH_DENY*.
(SH_DENY*): Add Non-ANSI names for _SH_DENY*.
include/stdio.h (_IOMYBUF, _IOEOF, _IOERR, _IOSTRG,
_IOAPPEND): Add defines.
(_wfindfirst): Correct prototype.
(_wfdopen): Add prototype.
* include/stdlib.h (_rotl, _rotr, _lrotl, _lrotr): Add
prototypes.
* include/string.h (_mbschr, _mbstok, _mbsncat): Remove
prototypes.
(_wcsdup): Correct prototype.
* include/mbstring.h: Remove comments about _mbschr, _mbstok,
_mbsncat being in string.h.
* include/wchar.h (_wfindfirst): Correct prototype.
* include/tchar.h (_tfdopen): Add _UNICODE mappings.
2002-06-18 06:13:18 +02:00
|
|
|
#define _IOMYBUF 0x0008 /* stdio malloc()'d buffer */
|
|
|
|
#define _IOEOF 0x0010 /* EOF reached on read */
|
|
|
|
#define _IOERR 0x0020 /* I/O error from system */
|
|
|
|
#define _IOSTRG 0x0040 /* Strange or no file descriptor */
|
|
|
|
#ifdef _POSIX_SOURCE
|
|
|
|
# define _IOAPPEND 0x0200
|
|
|
|
#endif
|
2000-02-17 20:38:33 +01:00
|
|
|
/*
|
|
|
|
* The buffer size as used by setbuf such that it is equivalent to
|
|
|
|
* (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
|
|
|
|
*/
|
|
|
|
#define BUFSIZ 512
|
|
|
|
|
|
|
|
/* Constants for nOrigin indicating the position relative to which fseek
|
2007-01-19 04:21:09 +01:00
|
|
|
* sets the file position. Defined unconditionally since ISO and POSIX
|
|
|
|
* say they are defined here. */
|
|
|
|
#define SEEK_SET 0
|
|
|
|
#define SEEK_CUR 1
|
|
|
|
#define SEEK_END 2
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
#ifndef RC_INVOKED
|
|
|
|
|
2003-02-10 22:13:34 +01:00
|
|
|
#ifndef __VALIST
|
2002-06-13 12:20:48 +02:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#define __VALIST __gnuc_va_list
|
2001-08-29 15:43:59 +02:00
|
|
|
#else
|
2002-06-13 12:20:48 +02:00
|
|
|
#define __VALIST char*
|
2000-02-17 20:38:33 +01:00
|
|
|
#endif
|
2003-02-10 22:13:34 +01:00
|
|
|
#endif /* defined __VALIST */
|
2002-06-13 12:20:48 +02:00
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
/*
|
|
|
|
* The structure underlying the FILE type.
|
|
|
|
*
|
2003-10-03 12:16:53 +02:00
|
|
|
* Some believe that nobody in their right mind should make use of the
|
2000-02-17 20:38:33 +01:00
|
|
|
* internals of this structure. Provided by Pedro A. Aranda Gutiirrez
|
|
|
|
* <paag@tid.es>.
|
|
|
|
*/
|
|
|
|
#ifndef _FILE_DEFINED
|
|
|
|
#define _FILE_DEFINED
|
|
|
|
typedef struct _iobuf
|
|
|
|
{
|
|
|
|
char* _ptr;
|
|
|
|
int _cnt;
|
|
|
|
char* _base;
|
|
|
|
int _flag;
|
|
|
|
int _file;
|
|
|
|
int _charbuf;
|
|
|
|
int _bufsiz;
|
|
|
|
char* _tmpfname;
|
|
|
|
} FILE;
|
|
|
|
#endif /* Not _FILE_DEFINED */
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The standard file handles
|
|
|
|
*/
|
|
|
|
#ifndef __DECLSPEC_SUPPORTED
|
|
|
|
|
2002-06-13 12:20:48 +02:00
|
|
|
extern FILE (*_imp___iob)[]; /* A pointer to an array of FILE */
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2002-06-13 12:20:48 +02:00
|
|
|
#define _iob (*_imp___iob) /* An array of FILE */
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
#else /* __DECLSPEC_SUPPORTED */
|
|
|
|
|
|
|
|
__MINGW_IMPORT FILE _iob[]; /* An array of FILE imported from DLL. */
|
|
|
|
|
|
|
|
#endif /* __DECLSPEC_SUPPORTED */
|
|
|
|
|
|
|
|
#define stdin (&_iob[STDIN_FILENO])
|
|
|
|
#define stdout (&_iob[STDOUT_FILENO])
|
|
|
|
#define stderr (&_iob[STDERR_FILENO])
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* File Operations
|
|
|
|
*/
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW fopen (const char*, const char*);
|
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW freopen (const char*, const char*, FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fflush (FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fclose (FILE*);
|
2000-11-21 03:50:03 +01:00
|
|
|
/* MS puts remove & rename (but not wide versions) in io.h also */
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW remove (const char*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW rename (const char*, const char*);
|
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW tmpfile (void);
|
|
|
|
_CRTIMP char* __cdecl __MINGW_NOTHROW tmpnam (char*);
|
2003-12-13 22:22:34 +01:00
|
|
|
|
|
|
|
#ifndef __STRICT_ANSI__
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP char* __cdecl __MINGW_NOTHROW _tempnam (const char*, const char*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _rmtmp(void);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _unlink (const char*);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
#ifndef NO_OLDNAMES
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP char* __cdecl __MINGW_NOTHROW tempnam (const char*, const char*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW rmtmp(void);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW unlink (const char*);
|
2000-02-17 20:38:33 +01:00
|
|
|
#endif
|
2003-12-13 22:22:34 +01:00
|
|
|
#endif /* __STRICT_ANSI__ */
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW setvbuf (FILE*, char*, int, size_t);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP void __cdecl __MINGW_NOTHROW setbuf (FILE*, char*);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Formatted Output
|
2008-08-30 19:27:18 +02:00
|
|
|
*
|
|
|
|
* MSVCRT implementations are not ANSI C99 conformant...
|
|
|
|
* we offer these conforming alternatives from libmingwex.a
|
|
|
|
*/
|
|
|
|
#undef __mingw_stdio_redirect__
|
|
|
|
#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __mingw_##F
|
|
|
|
|
|
|
|
extern int __mingw_stdio_redirect__(fprintf)(FILE*, const char*, ...);
|
|
|
|
extern int __mingw_stdio_redirect__(printf)(const char*, ...);
|
|
|
|
extern int __mingw_stdio_redirect__(sprintf)(char*, const char*, ...);
|
|
|
|
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
|
|
|
|
extern int __mingw_stdio_redirect__(vfprintf)(FILE*, const char*, __VALIST);
|
|
|
|
extern int __mingw_stdio_redirect__(vprintf)(const char*, __VALIST);
|
|
|
|
extern int __mingw_stdio_redirect__(vsprintf)(char*, const char*, __VALIST);
|
|
|
|
extern int __mingw_stdio_redirect__(vsnprintf)(char*, size_t, const char*, __VALIST);
|
|
|
|
|
|
|
|
#if __USE_MINGW_ANSI_STDIO
|
|
|
|
/*
|
|
|
|
* User has expressed a preference for C99 conformance...
|
|
|
|
*/
|
|
|
|
# undef __mingw_stdio_redirect__
|
|
|
|
# ifdef __cplusplus
|
|
|
|
/*
|
|
|
|
* For C++ we use inline implementations, to avoid interference
|
|
|
|
* with namespace qualification, which may result from using #defines.
|
|
|
|
*/
|
2009-09-01 22:41:55 +02:00
|
|
|
# define __mingw_stdio_redirect__ inline __cdecl __MINGW_NOTHROW
|
2008-08-30 19:27:18 +02:00
|
|
|
|
|
|
|
# elif defined __GNUC__
|
|
|
|
/*
|
|
|
|
* FIXME: Is there any GCC version prerequisite here?
|
|
|
|
*
|
|
|
|
* We also prefer inline implementations for C, when we can be confident
|
|
|
|
* that the GNU specific __inline__ mechanism is supported.
|
|
|
|
*/
|
|
|
|
# define __mingw_stdio_redirect__ static __inline__ __cdecl __MINGW_NOTHROW
|
|
|
|
|
|
|
|
# else
|
|
|
|
/*
|
|
|
|
* Can't use inlines; fall back on module local static stubs.
|
|
|
|
*/
|
|
|
|
# define __mingw_stdio_redirect__ static __cdecl __MINGW_NOTHROW
|
|
|
|
# endif
|
|
|
|
|
|
|
|
__mingw_stdio_redirect__
|
|
|
|
int fprintf (FILE *__stream, const char *__format, ...)
|
|
|
|
{
|
|
|
|
register int __retval;
|
2008-09-19 23:32:42 +02:00
|
|
|
__builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
|
|
|
|
__retval = __mingw_vfprintf( __stream, __format, __local_argv );
|
|
|
|
__builtin_va_end( __local_argv );
|
2008-08-30 19:27:18 +02:00
|
|
|
return __retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
__mingw_stdio_redirect__
|
|
|
|
int printf (const char *__format, ...)
|
|
|
|
{
|
|
|
|
register int __retval;
|
2008-09-19 23:32:42 +02:00
|
|
|
__builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
|
|
|
|
__retval = __mingw_vprintf( __format, __local_argv );
|
|
|
|
__builtin_va_end( __local_argv );
|
2008-08-30 19:27:18 +02:00
|
|
|
return __retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
__mingw_stdio_redirect__
|
|
|
|
int sprintf (char *__stream, const char *__format, ...)
|
|
|
|
{
|
|
|
|
register int __retval;
|
2008-09-19 23:32:42 +02:00
|
|
|
__builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
|
|
|
|
__retval = __mingw_vsprintf( __stream, __format, __local_argv );
|
|
|
|
__builtin_va_end( __local_argv );
|
2008-08-30 19:27:18 +02:00
|
|
|
return __retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
__mingw_stdio_redirect__
|
2008-09-19 23:32:42 +02:00
|
|
|
int vfprintf (FILE *__stream, const char *__format, __VALIST __local_argv)
|
2008-08-30 19:27:18 +02:00
|
|
|
{
|
2008-09-19 23:32:42 +02:00
|
|
|
return __mingw_vfprintf( __stream, __format, __local_argv );
|
2008-08-30 19:27:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
__mingw_stdio_redirect__
|
2008-09-19 23:32:42 +02:00
|
|
|
int vprintf (const char *__format, __VALIST __local_argv)
|
2008-08-30 19:27:18 +02:00
|
|
|
{
|
2008-09-19 23:32:42 +02:00
|
|
|
return __mingw_vprintf( __format, __local_argv );
|
2008-08-30 19:27:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
__mingw_stdio_redirect__
|
2008-09-19 23:32:42 +02:00
|
|
|
int vsprintf (char *__stream, const char *__format, __VALIST __local_argv)
|
2008-08-30 19:27:18 +02:00
|
|
|
{
|
2008-09-19 23:32:42 +02:00
|
|
|
return __mingw_vsprintf( __stream, __format, __local_argv );
|
2008-08-30 19:27:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
/*
|
|
|
|
* Default configuration: simply direct all calls to MSVCRT...
|
|
|
|
*/
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fprintf (FILE*, const char*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW printf (const char*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW sprintf (char*, const char*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW vfprintf (FILE*, const char*, __VALIST);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW vprintf (const char*, __VALIST);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW vsprintf (char*, const char*, __VALIST);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
/*
|
|
|
|
* Regardless of user preference, always offer these alternative
|
|
|
|
* entry points, for direct access to the MSVCRT implementations.
|
2000-02-17 20:38:33 +01:00
|
|
|
*/
|
2008-08-30 19:27:18 +02:00
|
|
|
#undef __mingw_stdio_redirect__
|
|
|
|
#define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __msvcrt_##F
|
|
|
|
|
|
|
|
_CRTIMP int __mingw_stdio_redirect__(fprintf)(FILE*, const char*, ...);
|
|
|
|
_CRTIMP int __mingw_stdio_redirect__(printf)(const char*, ...);
|
|
|
|
_CRTIMP int __mingw_stdio_redirect__(sprintf)(char*, const char*, ...);
|
|
|
|
_CRTIMP int __mingw_stdio_redirect__(vfprintf)(FILE*, const char*, __VALIST);
|
|
|
|
_CRTIMP int __mingw_stdio_redirect__(vprintf)(const char*, __VALIST);
|
|
|
|
_CRTIMP int __mingw_stdio_redirect__(vsprintf)(char*, const char*, __VALIST);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2008-08-30 19:27:18 +02:00
|
|
|
#undef __mingw_stdio_redirect__
|
|
|
|
|
|
|
|
/* The following pair ALWAYS refer to the MSVCRT implementations...
|
|
|
|
*/
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _snprintf (char*, size_t, const char*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _vsnprintf (char*, size_t, const char*, __VALIST);
|
2010-03-07 04:08:35 +01:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _vscprintf (const char*, __VALIST);
|
2002-06-13 12:20:48 +02:00
|
|
|
|
|
|
|
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
2007-08-25 15:49:37 +02:00
|
|
|
/*
|
|
|
|
* Microsoft does not provide implementations for the following,
|
|
|
|
* which are required by C99. Note in particular that the corresponding
|
|
|
|
* Microsoft implementations of _snprintf() and _vsnprintf() are *not*
|
|
|
|
* compatible with C99, but the following are; if you want the MSVCRT
|
|
|
|
* behaviour, you *must* use the Microsoft uglified names.
|
|
|
|
*/
|
2008-08-30 19:27:18 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW snprintf (char *, size_t, const char *, ...);
|
2007-06-23 09:34:16 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW vsnprintf (char *, size_t, const char *, __VALIST);
|
2007-06-18 11:50:01 +02:00
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW vscanf (const char * __restrict__, __VALIST);
|
|
|
|
int __cdecl __MINGW_NOTHROW vfscanf (FILE * __restrict__, const char * __restrict__,
|
2003-03-02 08:00:48 +01:00
|
|
|
__VALIST);
|
2007-06-23 09:34:16 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW vsscanf (const char * __restrict__,
|
2003-03-02 08:00:48 +01:00
|
|
|
const char * __restrict__, __VALIST);
|
2007-08-25 15:49:37 +02:00
|
|
|
|
|
|
|
#endif /* !__NO_ISOCEXT */
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Formatted Input
|
|
|
|
*/
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fscanf (FILE*, const char*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW scanf (const char*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW sscanf (const char*, const char*, ...);
|
2000-02-17 20:38:33 +01:00
|
|
|
/*
|
|
|
|
* Character Input and Output Functions
|
|
|
|
*/
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fgetc (FILE*);
|
|
|
|
_CRTIMP char* __cdecl __MINGW_NOTHROW fgets (char*, int, FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fputc (int, FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fputs (const char*, FILE*);
|
|
|
|
_CRTIMP char* __cdecl __MINGW_NOTHROW gets (char*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW puts (const char*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW ungetc (int, FILE*);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2003-10-03 12:16:53 +02:00
|
|
|
/* Traditionally, getc and putc are defined as macros. but the
|
|
|
|
standard doesn't say that they must be macros.
|
|
|
|
We use inline functions here to allow the fast versions
|
|
|
|
to be used in C++ with namespace qualification, eg., ::getc.
|
|
|
|
|
|
|
|
_filbuf and _flsbuf are not thread-safe. */
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _filbuf (FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _flsbuf (int, FILE*);
|
2003-10-03 12:16:53 +02:00
|
|
|
|
|
|
|
#if !defined _MT
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
__CRT_INLINE int __cdecl __MINGW_NOTHROW getc (FILE* __F)
|
2003-10-03 12:16:53 +02:00
|
|
|
{
|
|
|
|
return (--__F->_cnt >= 0)
|
2003-10-17 23:43:31 +02:00
|
|
|
? (int) (unsigned char) *__F->_ptr++
|
2003-10-03 12:16:53 +02:00
|
|
|
: _filbuf (__F);
|
|
|
|
}
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
__CRT_INLINE int __cdecl __MINGW_NOTHROW putc (int __c, FILE* __F)
|
2003-10-03 12:16:53 +02:00
|
|
|
{
|
|
|
|
return (--__F->_cnt >= 0)
|
2003-10-17 23:43:31 +02:00
|
|
|
? (int) (unsigned char) (*__F->_ptr++ = (char)__c)
|
2003-10-03 12:16:53 +02:00
|
|
|
: _flsbuf (__c, __F);
|
|
|
|
}
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
__CRT_INLINE int __cdecl __MINGW_NOTHROW getchar (void)
|
2003-10-03 12:16:53 +02:00
|
|
|
{
|
|
|
|
return (--stdin->_cnt >= 0)
|
2003-10-17 23:43:31 +02:00
|
|
|
? (int) (unsigned char) *stdin->_ptr++
|
2003-10-03 12:16:53 +02:00
|
|
|
: _filbuf (stdin);
|
|
|
|
}
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
__CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int __c)
|
2003-10-03 12:16:53 +02:00
|
|
|
{
|
|
|
|
return (--stdout->_cnt >= 0)
|
2003-10-17 23:43:31 +02:00
|
|
|
? (int) (unsigned char) (*stdout->_ptr++ = (char)__c)
|
2003-10-03 12:16:53 +02:00
|
|
|
: _flsbuf (__c, stdout);}
|
|
|
|
|
|
|
|
#else /* Use library functions. */
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW getc (FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW putc (int, FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW getchar (void);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW putchar (int);
|
2003-10-03 12:16:53 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
/*
|
|
|
|
* Direct Input and Output Functions
|
|
|
|
*/
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP size_t __cdecl __MINGW_NOTHROW fread (void*, size_t, size_t, FILE*);
|
|
|
|
_CRTIMP size_t __cdecl __MINGW_NOTHROW fwrite (const void*, size_t, size_t, FILE*);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* File Positioning Functions
|
|
|
|
*/
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fseek (FILE*, long, int);
|
|
|
|
_CRTIMP long __cdecl __MINGW_NOTHROW ftell (FILE*);
|
|
|
|
_CRTIMP void __cdecl __MINGW_NOTHROW rewind (FILE*);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2007-01-27 10:50:11 +01:00
|
|
|
#if __MSVCRT_VERSION__ >= 0x800
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fseek_nolock (FILE*, long, int);
|
|
|
|
_CRTIMP long __cdecl __MINGW_NOTHROW _ftell_nolock (FILE*);
|
2007-01-27 10:50:11 +01:00
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64 (FILE*, __int64, int);
|
|
|
|
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64 (FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fseeki64_nolock (FILE*, __int64, int);
|
|
|
|
_CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64_nolock (FILE*);
|
2007-01-27 10:50:11 +01:00
|
|
|
#endif
|
|
|
|
|
2002-06-13 12:20:48 +02:00
|
|
|
#ifdef __USE_MINGW_FSEEK /* These are in libmingwex.a */
|
|
|
|
/*
|
|
|
|
* Workaround for limitations on win9x where a file contents are
|
|
|
|
* not zero'd out if you seek past the end and then write.
|
|
|
|
*/
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW __mingw_fseek (FILE *, long, int);
|
|
|
|
size_t __cdecl __MINGW_NOTHROW __mingw_fwrite (const void*, size_t, size_t, FILE*);
|
2002-06-13 12:20:48 +02:00
|
|
|
#define fseek(fp, offset, whence) __mingw_fseek(fp, offset, whence)
|
|
|
|
#define fwrite(buffer, size, count, fp) __mingw_fwrite(buffer, size, count, fp)
|
|
|
|
#endif /* __USE_MINGW_FSEEK */
|
|
|
|
|
2000-02-17 20:38:33 +01:00
|
|
|
/*
|
|
|
|
* An opaque data type used for storing file positions... The contents of
|
|
|
|
* this type are unknown, but we (the compiler) need to know the size
|
|
|
|
* because the programmer using fgetpos and fsetpos will be setting aside
|
|
|
|
* storage for fpos_t structres. Actually I tested using a byte array and
|
|
|
|
* it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
|
|
|
|
* Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
|
|
|
|
* MSVCRT however, and for now `long long' will do.
|
|
|
|
*/
|
|
|
|
#ifdef __MSVCRT__
|
|
|
|
typedef long long fpos_t;
|
|
|
|
#else
|
|
|
|
typedef long fpos_t;
|
|
|
|
#endif
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fgetpos (FILE*, fpos_t*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fsetpos (FILE*, const fpos_t*);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Error Functions
|
|
|
|
*/
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW feof (FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW ferror (FILE*);
|
2004-02-02 10:18:40 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2007-06-23 09:34:16 +02:00
|
|
|
inline int __cdecl __MINGW_NOTHROW feof (FILE* __F)
|
2004-02-02 10:18:40 +01:00
|
|
|
{ return __F->_flag & _IOEOF; }
|
2007-06-23 09:34:16 +02:00
|
|
|
inline int __cdecl __MINGW_NOTHROW ferror (FILE* __F)
|
2004-02-02 10:18:40 +01:00
|
|
|
{ return __F->_flag & _IOERR; }
|
|
|
|
#else
|
|
|
|
#define feof(__F) ((__F)->_flag & _IOEOF)
|
|
|
|
#define ferror(__F) ((__F)->_flag & _IOERR)
|
|
|
|
#endif
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP void __cdecl __MINGW_NOTHROW clearerr (FILE*);
|
|
|
|
_CRTIMP void __cdecl __MINGW_NOTHROW perror (const char*);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef __STRICT_ANSI__
|
|
|
|
/*
|
|
|
|
* Pipes
|
|
|
|
*/
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _popen (const char*, const char*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _pclose (FILE*);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
#ifndef NO_OLDNAMES
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW popen (const char*, const char*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW pclose (FILE*);
|
2000-02-17 20:38:33 +01:00
|
|
|
#endif
|
|
|
|
|
2000-11-21 03:50:03 +01:00
|
|
|
/*
|
|
|
|
* Other Non ANSI functions
|
|
|
|
*/
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _flushall (void);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fgetchar (void);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fputchar (int);
|
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _fdopen (int, const char*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fileno (FILE*);
|
2008-07-02 00:57:24 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _fcloseall (void);
|
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _fsopen (const char*, const char*, int);
|
2002-10-30 02:07:54 +01:00
|
|
|
#ifdef __MSVCRT__
|
2008-07-02 00:57:24 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _getmaxstdio (void);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _setmaxstdio (int);
|
2002-10-30 02:07:54 +01:00
|
|
|
#endif
|
2000-11-21 03:50:03 +01:00
|
|
|
|
2007-01-26 09:20:54 +01:00
|
|
|
#if __MSVCRT_VERSION__ >= 0x800
|
2008-07-02 00:57:24 +02:00
|
|
|
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _get_output_format (void);
|
|
|
|
_CRTIMP unsigned int __cdecl __MINGW_NOTHROW _set_output_format (unsigned int);
|
|
|
|
|
|
|
|
#define _TWO_DIGIT_EXPONENT 1
|
|
|
|
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _get_printf_count_output (void);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _set_printf_count_output (int);
|
2007-01-26 09:20:54 +01:00
|
|
|
#endif
|
|
|
|
|
2000-11-21 03:50:03 +01:00
|
|
|
#ifndef _NO_OLDNAMES
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fgetchar (void);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fputchar (int);
|
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW fdopen (int, const char*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fileno (FILE*);
|
2003-12-13 22:22:34 +01:00
|
|
|
#endif /* Not _NO_OLDNAMES */
|
2003-09-24 10:26:23 +02:00
|
|
|
|
2003-12-13 22:22:34 +01:00
|
|
|
#define _fileno(__F) ((__F)->_file)
|
|
|
|
#ifndef _NO_OLDNAMES
|
2003-09-24 10:26:23 +02:00
|
|
|
#define fileno(__F) ((__F)->_file)
|
2003-12-13 22:22:34 +01:00
|
|
|
#endif
|
2000-11-21 03:50:03 +01:00
|
|
|
|
2004-06-30 06:51:18 +02:00
|
|
|
#if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS)
|
|
|
|
#include <sys/types.h>
|
2007-06-23 09:34:16 +02:00
|
|
|
__CRT_INLINE FILE* __cdecl __MINGW_NOTHROW fopen64 (const char* filename, const char* mode)
|
2004-06-30 06:51:18 +02:00
|
|
|
{
|
|
|
|
return fopen (filename, mode);
|
|
|
|
}
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW fseeko64 (FILE*, off64_t, int);
|
2004-06-30 06:51:18 +02:00
|
|
|
|
|
|
|
#ifdef __USE_MINGW_FSEEK
|
2007-06-23 09:34:16 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW __mingw_fseeko64 (FILE *, off64_t, int);
|
2004-06-30 06:51:18 +02:00
|
|
|
#define fseeko64(fp, offset, whence) __mingw_fseeko64(fp, offset, whence)
|
|
|
|
#endif
|
|
|
|
|
2007-06-23 09:34:16 +02:00
|
|
|
__CRT_INLINE off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE * stream)
|
2004-06-30 06:51:18 +02:00
|
|
|
{
|
|
|
|
fpos_t pos;
|
|
|
|
if (fgetpos(stream, &pos))
|
|
|
|
return -1LL;
|
|
|
|
else
|
|
|
|
return ((off64_t) pos);
|
|
|
|
}
|
|
|
|
#endif /* __NO_MINGW_LFS */
|
|
|
|
|
2000-11-21 03:50:03 +01:00
|
|
|
#endif /* Not __STRICT_ANSI__ */
|
|
|
|
|
|
|
|
/* Wide versions */
|
|
|
|
|
|
|
|
#ifndef _WSTDIO_DEFINED
|
|
|
|
/* also in wchar.h - keep in sync */
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fwprintf (FILE*, const wchar_t*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW wprintf (const wchar_t*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW vfwprintf (FILE*, const wchar_t*, __VALIST);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW vwprintf (const wchar_t*, __VALIST);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
|
2010-03-07 04:08:35 +01:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _vscwprintf (const wchar_t*, __VALIST);
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fwscanf (FILE*, const wchar_t*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW wscanf (const wchar_t*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW swscanf (const wchar_t*, const wchar_t*, ...);
|
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwc (FILE*);
|
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwc (wchar_t, FILE*);
|
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW ungetwc (wchar_t, FILE*);
|
2003-03-02 08:00:48 +01:00
|
|
|
|
2008-07-04 05:55:50 +02:00
|
|
|
/* These differ from the ISO C prototypes, which have a maxlen parameter (like snprintf). */
|
|
|
|
#ifndef __STRICT_ANSI__
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW swprintf (wchar_t*, const wchar_t*, ...);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW vswprintf (wchar_t*, const wchar_t*, __VALIST);
|
|
|
|
#endif
|
|
|
|
|
2000-11-21 03:50:03 +01:00
|
|
|
#ifdef __MSVCRT__
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW fputws (const wchar_t*, FILE*);
|
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwc (FILE*);
|
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW getwchar (void);
|
|
|
|
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
|
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwc (wint_t, FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _putws (const wchar_t*);
|
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW putwchar (wint_t);
|
2008-06-14 11:13:38 +02:00
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfdopen(int, const wchar_t *);
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfopen (const wchar_t*, const wchar_t*);
|
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfreopen (const wchar_t*, const wchar_t*, FILE*);
|
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wfsopen (const wchar_t*, const wchar_t*, int);
|
|
|
|
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*);
|
|
|
|
_CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _wrename (const wchar_t*, const wchar_t*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _wremove (const wchar_t*);
|
|
|
|
_CRTIMP void __cdecl __MINGW_NOTHROW _wperror (const wchar_t*);
|
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW _wpopen (const wchar_t*, const wchar_t*);
|
2000-11-21 03:50:03 +01:00
|
|
|
#endif /* __MSVCRT__ */
|
2002-06-13 12:20:48 +02:00
|
|
|
|
|
|
|
#ifndef __NO_ISOCEXT /* externs in libmingwex.a */
|
2007-06-23 09:34:16 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...);
|
2009-08-08 Danny Smith <dannysmith@users.sourceforge.net>
* include/math.h (__fpclassifyl, __isnan, __isnanf, isnanl, __signbit,
__signbitf, __signbitl, sinhf, tanhf, expf, frexpf, ldexpf, hypotf, powf,
__fp_unordered_compare): Add prototypes.
* include/stdio.h (vsnwprintf): Add prototype.
* include/wchar.h (vsnwprintf): Add prototype.
* include/unistd.h (ftruncate): Move prototype out of __NO_INLINE__ guard.
2009-08-08 15:26:11 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg);
|
2009-07-18 17:19:03 +02:00
|
|
|
#ifndef __NO_INLINE__
|
2007-06-23 09:34:16 +02:00
|
|
|
__CRT_INLINE int __cdecl __MINGW_NOTHROW
|
2002-06-13 12:20:48 +02:00
|
|
|
vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
|
|
|
|
{ return _vsnwprintf ( s, n, format, arg);}
|
2009-07-18 17:19:03 +02:00
|
|
|
#endif
|
2007-06-23 09:34:16 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST);
|
|
|
|
int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__,
|
2003-03-02 08:00:48 +01:00
|
|
|
const wchar_t * __restrict__, __VALIST);
|
2007-06-23 09:34:16 +02:00
|
|
|
int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
|
2003-03-02 08:00:48 +01:00
|
|
|
const wchar_t * __restrict__, __VALIST);
|
2002-06-13 12:20:48 +02:00
|
|
|
#endif
|
|
|
|
|
2000-11-21 03:50:03 +01:00
|
|
|
#define _WSTDIO_DEFINED
|
|
|
|
#endif /* _WSTDIO_DEFINED */
|
2000-02-17 20:38:33 +01:00
|
|
|
|
2000-11-21 03:50:03 +01:00
|
|
|
#ifndef __STRICT_ANSI__
|
|
|
|
#ifdef __MSVCRT__
|
2000-02-17 20:38:33 +01:00
|
|
|
#ifndef NO_OLDNAMES
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP FILE* __cdecl __MINGW_NOTHROW wpopen (const wchar_t*, const wchar_t*);
|
2000-02-17 20:38:33 +01:00
|
|
|
#endif /* not NO_OLDNAMES */
|
|
|
|
#endif /* MSVCRT runtime */
|
|
|
|
|
|
|
|
/*
|
2000-11-21 03:50:03 +01:00
|
|
|
* Other Non ANSI wide functions
|
2000-02-17 20:38:33 +01:00
|
|
|
*/
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fgetwchar (void);
|
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW _fputwchar (wint_t);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _getw (FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW _putw (int, FILE*);
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
#ifndef _NO_OLDNAMES
|
2007-06-23 09:34:16 +02:00
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fgetwchar (void);
|
|
|
|
_CRTIMP wint_t __cdecl __MINGW_NOTHROW fputwchar (wint_t);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW getw (FILE*);
|
|
|
|
_CRTIMP int __cdecl __MINGW_NOTHROW putw (int, FILE*);
|
2000-02-17 20:38:33 +01:00
|
|
|
#endif /* Not _NO_OLDNAMES */
|
|
|
|
|
2000-11-21 03:50:03 +01:00
|
|
|
#endif /* __STRICT_ANSI */
|
2000-02-17 20:38:33 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* Not RC_INVOKED */
|
|
|
|
|
|
|
|
#endif /* _STDIO_H_ */
|