Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

fg

By: a guest on May 15th, 2010  |  syntax: None  |  size: 17.15 KB  |  views: 132  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /*
  2.  * stdio.h
  3.  * This file has no copyright assigned and is placed in the Public Domain.
  4.  * This file is a part of the mingw-runtime package.
  5.  * No warranty is given; refer to the file DISCLAIMER within the package.
  6.  *
  7.  * Definitions of types and prototypes of functions for standard input and
  8.  * output.
  9.  *
  10.  * NOTE: The file manipulation functions provided by Microsoft seem to
  11.  * work with either slash (/) or backslash (\) as the directory separator.
  12.  *
  13.  */
  14.  
  15. #ifndef _STDIO_H_
  16. #define _STDIO_H_
  17.  
  18. /* All the headers include this file. */
  19. #include <_mingw.h>
  20.  
  21. #ifndef RC_INVOKED
  22. #define __need_size_t
  23. #define __need_NULL
  24. #define __need_wchar_t
  25. #define __need_wint_t
  26. #include <stddef.h>
  27. #define __need___va_list
  28. #include <stdarg.h>
  29. #endif  /* Not RC_INVOKED */
  30.  
  31.  
  32. /* Flags for the iobuf structure  */
  33. #define _IOREAD 1 /* currently reading */
  34. #define _IOWRT  2 /* currently writing */
  35. #define _IORW   0x0080 /* opened as "r+w" */
  36.  
  37.  
  38. /*
  39.  * The three standard file pointers provided by the run time library.
  40.  * NOTE: These will go to the bit-bucket silently in GUI applications!
  41.  */
  42. #define STDIN_FILENO    0
  43. #define STDOUT_FILENO   1
  44. #define STDERR_FILENO   2
  45.  
  46. /* Returned by various functions on end of file condition or error. */
  47. #define EOF     (-1)
  48.  
  49. /*
  50.  * The maximum length of a file name. You should use GetVolumeInformation
  51.  * instead of this constant. But hey, this works.
  52.  * Also defined in io.h.
  53.  */
  54. #ifndef FILENAME_MAX
  55. #define FILENAME_MAX    (260)
  56. #endif
  57.  
  58. /*
  59.  * The maximum number of files that may be open at once. I have set this to
  60.  * a conservative number. The actual value may be higher.
  61.  */
  62. #define FOPEN_MAX       (20)
  63.  
  64. /* After creating this many names, tmpnam and tmpfile return NULL */
  65. #define TMP_MAX 32767
  66. /*
  67.  * Tmpnam, tmpfile and, sometimes, _tempnam try to create
  68.  * temp files in the root directory of the current drive
  69.  * (not in pwd, as suggested by some older MS doc's).
  70.  * Redefining these macros does not effect the CRT functions.
  71.  */
  72. #define _P_tmpdir   "\\"
  73. #ifndef __STRICT_ANSI__
  74. #define P_tmpdir _P_tmpdir
  75. #endif
  76. #define _wP_tmpdir  L"\\"
  77.  
  78. /*
  79.  * The maximum size of name (including NUL) that will be put in the user
  80.  * supplied buffer caName for tmpnam.
  81.  * Inferred from the size of the static buffer returned by tmpnam
  82.  * when passed a NULL argument. May actually be smaller.
  83.  */
  84. #define L_tmpnam (16)
  85.  
  86. #define _IOFBF    0x0000  /* full buffered */
  87. #define _IOLBF    0x0040  /* line buffered */
  88. #define _IONBF    0x0004  /* not buffered */
  89.  
  90. #define _IOMYBUF  0x0008  /* stdio malloc()'d buffer */
  91. #define _IOEOF    0x0010  /* EOF reached on read */
  92. #define _IOERR    0x0020  /* I/O error from system */
  93. #define _IOSTRG   0x0040  /* Strange or no file descriptor */
  94. #ifdef _POSIX_SOURCE
  95. # define _IOAPPEND 0x0200
  96. #endif
  97. /*
  98.  * The buffer size as used by setbuf such that it is equivalent to
  99.  * (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
  100.  */
  101. #define BUFSIZ  512
  102.  
  103. /* Constants for nOrigin indicating the position relative to which fseek
  104.  * sets the file position.  Defined unconditionally since ISO and POSIX
  105.  * say they are defined here.  */
  106. #define SEEK_SET 0
  107. #define SEEK_CUR 1
  108. #define SEEK_END 2
  109.  
  110. #ifndef RC_INVOKED
  111.  
  112. #ifndef __VALIST
  113. #ifdef __GNUC__
  114. #define __VALIST __gnuc_va_list
  115. #else
  116. #define __VALIST char*
  117. #endif
  118. #endif /* defined __VALIST  */
  119.  
  120. /*
  121.  * The structure underlying the FILE type.
  122.  *
  123.  * Some believe that nobody in their right mind should make use of the
  124.  * internals of this structure. Provided by Pedro A. Aranda Gutiirrez
  125.  * <paag@tid.es>.
  126.  */
  127. #ifndef _FILE_DEFINED
  128. #define _FILE_DEFINED
  129. typedef struct _iobuf
  130. {
  131.         char*   _ptr;
  132.         int     _cnt;
  133.         char*   _base;
  134.         int     _flag;
  135.         int     _file;
  136.         int     _charbuf;
  137.         int     _bufsiz;
  138.         char*   _tmpfname;
  139. } FILE;
  140. #endif  /* Not _FILE_DEFINED */
  141.  
  142.  
  143. /*
  144.  * The standard file handles
  145.  */
  146. #ifndef __DECLSPEC_SUPPORTED
  147.  
  148. extern FILE (*_imp___iob)[];    /* A pointer to an array of FILE */
  149.  
  150. #define _iob    (*_imp___iob)   /* An array of FILE */
  151.  
  152. #else /* __DECLSPEC_SUPPORTED */
  153.  
  154. __MINGW_IMPORT FILE _iob[];     /* An array of FILE imported from DLL. */
  155.  
  156. #endif /* __DECLSPEC_SUPPORTED */
  157.  
  158. #define stdin   (&_iob[STDIN_FILENO])
  159. #define stdout  (&_iob[STDOUT_FILENO])
  160. #define stderr  (&_iob[STDERR_FILENO])
  161.  
  162. #ifdef __cplusplus
  163. extern "C" {
  164. #endif
  165.  
  166. /*
  167.  * File Operations
  168.  */
  169. _CRTIMP FILE* __cdecl __MINGW_NOTHROW fopen (const char*, const char*);
  170. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   freopen (const char*, const char*, FILE*);
  171. _CRTIMP int __cdecl __MINGW_NOTHROW     fflush (FILE*);
  172. _CRTIMP int __cdecl __MINGW_NOTHROW     fclose (FILE*);
  173. /* MS puts remove & rename (but not wide versions) in io.h  also */
  174. _CRTIMP int __cdecl __MINGW_NOTHROW     remove (const char*);
  175. _CRTIMP int __cdecl __MINGW_NOTHROW     rename (const char*, const char*);
  176. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   tmpfile (void);
  177. _CRTIMP char* __cdecl __MINGW_NOTHROW   tmpnam (char*);
  178.  
  179. #ifndef __STRICT_ANSI__
  180. _CRTIMP char* __cdecl __MINGW_NOTHROW   _tempnam (const char*, const char*);
  181. _CRTIMP int __cdecl __MINGW_NOTHROW     _rmtmp(void);
  182. _CRTIMP int __cdecl __MINGW_NOTHROW     _unlink (const char*);
  183.  
  184. #ifndef NO_OLDNAMES
  185. _CRTIMP char* __cdecl __MINGW_NOTHROW   tempnam (const char*, const char*);
  186. _CRTIMP int __cdecl __MINGW_NOTHROW     rmtmp(void);
  187. _CRTIMP int __cdecl __MINGW_NOTHROW     unlink (const char*);
  188. #endif
  189. #endif /* __STRICT_ANSI__ */
  190.  
  191. _CRTIMP int __cdecl __MINGW_NOTHROW     setvbuf (FILE*, char*, int, size_t);
  192.  
  193. _CRTIMP void __cdecl __MINGW_NOTHROW    setbuf (FILE*, char*);
  194.  
  195. /*
  196.  * Formatted Output
  197.  */
  198.  
  199. _CRTIMP int __cdecl __MINGW_NOTHROW     fprintf (FILE*, const char*, ...);
  200. _CRTIMP int __cdecl __MINGW_NOTHROW     printf (const char*, ...);
  201. _CRTIMP int __cdecl __MINGW_NOTHROW     sprintf (char*, const char*, ...);
  202. _CRTIMP int __cdecl __MINGW_NOTHROW     _snprintf (char*, size_t, const char*, ...);
  203. _CRTIMP int __cdecl __MINGW_NOTHROW     vfprintf (FILE*, const char*, __VALIST);
  204. _CRTIMP int __cdecl __MINGW_NOTHROW     vprintf (const char*, __VALIST);
  205. _CRTIMP int __cdecl __MINGW_NOTHROW     vsprintf (char*, const char*, __VALIST);
  206. _CRTIMP int __cdecl __MINGW_NOTHROW     _vsnprintf (char*, size_t, const char*, __VALIST);
  207.  
  208. #ifndef __NO_ISOCEXT  /* externs in libmingwex.a */
  209. /*
  210.  * Microsoft does not provide implementations for the following,
  211.  * which are required by C99.  Note in particular that the corresponding
  212.  * Microsoft implementations of _snprintf() and _vsnprintf() are *not*
  213.  * compatible with C99, but the following are; if you want the MSVCRT
  214.  * behaviour, you *must* use the Microsoft uglified names.
  215.  */
  216. int __cdecl __MINGW_NOTHROW snprintf(char *, size_t, const char *, ...);
  217. int __cdecl __MINGW_NOTHROW vsnprintf (char *, size_t, const char *, __VALIST);
  218.  
  219. int __cdecl __MINGW_NOTHROW vscanf (const char * __restrict__, __VALIST);
  220. int __cdecl __MINGW_NOTHROW vfscanf (FILE * __restrict__, const char * __restrict__,
  221.                      __VALIST);
  222. int __cdecl __MINGW_NOTHROW vsscanf (const char * __restrict__,
  223.                      const char * __restrict__, __VALIST);
  224.  
  225. #endif  /* !__NO_ISOCEXT */
  226.  
  227. /*
  228.  * Formatted Input
  229.  */
  230.  
  231. _CRTIMP int __cdecl __MINGW_NOTHROW     fscanf (FILE*, const char*, ...);
  232. _CRTIMP int __cdecl __MINGW_NOTHROW     scanf (const char*, ...);
  233. _CRTIMP int __cdecl __MINGW_NOTHROW     sscanf (const char*, const char*, ...);
  234. /*
  235.  * Character Input and Output Functions
  236.  */
  237.  
  238. _CRTIMP int __cdecl __MINGW_NOTHROW     fgetc (FILE*);
  239. _CRTIMP char* __cdecl __MINGW_NOTHROW   fgets (char*, int, FILE*);
  240. _CRTIMP int __cdecl __MINGW_NOTHROW     fputc (int, FILE*);
  241. _CRTIMP int __cdecl __MINGW_NOTHROW     fputs (const char*, FILE*);
  242. _CRTIMP char* __cdecl __MINGW_NOTHROW   gets (char*);
  243. _CRTIMP int __cdecl __MINGW_NOTHROW     puts (const char*);
  244. _CRTIMP int __cdecl __MINGW_NOTHROW     ungetc (int, FILE*);
  245.  
  246. /* Traditionally, getc and putc are defined as macros. but the
  247.    standard doesn't say that they must be macros.
  248.    We use inline functions here to allow the fast versions
  249.    to be used in C++ with namespace qualification, eg., ::getc.
  250.  
  251.    _filbuf and _flsbuf  are not thread-safe. */
  252. _CRTIMP int __cdecl __MINGW_NOTHROW     _filbuf (FILE*);
  253. _CRTIMP int __cdecl __MINGW_NOTHROW     _flsbuf (int, FILE*);
  254.  
  255. #if !defined _MT
  256.  
  257. __CRT_INLINE int __cdecl __MINGW_NOTHROW getc (FILE* __F)
  258. {
  259.   return (--__F->_cnt >= 0)
  260.     ?  (int) (unsigned char) *__F->_ptr++
  261.     : _filbuf (__F);
  262. }
  263.  
  264. __CRT_INLINE int __cdecl __MINGW_NOTHROW putc (int __c, FILE* __F)
  265. {
  266.   return (--__F->_cnt >= 0)
  267.     ?  (int) (unsigned char) (*__F->_ptr++ = (char)__c)
  268.     :  _flsbuf (__c, __F);
  269. }
  270.  
  271. __CRT_INLINE int __cdecl __MINGW_NOTHROW getchar (void)
  272. {
  273.   return (--stdin->_cnt >= 0)
  274.     ?  (int) (unsigned char) *stdin->_ptr++
  275.     : _filbuf (stdin);
  276. }
  277.  
  278. __CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int __c)
  279. {
  280.   return (--stdout->_cnt >= 0)
  281.     ?  (int) (unsigned char) (*stdout->_ptr++ = (char)__c)
  282.     :  _flsbuf (__c, stdout);}
  283.  
  284. #else  /* Use library functions.  */
  285.  
  286. _CRTIMP int __cdecl __MINGW_NOTHROW     getc (FILE*);
  287. _CRTIMP int __cdecl __MINGW_NOTHROW     putc (int, FILE*);
  288. _CRTIMP int __cdecl __MINGW_NOTHROW     getchar (void);
  289. _CRTIMP int __cdecl __MINGW_NOTHROW     putchar (int);
  290.  
  291. #endif
  292.  
  293. /*
  294.  * Direct Input and Output Functions
  295.  */
  296.  
  297. _CRTIMP size_t __cdecl __MINGW_NOTHROW  fread (void*, size_t, size_t, FILE*);
  298. _CRTIMP size_t __cdecl __MINGW_NOTHROW  fwrite (const void*, size_t, size_t, FILE*);
  299.  
  300. /*
  301.  * File Positioning Functions
  302.  */
  303.  
  304. _CRTIMP int __cdecl __MINGW_NOTHROW     fseek (FILE*, long, int);
  305. _CRTIMP long __cdecl __MINGW_NOTHROW    ftell (FILE*);
  306. _CRTIMP void __cdecl __MINGW_NOTHROW    rewind (FILE*);
  307.  
  308. #if __MSVCRT_VERSION__ >= 0x800
  309. _CRTIMP int __cdecl __MINGW_NOTHROW     _fseek_nolock (FILE*, long, int);
  310. _CRTIMP long __cdecl __MINGW_NOTHROW    _ftell_nolock (FILE*);
  311.  
  312. _CRTIMP int __cdecl __MINGW_NOTHROW     _fseeki64 (FILE*, __int64, int);
  313. _CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64 (FILE*);
  314. _CRTIMP int __cdecl __MINGW_NOTHROW     _fseeki64_nolock (FILE*, __int64, int);
  315. _CRTIMP __int64 __cdecl __MINGW_NOTHROW _ftelli64_nolock (FILE*);
  316. #endif
  317.  
  318. #ifdef __USE_MINGW_FSEEK  /* These are in libmingwex.a */
  319. /*
  320.  * Workaround for limitations on win9x where a file contents are
  321.  * not zero'd out if you seek past the end and then write.
  322.  */
  323.  
  324. int __cdecl __MINGW_NOTHROW __mingw_fseek (FILE *, long, int);
  325. size_t __cdecl __MINGW_NOTHROW __mingw_fwrite (const void*, size_t, size_t, FILE*);
  326. #define fseek(fp, offset, whence)  __mingw_fseek(fp, offset, whence)
  327. #define fwrite(buffer, size, count, fp)  __mingw_fwrite(buffer, size, count, fp)
  328. #endif /* __USE_MINGW_FSEEK */
  329.  
  330. /*
  331.  * An opaque data type used for storing file positions... The contents of
  332.  * this type are unknown, but we (the compiler) need to know the size
  333.  * because the programmer using fgetpos and fsetpos will be setting aside
  334.  * storage for fpos_t structres. Actually I tested using a byte array and
  335.  * it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
  336.  * Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
  337.  * MSVCRT however, and for now `long long' will do.
  338.  */
  339. #ifdef __MSVCRT__
  340. typedef long long fpos_t;
  341. #else
  342. typedef long    fpos_t;
  343. #endif
  344.  
  345. _CRTIMP int __cdecl __MINGW_NOTHROW     fgetpos (FILE*, fpos_t*);
  346. _CRTIMP int __cdecl __MINGW_NOTHROW     fsetpos (FILE*, const fpos_t*);
  347.  
  348. /*
  349.  * Error Functions
  350.  */
  351.  
  352. _CRTIMP int __cdecl __MINGW_NOTHROW     feof (FILE*);
  353. _CRTIMP int __cdecl __MINGW_NOTHROW     ferror (FILE*);
  354.  
  355. #ifdef __cplusplus
  356. inline int __cdecl __MINGW_NOTHROW feof (FILE* __F)
  357.   { return __F->_flag & _IOEOF; }
  358. inline int __cdecl __MINGW_NOTHROW ferror (FILE* __F)
  359.   { return __F->_flag & _IOERR; }
  360. #else
  361. #define feof(__F)     ((__F)->_flag & _IOEOF)
  362. #define ferror(__F)   ((__F)->_flag & _IOERR)
  363. #endif
  364.  
  365. _CRTIMP void __cdecl __MINGW_NOTHROW    clearerr (FILE*);
  366. _CRTIMP void __cdecl __MINGW_NOTHROW    perror (const char*);
  367.  
  368.  
  369. #ifndef __STRICT_ANSI__
  370. /*
  371.  * Pipes
  372.  */
  373. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   _popen (const char*, const char*);
  374. _CRTIMP int __cdecl __MINGW_NOTHROW     _pclose (FILE*);
  375.  
  376. #ifndef NO_OLDNAMES
  377. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   popen (const char*, const char*);
  378. _CRTIMP int __cdecl __MINGW_NOTHROW     pclose (FILE*);
  379. #endif
  380.  
  381. /*
  382.  * Other Non ANSI functions
  383.  */
  384. _CRTIMP int __cdecl __MINGW_NOTHROW     _flushall (void);
  385. _CRTIMP int __cdecl __MINGW_NOTHROW     _fgetchar (void);
  386. _CRTIMP int __cdecl __MINGW_NOTHROW     _fputchar (int);
  387. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   _fdopen (int, const char*);
  388. _CRTIMP int __cdecl __MINGW_NOTHROW     _fileno (FILE*);
  389. _CRTIMP int __cdecl __MINGW_NOTHROW     _fcloseall(void);
  390. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   _fsopen(const char*, const char*, int);
  391. #ifdef __MSVCRT__
  392. _CRTIMP int __cdecl __MINGW_NOTHROW     _getmaxstdio(void);
  393. _CRTIMP int __cdecl __MINGW_NOTHROW     _setmaxstdio(int);
  394. #endif
  395.  
  396. #if __MSVCRT_VERSION__ >= 0x800
  397. _CRTIMP int __cdecl __MINGW_NOTHROW _set_printf_count_output(int);
  398. _CRTIMP int __cdecl __MINGW_NOTHROW _get_printf_count_output(void);
  399. #endif
  400.  
  401. #ifndef _NO_OLDNAMES
  402. _CRTIMP int __cdecl __MINGW_NOTHROW     fgetchar (void);
  403. _CRTIMP int __cdecl __MINGW_NOTHROW     fputchar (int);
  404. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   fdopen (int, const char*);
  405. _CRTIMP int __cdecl __MINGW_NOTHROW     fileno (FILE*);
  406. #endif  /* Not _NO_OLDNAMES */
  407.  
  408. #define _fileno(__F) ((__F)->_file)
  409. #ifndef _NO_OLDNAMES
  410. #define fileno(__F) ((__F)->_file)
  411. #endif
  412.  
  413. #if defined (__MSVCRT__) && !defined (__NO_MINGW_LFS)
  414. #include <sys/types.h>
  415. __CRT_INLINE FILE* __cdecl __MINGW_NOTHROW fopen64 (const char* filename, const char* mode)
  416. {
  417.   return fopen (filename, mode);
  418. }
  419.  
  420. int __cdecl __MINGW_NOTHROW fseeko64 (FILE*, off64_t, int);
  421.  
  422. #ifdef __USE_MINGW_FSEEK
  423. int __cdecl __MINGW_NOTHROW __mingw_fseeko64 (FILE *, off64_t, int);
  424. #define fseeko64(fp, offset, whence)  __mingw_fseeko64(fp, offset, whence)
  425. #endif
  426.  
  427. __CRT_INLINE off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE * stream)
  428. {
  429.   fpos_t pos;
  430.   if (fgetpos(stream, &pos))
  431.     return  -1LL;
  432.   else
  433.    return ((off64_t) pos);
  434. }
  435. #endif /* __NO_MINGW_LFS */
  436.  
  437. #endif  /* Not __STRICT_ANSI__ */
  438.  
  439. /* Wide  versions */
  440.  
  441. #ifndef _WSTDIO_DEFINED
  442. /*  also in wchar.h - keep in sync */
  443. _CRTIMP int __cdecl __MINGW_NOTHROW     fwprintf (FILE*, const wchar_t*, ...);
  444. _CRTIMP int __cdecl __MINGW_NOTHROW     wprintf (const wchar_t*, ...);
  445. _CRTIMP int __cdecl __MINGW_NOTHROW     swprintf (wchar_t*, const wchar_t*, ...);
  446. _CRTIMP int __cdecl __MINGW_NOTHROW     _snwprintf (wchar_t*, size_t, const wchar_t*, ...);
  447. _CRTIMP int __cdecl __MINGW_NOTHROW     vfwprintf (FILE*, const wchar_t*, __VALIST);
  448. _CRTIMP int __cdecl __MINGW_NOTHROW     vwprintf (const wchar_t*, __VALIST);
  449. _CRTIMP int __cdecl __MINGW_NOTHROW     vswprintf (wchar_t*, const wchar_t*, __VALIST);
  450. _CRTIMP int __cdecl __MINGW_NOTHROW     _vsnwprintf (wchar_t*, size_t, const wchar_t*, __VALIST);
  451. _CRTIMP int __cdecl __MINGW_NOTHROW     fwscanf (FILE*, const wchar_t*, ...);
  452. _CRTIMP int __cdecl __MINGW_NOTHROW     wscanf (const wchar_t*, ...);
  453. _CRTIMP int __cdecl __MINGW_NOTHROW     swscanf (const wchar_t*, const wchar_t*, ...);
  454. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  fgetwc (FILE*);
  455. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  fputwc (wchar_t, FILE*);
  456. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  ungetwc (wchar_t, FILE*);
  457.  
  458. #ifdef __MSVCRT__
  459. _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW fgetws (wchar_t*, int, FILE*);
  460. _CRTIMP int __cdecl __MINGW_NOTHROW     fputws (const wchar_t*, FILE*);
  461. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  getwc (FILE*);
  462. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  getwchar (void);
  463. _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _getws (wchar_t*);
  464. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  putwc (wint_t, FILE*);
  465. _CRTIMP int __cdecl __MINGW_NOTHROW     _putws (const wchar_t*);
  466. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  putwchar (wint_t);
  467. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   _wfdopen(int, wchar_t *);
  468. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   _wfopen (const wchar_t*, const wchar_t*);
  469. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   _wfreopen (const wchar_t*, const wchar_t*, FILE*);
  470. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   _wfsopen (const wchar_t*, const wchar_t*, int);
  471. _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtmpnam (wchar_t*);
  472. _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wtempnam (const wchar_t*, const wchar_t*);
  473. _CRTIMP int __cdecl __MINGW_NOTHROW     _wrename (const wchar_t*, const wchar_t*);
  474. _CRTIMP int __cdecl __MINGW_NOTHROW     _wremove (const wchar_t*);
  475. _CRTIMP void __cdecl __MINGW_NOTHROW    _wperror (const wchar_t*);
  476. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   _wpopen (const wchar_t*, const wchar_t*);
  477. #endif  /* __MSVCRT__ */
  478.  
  479. #ifndef __NO_ISOCEXT  /* externs in libmingwex.a */
  480. int __cdecl __MINGW_NOTHROW snwprintf (wchar_t* s, size_t n, const wchar_t*  format, ...);
  481. __CRT_INLINE int __cdecl __MINGW_NOTHROW
  482. vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, __VALIST arg)
  483.   { return _vsnwprintf ( s, n, format, arg);}
  484. int __cdecl __MINGW_NOTHROW vwscanf (const wchar_t * __restrict__, __VALIST);
  485. int __cdecl __MINGW_NOTHROW vfwscanf (FILE * __restrict__,
  486.                        const wchar_t * __restrict__, __VALIST);
  487. int __cdecl __MINGW_NOTHROW vswscanf (const wchar_t * __restrict__,
  488.                        const wchar_t * __restrict__, __VALIST);
  489. #endif
  490.  
  491. #define _WSTDIO_DEFINED
  492. #endif /* _WSTDIO_DEFINED */
  493.  
  494. #ifndef __STRICT_ANSI__
  495. #ifdef __MSVCRT__
  496. #ifndef NO_OLDNAMES
  497. _CRTIMP FILE* __cdecl __MINGW_NOTHROW   wpopen (const wchar_t*, const wchar_t*);
  498. #endif /* not NO_OLDNAMES */
  499. #endif /* MSVCRT runtime */
  500.  
  501. /*
  502.  * Other Non ANSI wide functions
  503.  */
  504. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  _fgetwchar (void);
  505. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  _fputwchar (wint_t);
  506. _CRTIMP int __cdecl __MINGW_NOTHROW     _getw (FILE*);
  507. _CRTIMP int __cdecl __MINGW_NOTHROW     _putw (int, FILE*);
  508.  
  509. #ifndef _NO_OLDNAMES
  510. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  fgetwchar (void);
  511. _CRTIMP wint_t __cdecl __MINGW_NOTHROW  fputwchar (wint_t);
  512. _CRTIMP int __cdecl __MINGW_NOTHROW     getw (FILE*);
  513. _CRTIMP int __cdecl __MINGW_NOTHROW     putw (int, FILE*);
  514. #endif  /* Not _NO_OLDNAMES */
  515.  
  516. #endif /* __STRICT_ANSI */
  517.  
  518. #ifdef __cplusplus
  519. }
  520. #endif
  521.  
  522. #endif  /* Not RC_INVOKED */
  523.  
  524. #endif /* _STDIO_H_ */