OSDN Git Service

Add typedef and access support for opaque locale_t objects.
[mingw/mingw-org-wsl.git] / mingwrt / include / stdio.h
1 /*
2  * stdio.h
3  *
4  * Definitions of types and prototypes of functions for operations on
5  * standard input and standard output streams.
6  *
7  * $Id$
8  *
9  * Written by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
10  * Copyright (C) 1997-2005, 2007-2010, 2014-2016, MinGW.org Project.
11  *
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a
14  * copy of this software and associated documentation files (the "Software"),
15  * to deal in the Software without restriction, including without limitation
16  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  * and/or sell copies of the Software, and to permit persons to whom the
18  * Software is furnished to do so, subject to the following conditions:
19  *
20  * The above copyright notice, this permission notice, and the following
21  * disclaimer shall be included in all copies or substantial portions of
22  * the Software.
23  *
24  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
25  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
27  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
29  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF OR OTHER
30  * DEALINGS IN THE SOFTWARE.
31  *
32  * NOTE: The file manipulation functions provided by Microsoft seem to
33  * work with either slash (/) or backslash (\) as the directory separator;
34  * (this is consistent with Microsoft's own documentation, on MSDN).
35  *
36  */
37 #ifndef _STDIO_H
38 #pragma GCC system_header
39
40 /* When including <wchar.h>, some of the definitions and declarations
41  * which are nominally provided in <stdio.h> must be duplicated.  Rather
42  * than require duplicated maintenance effort, we provide for partial
43  * inclusion of <stdio.h> by <wchar.h>; only when not included in
44  * this partial fashion...
45  */
46 #ifndef __WCHAR_H_SOURCED__
47  /*
48   * ...which is exclusive to <wchar.h>, do we assert the multiple
49   * inclusion guard for <stdio.h> itself.
50   */
51 #define _STDIO_H
52 #endif
53
54 /* All the headers include this file.
55  */
56 #include <_mingw.h>
57
58 #ifndef RC_INVOKED
59 /* POSIX stipulates that the following set of types, (as identified by
60  * __need_TYPENAME macros), shall be defined consistently with <stddef.h>;
61  * by defining the appropriate __need_TYPENAME macros, we may selectively
62  * obtain the required definitions by inclusion of <stddef.h>, WITHOUT
63  * automatic exposure of any of its additional content.
64  */
65 #define __need_NULL
66 #define __need_size_t
67 #define __need_wchar_t
68 #define __need_wint_t
69 #include <stddef.h>
70
71 #if _POSIX_C_SOURCE >= 200809L
72  /* Similarly, for types defined in <sys/types.h>, (which are explicitly
73   * dependent on the POSIX.1-2008 feature test)...
74   */
75 # define __need_off_t
76 # define __need_ssize_t
77 #endif
78 #if !(defined __STRICT_ANSI__ || defined (__NO_MINGW_LFS)) \
79  && defined (__MSVCRT__)
80  /* ...while this is required to support our fseeko64() and ftello64()
81   * implementations, (neither of which is in any way standardized)...
82   */
83 # define __need___off64_t
84 #endif
85 /* It is sufficient to test for just one define from each of the two
86  * preceding groups...
87  */
88 #if defined __need_off_t || defined __need___off64_t
89  /* ...to identify a requirement for selective inclusion of one or more
90   * of these type definitions from "sys/types.h"; (note that we use the
91   * #include "..." form here, to ensure that we get the correct header
92   * file, relative to the location of this <stdio.h>).
93   */
94 # include "sys/types.h"
95 #endif
96
97 #ifndef __VALIST
98  /* Also similarly, for the va_list type, defined in "stdarg.h"
99   */
100 # if defined __GNUC__ && __GNUC__ >= 3
101 #  define __need___va_list
102 #  include "stdarg.h"
103 #  define __VALIST __builtin_va_list
104 # else
105 #  define __VALIST char *
106 # endif
107 #endif
108 #endif  /* ! RC_INVOKED */
109
110 #ifdef _STDIO_H
111 /* Flags for the iobuf structure
112  */
113 #define _IOREAD         1       /* currently reading */
114 #define _IOWRT          2       /* currently writing */
115 #define _IORW      0x0080       /* opened as "r+w" */
116
117 /* The three standard file pointers provided by the run time library.
118  * NOTE: These will go to the bit-bucket silently in GUI applications!
119  */
120 #define STDIN_FILENO    0
121 #define STDOUT_FILENO   1
122 #define STDERR_FILENO   2
123
124 /* Returned by various functions on end of file condition or error.
125  */
126 #define EOF           (-1)
127
128 #endif  /* _STDIO_H */
129
130 /* The maximum length of a file name.  It may be better to use the Windows'
131  * GetVolumeInformation() function in preference to this constant, but hey,
132  * this works!  Note that <io.h> also defines it, but we don't guard it, so
133  * that the compiler has a chance to catch inconsistencies.
134  *
135  * FIXME: Right now, we define this unconditionally for both full <stdio.h>
136  * inclusion, and for partial inclusion on behalf of <wchar.h>, (which needs
137  * it for some non-ANSI structure declarations).  The conditions under which
138  * <wchar.h> needs this require review, because defining it as a consequence
139  * of including <wchar.h> alone may violate strict ANSI conformity.
140  */
141 #define FILENAME_MAX  (260)
142
143 #ifdef _STDIO_H
144 /* The maximum number of files that may be open at once. I have set this to
145  * a conservative number. The actual value may be higher.
146  */
147 #define FOPEN_MAX      (20)
148
149 /* After creating this many names, tmpnam and tmpfile return NULL
150  */
151 #define TMP_MAX      32767
152
153 /* Tmpnam, tmpfile and, sometimes, _tempnam try to create
154  * temp files in the root directory of the current drive
155  * (not in pwd, as suggested by some older MS doc's).
156  * Redefining these macros does not effect the CRT functions.
157  */
158 #define _P_tmpdir   "\\"
159 #ifndef __STRICT_ANSI__
160 #define P_tmpdir _P_tmpdir
161 #endif
162 #define _wP_tmpdir  L"\\"
163
164 /* The maximum size of name (including NUL) that will be put in the user
165  * supplied buffer caName for tmpnam.
166  * Inferred from the size of the static buffer returned by tmpnam
167  * when passed a NULL argument. May actually be smaller.
168  */
169 #define L_tmpnam (16)
170
171 #define _IOFBF          0x0000  /* full buffered */
172 #define _IOLBF          0x0040  /* line buffered */
173 #define _IONBF          0x0004  /* not buffered */
174
175 #define _IOMYBUF        0x0008  /* stdio malloc()'d buffer */
176 #define _IOEOF          0x0010  /* EOF reached on read */
177 #define _IOERR          0x0020  /* I/O error from system */
178 #define _IOSTRG         0x0040  /* Strange or no file descriptor */
179 #ifdef _POSIX_SOURCE
180 # define _IOAPPEND      0x0200
181 #endif
182
183 /* The buffer size as used by setbuf such that it is equivalent to
184  * (void) setvbuf(fileSetBuffer, caBuffer, _IOFBF, BUFSIZ).
185  */
186 #define BUFSIZ             512
187
188 /* Constants for nOrigin indicating the position relative to which fseek
189  * sets the file position.  Defined unconditionally since ISO and POSIX
190  * say they are defined here.
191  */
192 #define SEEK_SET             0
193 #define SEEK_CUR             1
194 #define SEEK_END             2
195
196 #endif  /* _STDIO_H */
197
198 #ifndef RC_INVOKED
199 #if ! (defined _STDIO_H && defined _WCHAR_H)
200 /* The structure underlying the FILE type; this should be defined when
201  * including either <stdio.h> or <wchar.h>.  If both header include guards
202  * are now in place, then we must currently be including <stdio.h> in its
203  * own right, having already processed this block during a prior partial
204  * inclusion by <wchar.h>; there is no need to process it a second time.
205  *
206  * Some believe that nobody in their right mind should make use of the
207  * internals of this structure. Provided by Pedro A. Aranda Gutiirrez
208  * <paag@tid.es>.
209  */
210 typedef struct _iobuf
211 {
212   char  *_ptr;
213   int    _cnt;
214   char  *_base;
215   int    _flag;
216   int    _file;
217   int    _charbuf;
218   int    _bufsiz;
219   char  *_tmpfname;
220 } FILE;
221
222 #endif  /* ! (_STDIO_H && _WCHAR_H) */
223 #ifdef _STDIO_H
224 /* Content to be exposed only when including <stdio.h> in its own right;
225  * these will not be exposed when __WCHAR_H_SOURCE__ is defined, as will
226  * be the case when <stdio.h> is included indirectly, by <wchar.h>
227  *
228  *
229  * The standard file handles
230  */
231 #ifndef __DECLSPEC_SUPPORTED
232
233 extern FILE (*_imp___iob)[];    /* A pointer to an array of FILE */
234
235 #define _iob (*_imp___iob)      /* An array of FILE */
236
237 #else /* __DECLSPEC_SUPPORTED */
238
239 __MINGW_IMPORT FILE _iob[];     /* An array of FILE imported from DLL. */
240
241 #endif /* __DECLSPEC_SUPPORTED */
242
243 #define stdin   (&_iob[STDIN_FILENO])
244 #define stdout  (&_iob[STDOUT_FILENO])
245 #define stderr  (&_iob[STDERR_FILENO])
246
247 /* Need to close the current _STDIO_H specific block here...
248  */
249 #endif
250 /* ...because, we need this regardless of the inclusion mode...
251  */
252 _BEGIN_C_DECLS
253
254 #ifdef _STDIO_H
255 /* ...then revert to _STDIO_H specific mode, to declare...
256  *
257  *
258  * File Operations
259  */
260 _CRTIMP __cdecl __MINGW_NOTHROW  FILE * fopen (const char *, const char *);
261 _CRTIMP __cdecl __MINGW_NOTHROW  FILE * freopen (const char *, const char *, FILE *);
262 _CRTIMP __cdecl __MINGW_NOTHROW  int    fflush (FILE *);
263 _CRTIMP __cdecl __MINGW_NOTHROW  int    fclose (FILE *);
264
265 /* Note: Microsoft also declares remove & rename (but not their wide char
266  * variants) in <io.h>; since duplicate prototypes are acceptable, provided
267  * they are consistent, we simply declare them here anyway, while allowing
268  * the compiler to check consistency as appropriate.
269  */
270 _CRTIMP __cdecl __MINGW_NOTHROW  int    remove (const char *);
271 _CRTIMP __cdecl __MINGW_NOTHROW  int    rename (const char *, const char *);
272 _CRTIMP __cdecl __MINGW_NOTHROW  FILE * tmpfile (void);
273 _CRTIMP __cdecl __MINGW_NOTHROW  char * tmpnam (char *);
274
275 #ifndef __STRICT_ANSI__
276 _CRTIMP __cdecl __MINGW_NOTHROW  char *_tempnam (const char *, const char *);
277 _CRTIMP __cdecl __MINGW_NOTHROW  int   _rmtmp (void);
278 _CRTIMP __cdecl __MINGW_NOTHROW  int   _unlink (const char *);
279
280 #ifndef NO_OLDNAMES
281 _CRTIMP __cdecl __MINGW_NOTHROW  char * tempnam (const char *, const char *);
282 _CRTIMP __cdecl __MINGW_NOTHROW  int    rmtmp (void);
283 _CRTIMP __cdecl __MINGW_NOTHROW  int    unlink (const char *);
284 #endif
285 #endif /* __STRICT_ANSI__ */
286
287 _CRTIMP __cdecl __MINGW_NOTHROW  int    setvbuf (FILE *, char *, int, size_t);
288 _CRTIMP __cdecl __MINGW_NOTHROW  void   setbuf (FILE *, char *);
289
290 /* Formatted Output
291  *
292  * MSVCRT implementations are not ANSI C99 conformant...
293  * we offer these conforming alternatives from libmingwex.a
294  */
295 #undef  __mingw_stdio_redirect__
296 #define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __mingw_##F
297
298 extern int __mingw_stdio_redirect__(fprintf)(FILE*, const char*, ...);
299 extern int __mingw_stdio_redirect__(printf)(const char*, ...);
300 extern int __mingw_stdio_redirect__(sprintf)(char*, const char*, ...);
301 extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...);
302 extern int __mingw_stdio_redirect__(vfprintf)(FILE*, const char*, __VALIST);
303 extern int __mingw_stdio_redirect__(vprintf)(const char*, __VALIST);
304 extern int __mingw_stdio_redirect__(vsprintf)(char*, const char*, __VALIST);
305 extern int __mingw_stdio_redirect__(vsnprintf)(char*, size_t, const char*, __VALIST);
306
307 /* When using these C99 conforming alternatives, we may wish to support
308  * some of Microsoft's quirky formatting options, even when they violate
309  * strict C99 conformance.
310  */
311 #define _MSVC_PRINTF_QUIRKS             0x0100U
312 #define _QUERY_MSVC_PRINTF_QUIRKS       ~0U, 0U
313 #define _DISABLE_MSVC_PRINTF_QUIRKS     ~_MSVC_PRINTF_QUIRKS, 0U
314 #define _ENABLE_MSVC_PRINTF_QUIRKS      ~0U, _MSVC_PRINTF_QUIRKS
315
316 /* Those quirks which conflict with ANSI C99 specified behaviour are
317  * disabled by default; use the following function, like this:
318  *
319  *   _mingw_output_format_control( _ENABLE_MSVC_PRINTF_QUIRKS );
320  *
321  * to enable them, like this:
322  *
323  *   state = _mingw_output_format_control( _QUERY_MSVC_PRINTF_QUIRKS )
324  *              & _MSVC_PRINTF_QUIRKS;
325  *
326  * to ascertain the currently active enabled state, or like this:
327  *
328  *   _mingw_output_format_control( _DISABLE_MSVC_PRINTF_QUIRKS );
329  *
330  * to disable them again.
331  */
332 extern unsigned int _mingw_output_format_control( unsigned int, unsigned int );
333
334 #if __USE_MINGW_ANSI_STDIO
335 /* User has expressed a preference for C99 conformance...
336  */
337 # undef __mingw_stdio_redirect__
338 # ifdef __cplusplus
339 /* For C++ we use inline implementations, to avoid interference
340  * with namespace qualification, which may result from using #defines.
341  */
342 #  define __mingw_stdio_redirect__  inline __cdecl __MINGW_NOTHROW
343
344 # elif defined __GNUC__
345 /* FIXME: Is there any GCC version prerequisite here?
346  *
347  * We also prefer inline implementations for C, when we can be confident
348  * that the GNU specific __inline__ mechanism is supported.
349  */
350 #  define __mingw_stdio_redirect__  static __inline__ __cdecl __MINGW_NOTHROW
351
352 # else
353 /* Can't use inlines; fall back on module local static stubs.
354  */
355 #  define __mingw_stdio_redirect__  static __cdecl __MINGW_NOTHROW
356 # endif
357
358 __mingw_stdio_redirect__
359 int fprintf (FILE *__stream, const char *__format, ...)
360 {
361   register int __retval;
362   __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
363   __retval = __mingw_vfprintf( __stream, __format, __local_argv );
364   __builtin_va_end( __local_argv );
365   return __retval;
366 }
367
368 __mingw_stdio_redirect__
369 int printf (const char *__format, ...)
370 {
371   register int __retval;
372   __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
373   __retval = __mingw_vprintf( __format, __local_argv );
374   __builtin_va_end( __local_argv );
375   return __retval;
376 }
377
378 __mingw_stdio_redirect__
379 int sprintf (char *__stream, const char *__format, ...)
380 {
381   register int __retval;
382   __builtin_va_list __local_argv; __builtin_va_start( __local_argv, __format );
383   __retval = __mingw_vsprintf( __stream, __format, __local_argv );
384   __builtin_va_end( __local_argv );
385   return __retval;
386 }
387
388 __mingw_stdio_redirect__
389 int vfprintf (FILE *__stream, const char *__format, __VALIST __local_argv)
390 {
391   return __mingw_vfprintf( __stream, __format, __local_argv );
392 }
393
394 __mingw_stdio_redirect__
395 int vprintf (const char *__format, __VALIST __local_argv)
396 {
397   return __mingw_vprintf( __format, __local_argv );
398 }
399
400 __mingw_stdio_redirect__
401 int vsprintf (char *__stream, const char *__format, __VALIST __local_argv)
402 {
403   return __mingw_vsprintf( __stream, __format, __local_argv );
404 }
405
406 #else
407 /* Default configuration: simply direct all calls to MSVCRT...
408  */
409 _CRTIMP __cdecl __MINGW_NOTHROW  int fprintf (FILE *, const char *, ...);
410 _CRTIMP __cdecl __MINGW_NOTHROW  int printf (const char *, ...);
411 _CRTIMP __cdecl __MINGW_NOTHROW  int sprintf (char *, const char *, ...);
412 _CRTIMP __cdecl __MINGW_NOTHROW  int vfprintf (FILE *, const char *, __VALIST);
413 _CRTIMP __cdecl __MINGW_NOTHROW  int vprintf (const char *, __VALIST);
414 _CRTIMP __cdecl __MINGW_NOTHROW  int vsprintf (char *, const char *, __VALIST);
415
416 #endif
417 /* Regardless of user preference, always offer these alternative
418  * entry points, for direct access to the MSVCRT implementations.
419  */
420 #undef  __mingw_stdio_redirect__
421 #define __mingw_stdio_redirect__(F) __cdecl __MINGW_NOTHROW __msvcrt_##F
422
423 _CRTIMP int __mingw_stdio_redirect__(fprintf)(FILE *, const char *, ...);
424 _CRTIMP int __mingw_stdio_redirect__(printf)(const char *, ...);
425 _CRTIMP int __mingw_stdio_redirect__(sprintf)(char *, const char *, ...);
426 _CRTIMP int __mingw_stdio_redirect__(vfprintf)(FILE *, const char *, __VALIST);
427 _CRTIMP int __mingw_stdio_redirect__(vprintf)(const char *, __VALIST);
428 _CRTIMP int __mingw_stdio_redirect__(vsprintf)(char *, const char *, __VALIST);
429
430 #undef  __mingw_stdio_redirect__
431
432 /* The following three ALWAYS refer to the MSVCRT implementations...
433  */
434 _CRTIMP __cdecl __MINGW_NOTHROW  int _snprintf (char *, size_t, const char *, ...);
435 _CRTIMP __cdecl __MINGW_NOTHROW  int _vsnprintf (char *, size_t, const char *, __VALIST);
436 _CRTIMP __cdecl __MINGW_NOTHROW  int _vscprintf (const char *, __VALIST);
437
438 #ifdef _ISOC99_SOURCE
439 /* Microsoft does not provide implementations for the following,
440  * which are required by C99.  Note in particular that Microsoft's
441  * corresponding implementations of _snprintf() and _vsnprintf() are
442  * NOT compatible with C99, but the following are; if you want the
443  * MSVCRT behaviour, you MUST use the Microsoft "uglified" names.
444  */
445 __cdecl __MINGW_NOTHROW  int snprintf (char *, size_t, const char *, ...);
446 __cdecl __MINGW_NOTHROW  int vsnprintf (char *, size_t, const char *, __VALIST);
447
448 __cdecl __MINGW_NOTHROW  int vscanf (const char * __restrict__, __VALIST);
449
450 __cdecl __MINGW_NOTHROW
451 int vfscanf (FILE * __restrict__, const char * __restrict__, __VALIST);
452
453 __cdecl __MINGW_NOTHROW
454 int vsscanf (const char * __restrict__, const char * __restrict__, __VALIST);
455
456 #endif  /* _ISOC99_SOURCE */
457 #if __MSVCRT_VERSION__ >= __MSVCR80_DLL || _WIN32_WINNT >= _WIN32_WINNT_VISTA
458 /*
459  * In MSVCR80.DLL, (and its descendants), Microsoft introduced variants
460  * of the printf() functions, with names qualified by an underscore prefix
461  * and "_p" or "_p_l" suffixes; implemented in Microsoft's typically crass,
462  * non-standard, and non-portable fashion, these provide support for access
463  * to printf() arguments in random order, as was standardised by POSIX as a
464  * feature of the optional Extended Systems Interface (XSI) specification,
465  * and is now required for conformity with the POSIX.1-2008 base standard.
466  * Although these additional Microsoft functions were subsequently added
467  * to MSVCRT.DLL, from Windows-Vista onward, and they are prototyped here,
468  * MinGW applications are strenuously encouraged to avoid using them; a
469  * much better alternative is to "#define _XOPEN_SOURCE 700" before any
470  * system header is included, then use POSIX standard printf() functions
471  * instead; this is both portable to many non-Windows platforms, and it
472  * offers better compatibility with earlier Windows versions.
473  */
474 _CRTIMP __cdecl __MINGW_NOTHROW
475 int _printf_p (const char *, ...);
476
477 _CRTIMP __cdecl __MINGW_NOTHROW
478 int _fprintf_p (FILE *, const char *, ...);
479
480 _CRTIMP __cdecl __MINGW_NOTHROW
481 int _sprintf_p (char *, size_t, const char *, ...);
482
483 _CRTIMP __cdecl __MINGW_NOTHROW
484 int _vprintf_p (const char *, __VALIST);
485
486 _CRTIMP __cdecl __MINGW_NOTHROW
487 int _vfprintf_p (FILE *, const char *, __VALIST);
488
489 _CRTIMP __cdecl __MINGW_NOTHROW
490 int _vsprintf_p (char *, size_t, const char *, __VALIST);
491
492 #ifndef __have_typedef_locale_t
493 /* The following require the opaque locale_t data type, which we
494  * may obtain, by selective inclusion, from <locale.h>
495  *
496  * CAVEAT: unless you are linking with non-free MSVCR80.DLL, or one
497  * of its later derivatives, good luck trying to use these; see the
498  * explanation in <locale.t>, as to why you may be unable to create,
499  * or otherwise acquire a reference to, a locale_t object.
500  */
501 #define __need_locale_t
502 #include <locale.h>
503 #endif
504
505 _CRTIMP __cdecl __MINGW_NOTHROW
506 int _printf_p_l (const char *, locale_t, ...);
507
508 _CRTIMP __cdecl __MINGW_NOTHROW
509 int _fprintf_p_l (FILE *, const char *, locale_t, ...);
510
511 _CRTIMP __cdecl __MINGW_NOTHROW
512 int _sprintf_p_l (char *, size_t, const char *, locale_t, ...);
513
514 _CRTIMP __cdecl __MINGW_NOTHROW
515 int _vprintf_p_l (const char *, locale_t, __VALIST);
516
517 _CRTIMP __cdecl __MINGW_NOTHROW
518 int _vfprintf_p_l (FILE *, const char *, locale_t, __VALIST);
519
520 _CRTIMP __cdecl __MINGW_NOTHROW
521 int _vsprintf_p_l (char *, size_t, const char *, locale_t, __VALIST);
522
523 #endif  /* MSVCR80.DLL and descendants, or MSVCRT.DLL since Vista */
524 #endif  /* <stdio.h> included in its own right */
525 #if ! (defined _STDIO_H && defined _WCHAR_H)
526 #if __MSVCRT_VERSION__ >= __MSVCR80_DLL || _WIN32_WINNT >= _WIN32_WINNT_VISTA
527 /*
528  * Wide character variants of the foregoing "positional parameter" printf()
529  * functions; MSDN says that these should be declared when either <stdio.h>, or
530  * <wchar.h> is included, so we make them selectively available to <wchar.h>,
531  * but, just as in the foregoing, we advise against their use.
532  */
533 _CRTIMP __cdecl __MINGW_NOTHROW
534 int _wprintf_p (const wchar_t *, ...);
535
536 _CRTIMP __cdecl __MINGW_NOTHROW
537 int _fwprintf_p (FILE *, const wchar_t *, ...);
538
539 _CRTIMP __cdecl __MINGW_NOTHROW
540 int _swprintf_p (wchar_t *, size_t, const wchar_t *, ...);
541
542 _CRTIMP __cdecl __MINGW_NOTHROW
543 int _vwprintf_p (const wchar_t *, __VALIST);
544
545 _CRTIMP __cdecl __MINGW_NOTHROW
546 int _vfwprintf_p (FILE *, const wchar_t *, __VALIST);
547
548 _CRTIMP __cdecl __MINGW_NOTHROW
549 int _vswprintf_p (wchar_t *, size_t, const wchar_t *, __VALIST);
550
551 #ifndef __have_typedef_locale_t
552 /* The following also require the locale_t data type, which we may
553  * obtain if necessary, by selective inclusion, from <locale.h>
554  *
555  * CAVEAT: use of these is subject to the same limitations as are
556  * applicable to their "char *" counterparts; (see above).
557  */
558 #define __need_locale_t
559 #include <locale.h>
560 #endif
561
562 _CRTIMP __cdecl __MINGW_NOTHROW
563 int _wprintf_p_l (const wchar_t *, locale_t, ...);
564
565 _CRTIMP __cdecl __MINGW_NOTHROW
566 int _fwprintf_p_l (FILE *, const wchar_t *, locale_t, ...);
567
568 _CRTIMP __cdecl __MINGW_NOTHROW
569 int _swprintf_p_l (wchar_t *, size_t, const wchar_t *, locale_t, ...);
570
571 _CRTIMP __cdecl __MINGW_NOTHROW
572 int _vwprintf_p_l (const wchar_t *, locale_t, __VALIST);
573
574 _CRTIMP __cdecl __MINGW_NOTHROW
575 int _vfwprintf_p_l (FILE *, const wchar_t *, locale_t, __VALIST);
576
577 _CRTIMP __cdecl __MINGW_NOTHROW
578 int _vswprintf_p_l (wchar_t *, size_t, const wchar_t *, locale_t, __VALIST);
579
580 #endif  /* MSVCR80.DLL and descendants, or MSVCRT.DLL since Vista */
581 #endif  /* ! (defined _STDIO_H && defined _WCHAR_H) */
582 #ifdef _STDIO_H
583 /* Once again, back to <stdio.h> specific declarations.
584  *
585  *
586  * Formatted Input
587  */
588 _CRTIMP __cdecl __MINGW_NOTHROW  int    fscanf (FILE *, const char *, ...);
589 _CRTIMP __cdecl __MINGW_NOTHROW  int    scanf (const char *, ...);
590 _CRTIMP __cdecl __MINGW_NOTHROW  int    sscanf (const char *, const char *, ...);
591
592 /* Character Input and Output Functions
593  */
594 _CRTIMP __cdecl __MINGW_NOTHROW  int    fgetc (FILE *);
595 _CRTIMP __cdecl __MINGW_NOTHROW  char * fgets (char *, int, FILE *);
596 _CRTIMP __cdecl __MINGW_NOTHROW  int    fputc (int, FILE *);
597 _CRTIMP __cdecl __MINGW_NOTHROW  int    fputs (const char *, FILE *);
598 _CRTIMP __cdecl __MINGW_NOTHROW  char * gets (char *);
599 _CRTIMP __cdecl __MINGW_NOTHROW  int    puts (const char *);
600 _CRTIMP __cdecl __MINGW_NOTHROW  int    ungetc (int, FILE *);
601
602 /* Traditionally, getc and putc are defined as macros. but the
603  * standard doesn't say that they must be macros.  We use inline
604  * functions here to allow the fast versions to be used in C++
605  * with namespace qualification, eg., ::getc.
606  *
607  * NOTE: _filbuf and _flsbuf  are not thread-safe.
608  */
609 _CRTIMP __cdecl __MINGW_NOTHROW  int   _filbuf (FILE *);
610 _CRTIMP __cdecl __MINGW_NOTHROW  int   _flsbuf (int, FILE *);
611
612 #if !defined _MT
613
614 __CRT_INLINE __cdecl __MINGW_NOTHROW  int getc (FILE * __F)
615 {
616   return (--__F->_cnt >= 0)
617     ?  (int) (unsigned char) *__F->_ptr++
618     : _filbuf (__F);
619 }
620
621 __CRT_INLINE __cdecl __MINGW_NOTHROW  int putc (int __c, FILE * __F)
622 {
623   return (--__F->_cnt >= 0)
624     ?  (int) (unsigned char) (*__F->_ptr++ = (char)__c)
625     :  _flsbuf (__c, __F);
626 }
627
628 __CRT_INLINE __cdecl __MINGW_NOTHROW  int getchar (void)
629 {
630   return (--stdin->_cnt >= 0)
631     ?  (int) (unsigned char) *stdin->_ptr++
632     : _filbuf (stdin);
633 }
634
635 __CRT_INLINE __cdecl __MINGW_NOTHROW  int putchar(int __c)
636 {
637   return (--stdout->_cnt >= 0)
638     ?  (int) (unsigned char) (*stdout->_ptr++ = (char)__c)
639     :  _flsbuf (__c, stdout);}
640
641 #else  /* Use library functions.  */
642
643 _CRTIMP __cdecl __MINGW_NOTHROW  int    getc (FILE *);
644 _CRTIMP __cdecl __MINGW_NOTHROW  int    putc (int, FILE *);
645 _CRTIMP __cdecl __MINGW_NOTHROW  int    getchar (void);
646 _CRTIMP __cdecl __MINGW_NOTHROW  int    putchar (int);
647
648 #endif
649
650 /* Direct Input and Output Functions
651  */
652 _CRTIMP __cdecl __MINGW_NOTHROW  size_t fread (void *, size_t, size_t, FILE *);
653 _CRTIMP __cdecl __MINGW_NOTHROW  size_t fwrite (const void *, size_t, size_t, FILE *);
654
655 /* File Positioning Functions
656  */
657 _CRTIMP __cdecl __MINGW_NOTHROW  int    fseek (FILE *, long, int);
658 _CRTIMP __cdecl __MINGW_NOTHROW  long   ftell (FILE *);
659 _CRTIMP __cdecl __MINGW_NOTHROW  void   rewind (FILE *);
660
661 #if _WIN32_WINNT >= _WIN32_WINNT_VISTA || __MSVCRT_VERSION__ >= __MSVCR80_DLL
662  /*
663   * Microsoft introduced a number of variations on fseek() and ftell(),
664   * beginning with MSVCR80.DLL; the bare _fseeki64() and _ftelli64() were
665   * subsequently integrated into MSVCRT.DLL, from Vista onward...
666   */
667 _CRTIMP __cdecl __MINGW_NOTHROW  int    _fseeki64 (FILE *, __int64, int);
668 _CRTIMP __cdecl __MINGW_NOTHROW __int64 _ftelli64 (FILE *);
669
670 #if __MSVCRT_VERSION__ >= __MSVCR80_DLL
671  /*
672   * ...while the "nolock" variants remain exclusive to MSVCR80.DLL, and
673   * its later MSVC specific derivatives.
674   */
675 _CRTIMP __cdecl __MINGW_NOTHROW  int    _fseek_nolock (FILE *, long, int);
676 _CRTIMP __cdecl __MINGW_NOTHROW  long   _ftell_nolock (FILE *);
677
678 _CRTIMP __cdecl __MINGW_NOTHROW  int    _fseeki64_nolock (FILE *, __int64, int);
679 _CRTIMP __cdecl __MINGW_NOTHROW __int64 _ftelli64_nolock (FILE *);
680
681 #endif  /* MSVCR80.DLL and later derivatives ONLY */
682 #endif  /* MSVCR80.DLL and descendants, or MSVCRT.DLL since Vista */
683
684 #ifdef __USE_MINGW_FSEEK
685 /* Workaround for a limitation on Win9x where a file is not zero padded
686  * on write, following a seek beyond the original end of file; these are
687  * implemented in libmingwex.a
688  */
689 __cdecl __MINGW_NOTHROW  int    __mingw_fseek (FILE *, long, int);
690 __cdecl __MINGW_NOTHROW  size_t __mingw_fwrite (const void *, size_t, size_t, FILE *);
691
692 #define fwrite(buffer, size, count, fp)  __mingw_fwrite(buffer, size, count, fp)
693 #define fseek(fp, offset, whence)        __mingw_fseek(fp, offset, whence)
694 #endif /* __USE_MINGW_FSEEK */
695
696 /* An opaque data type used for storing file positions... The contents of
697  * this type are unknown, but we (the compiler) need to know the size
698  * because the programmer using fgetpos and fsetpos will be setting aside
699  * storage for fpos_t structres. Actually I tested using a byte array and
700  * it is fairly evident that the fpos_t type is a long (in CRTDLL.DLL).
701  * Perhaps an unsigned long? TODO? It's definitely a 64-bit number in
702  * MSVCRT however, and for now `long long' will do.
703  */
704 #ifdef __MSVCRT__
705 typedef long long  fpos_t;
706 #else
707 typedef long       fpos_t;
708 #endif
709
710 _CRTIMP __cdecl __MINGW_NOTHROW  int fgetpos (FILE *, fpos_t *);
711 _CRTIMP __cdecl __MINGW_NOTHROW  int fsetpos (FILE *, const fpos_t *);
712
713 /* Error Functions
714  */
715 _CRTIMP __cdecl __MINGW_NOTHROW  int feof (FILE *);
716 _CRTIMP __cdecl __MINGW_NOTHROW  int ferror (FILE *);
717
718 #ifdef __cplusplus
719 inline __cdecl __MINGW_NOTHROW  int feof (FILE * __F){ return __F->_flag & _IOEOF; }
720 inline __cdecl __MINGW_NOTHROW  int ferror (FILE * __F){ return __F->_flag & _IOERR; }
721 #else
722 #define feof(__F)     ((__F)->_flag & _IOEOF)
723 #define ferror(__F)   ((__F)->_flag & _IOERR)
724 #endif
725
726 _CRTIMP __cdecl __MINGW_NOTHROW  void clearerr (FILE *);
727 _CRTIMP __cdecl __MINGW_NOTHROW  void perror (const char *);
728
729
730 #ifndef __STRICT_ANSI__
731 /*
732  * Pipes
733  */
734 _CRTIMP __cdecl __MINGW_NOTHROW  FILE * _popen (const char *, const char *);
735 _CRTIMP __cdecl __MINGW_NOTHROW  int    _pclose (FILE *);
736
737 #ifndef NO_OLDNAMES
738 _CRTIMP __cdecl __MINGW_NOTHROW  FILE *  popen (const char *, const char *);
739 _CRTIMP __cdecl __MINGW_NOTHROW  int     pclose (FILE *);
740 #endif
741
742 /* Other Non ANSI functions
743  */
744 _CRTIMP __cdecl __MINGW_NOTHROW  int    _flushall (void);
745 _CRTIMP __cdecl __MINGW_NOTHROW  int    _fgetchar (void);
746 _CRTIMP __cdecl __MINGW_NOTHROW  int    _fputchar (int);
747 _CRTIMP __cdecl __MINGW_NOTHROW  FILE * _fdopen (int, const char *);
748 _CRTIMP __cdecl __MINGW_NOTHROW  int    _fileno (FILE *);
749 _CRTIMP __cdecl __MINGW_NOTHROW  int    _fcloseall (void);
750 _CRTIMP __cdecl __MINGW_NOTHROW  FILE * _fsopen (const char *, const char *, int);
751 #ifdef __MSVCRT__
752 _CRTIMP __cdecl __MINGW_NOTHROW  int    _getmaxstdio (void);
753 _CRTIMP __cdecl __MINGW_NOTHROW  int    _setmaxstdio (int);
754 #endif
755
756 /* Microsoft introduced a capability in MSVCR80.DLL and later, to
757  * set the minimum number of digits to be displayed in a printf()
758  * floating point exponent; they retro-fitted this in MSVCRT.DLL,
759  * from Windows-Vista onwards, but we provide our own wrappers in
760  * libmingwex.a, which make it possible for us to emulate the API
761  * for any version of MSVCRT.DLL (including WinXP and earlier).
762  */
763 #define _TWO_DIGIT_EXPONENT    1
764
765 /* While Microsoft define the preceding manifest constant, they
766  * appear to neglect to define its complement, (for restoration
767  * of their default exponent display format); for orthogonality,
768  * we will provide this regardless of Microsoft's negligence.
769  */
770 #define _THREE_DIGIT_EXPONENT  0
771
772 /* Once again, unspecified by Microsoft, (and mostly redundant),
773  * it is convenient to specify a combining mask for these.
774  */
775 #define _EXPONENT_DIGIT_MASK  (_TWO_DIGIT_EXPONENT | _THREE_DIGIT_EXPONENT)
776
777 unsigned int __cdecl __mingw_get_output_format (void);
778 unsigned int __cdecl __mingw_set_output_format (unsigned int);
779
780 /* Also appearing for the first time in MSVCR80.DLL, and then also
781  * retro-fitted to MSVCRT.DLL from Windows-Vista onwards, was this
782  * pair of functions to control availability of "%n" formatting in
783  * the MSVCRT.DLL printf() family of functions, for which we also
784  * provide our own DLL version agnostic wrappers:
785  */
786 int __cdecl __mingw_get_printf_count_output (void);
787 int __cdecl __mingw_set_printf_count_output (int);
788
789 #if __MSVCRT_VERSION__ >= __MSVCR80_DLL
790 /* When the user declares that MSVCR80.DLL features are supported,
791  * we simply expose the corresponding APIs...
792  */
793 _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _get_output_format (void);
794 _CRTIMP unsigned int __cdecl __MINGW_NOTHROW _set_output_format (unsigned int);
795
796 _CRTIMP __cdecl __MINGW_NOTHROW  int _get_printf_count_output (void);
797 _CRTIMP __cdecl __MINGW_NOTHROW  int _set_printf_count_output (int);
798
799 #else
800 /* ...otherwise, we emulate the APIs, in a DLL version agnostic
801  * manner, using our own implementation wrappers.
802  */
803 __CRT_ALIAS unsigned int __cdecl _get_output_format (void)
804 { return __mingw_get_output_format (); }
805
806 __CRT_ALIAS unsigned int __cdecl _set_output_format (unsigned int __style)
807 { return __mingw_set_output_format (__style); }
808
809 /* When using our own printf() implementation, "%n" format is ALWAYS
810  * supported, so we make this API a no-op, reporting it to be so; for
811  * the alternative case, when using MSVCRT.DLL's printf(), we delegate
812  * to our wrapper API implementation, which will invoke the API function
813  * calls within the DLL, if they are available, or persistently report
814  * the state of "%n" formatting as DISABLED if they are not.
815  */
816 #if __USE_MINGW_ANSI_STDIO
817 /* Note that __USE_MINGW_ANSI_STDIO is not guaranteed to resolve to any
818  * symbol which will represent a compilable logic state; map it to this
819  * alternative which will, for the true state...
820  */
821 # define __USE_MINGW_PRINTF  1
822 #else
823 /* ...and for the false.
824  */
825 # define __USE_MINGW_PRINTF  0
826 #endif
827
828 __CRT_ALIAS int __cdecl _get_printf_count_output (void)
829 { return __USE_MINGW_PRINTF ? 1 : __mingw_get_printf_count_output (); }
830
831 __CRT_ALIAS int __cdecl _set_printf_count_output (int __mode)
832 { return __USE_MINGW_PRINTF ? 1 : __mingw_set_printf_count_output (__mode); }
833 #endif
834
835 #ifndef _NO_OLDNAMES
836 _CRTIMP __cdecl __MINGW_NOTHROW  int    fgetchar (void);
837 _CRTIMP __cdecl __MINGW_NOTHROW  int    fputchar (int);
838 _CRTIMP __cdecl __MINGW_NOTHROW  FILE * fdopen (int, const char *);
839 _CRTIMP __cdecl __MINGW_NOTHROW  int    fileno (FILE *);
840 #endif  /* !_NO_OLDNAMES */
841
842 #define _fileno(__F) ((__F)->_file)
843 #ifndef _NO_OLDNAMES
844 #define fileno(__F) ((__F)->_file)
845 #endif
846
847 #if defined (__MSVCRT__) && ! defined (__NO_MINGW_LFS)
848 __CRT_INLINE __JMPSTUB__(( FUNCTION = fopen64, REMAPPED = fopen ))
849 FILE * __cdecl __MINGW_NOTHROW  fopen64 (const char * filename, const char * mode)
850 { return fopen (filename, mode); }
851
852 int __cdecl __MINGW_NOTHROW  fseeko64 (FILE *, __off64_t, int);
853
854 #ifdef __USE_MINGW_FSEEK
855 int __cdecl __MINGW_NOTHROW __mingw_fseeko64 (FILE *, __off64_t, int);
856 #define fseeko64(fp, offset, whence)  __mingw_fseeko64(fp, offset, whence)
857 #endif
858
859 __CRT_INLINE __LIBIMPL__(( FUNCTION = ftello64 ))
860 __off64_t __cdecl __MINGW_NOTHROW ftello64 (FILE * stream)
861 { fpos_t __pos; return (fgetpos(stream, &__pos)) ? -1LL : (__off64_t)(__pos); }
862
863 #endif  /* __MSVCRT__ && !__NO_MINGW_LFS */
864 #endif  /* !__STRICT_ANSI__ */
865 #endif  /* _STDIO_H */
866
867 #if ! (defined _STDIO_H && defined _WCHAR_H)
868 /* The following are declared when including either <stdio.h> or <wchar.h>.
869  * If both header include guards are now in place, then we must currently be
870  * including <stdio.h> in its own right, having already processed this block
871  * during prior partial inclusion by <wchar.h>; there is no need to process
872  * it a second time.
873  */
874 _CRTIMP __cdecl __MINGW_NOTHROW  int     fwprintf (FILE *, const wchar_t *, ...);
875 _CRTIMP __cdecl __MINGW_NOTHROW  int     wprintf (const wchar_t *, ...);
876 _CRTIMP __cdecl __MINGW_NOTHROW  int     vfwprintf (FILE *, const wchar_t *, __VALIST);
877 _CRTIMP __cdecl __MINGW_NOTHROW  int     vwprintf (const wchar_t *, __VALIST);
878 _CRTIMP __cdecl __MINGW_NOTHROW  int    _snwprintf (wchar_t *, size_t, const wchar_t *, ...);
879 _CRTIMP __cdecl __MINGW_NOTHROW  int    _vscwprintf (const wchar_t *, __VALIST);
880 _CRTIMP __cdecl __MINGW_NOTHROW  int    _vsnwprintf (wchar_t *, size_t, const wchar_t *, __VALIST);
881 _CRTIMP __cdecl __MINGW_NOTHROW  int     fwscanf (FILE *, const wchar_t *, ...);
882 _CRTIMP __cdecl __MINGW_NOTHROW  int     wscanf (const wchar_t *, ...);
883 _CRTIMP __cdecl __MINGW_NOTHROW  int     swscanf (const wchar_t *, const wchar_t *, ...);
884 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t  fgetwc (FILE *);
885 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t  fputwc (wchar_t, FILE *);
886 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t  ungetwc (wchar_t, FILE *);
887
888 #ifndef __STRICT_ANSI__
889 /* These differ from the ISO C prototypes, which have a maxlen parameter (like snprintf).
890  */
891 _CRTIMP __cdecl __MINGW_NOTHROW  int  swprintf (wchar_t *, const wchar_t *, ...);
892 _CRTIMP __cdecl __MINGW_NOTHROW  int  vswprintf (wchar_t *, const wchar_t *, __VALIST);
893 #endif
894
895 #ifdef __MSVCRT__
896 _CRTIMP __cdecl __MINGW_NOTHROW  wchar_t * fgetws (wchar_t *, int, FILE *);
897 _CRTIMP __cdecl __MINGW_NOTHROW  int       fputws (const wchar_t *, FILE *);
898 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t    getwc (FILE *);
899 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t    getwchar (void);
900 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t    putwc (wint_t, FILE *);
901 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t    putwchar (wint_t);
902
903 #ifndef __STRICT_ANSI__
904 _CRTIMP __cdecl __MINGW_NOTHROW  wchar_t * _getws (wchar_t *);
905 _CRTIMP __cdecl __MINGW_NOTHROW  int       _putws (const wchar_t *);
906 _CRTIMP __cdecl __MINGW_NOTHROW  FILE    * _wfdopen(int, const wchar_t *);
907 _CRTIMP __cdecl __MINGW_NOTHROW  FILE    * _wfopen (const wchar_t *, const wchar_t *);
908 _CRTIMP __cdecl __MINGW_NOTHROW  FILE    * _wfreopen (const wchar_t *, const wchar_t *, FILE *);
909 _CRTIMP __cdecl __MINGW_NOTHROW  FILE    * _wfsopen (const wchar_t *, const wchar_t *, int);
910 _CRTIMP __cdecl __MINGW_NOTHROW  wchar_t * _wtmpnam (wchar_t *);
911 _CRTIMP __cdecl __MINGW_NOTHROW  wchar_t * _wtempnam (const wchar_t *, const wchar_t *);
912 _CRTIMP __cdecl __MINGW_NOTHROW  int       _wrename (const wchar_t *, const wchar_t *);
913 _CRTIMP __cdecl __MINGW_NOTHROW  int       _wremove (const wchar_t *);
914 _CRTIMP __cdecl __MINGW_NOTHROW  void      _wperror (const wchar_t *);
915 _CRTIMP __cdecl __MINGW_NOTHROW  FILE    * _wpopen (const wchar_t *, const wchar_t *);
916
917 #endif  /* !__STRICT_ANSI__ */
918 #endif  /* __MSVCRT__ */
919
920 #ifdef _ISOC99_SOURCE
921 __cdecl __MINGW_NOTHROW  int snwprintf (wchar_t *, size_t, const wchar_t *, ...);
922 __cdecl __MINGW_NOTHROW  int vsnwprintf (wchar_t *, size_t, const wchar_t *, __VALIST);
923
924 #ifndef __NO_INLINE__
925 __CRT_INLINE __cdecl __MINGW_NOTHROW
926 __JMPSTUB__(( FUNCTION = vsnwprintf, REMAPPED = _vsnwprintf ))
927 int vsnwprintf (wchar_t *__s, size_t __n, const wchar_t *__fmt, __VALIST __arg)
928 { return _vsnwprintf ( __s, __n, __fmt, __arg); }
929 #endif
930
931 __cdecl __MINGW_NOTHROW  int  vwscanf (const wchar_t *__restrict__, __VALIST);
932 __cdecl __MINGW_NOTHROW
933 int  vfwscanf (FILE *__restrict__, const wchar_t *__restrict__, __VALIST);
934 __cdecl __MINGW_NOTHROW
935 int  vswscanf (const wchar_t *__restrict__, const wchar_t * __restrict__, __VALIST);
936
937 #endif  /* _ISOC99_SOURCE */
938 #endif  /* ! (_STDIO_H && _WCHAR_H) */
939
940 #if defined _STDIO_H && ! defined __STRICT_ANSI__
941 #if defined __MSVCRT__ && ! defined _NO_OLDNAMES
942 _CRTIMP __cdecl __MINGW_NOTHROW  FILE * wpopen (const wchar_t *, const wchar_t *);
943 #endif
944
945 /* Other non-ANSI wide character functions...
946  */
947 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t _fgetwchar (void);
948 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t _fputwchar (wint_t);
949 _CRTIMP __cdecl __MINGW_NOTHROW  int    _getw (FILE *);
950 _CRTIMP __cdecl __MINGW_NOTHROW  int    _putw (int, FILE *);
951
952 #ifndef _NO_OLDNAMES
953 /* ...and their original names, before Microsoft uglification...
954  */
955 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t  fgetwchar (void);
956 _CRTIMP __cdecl __MINGW_NOTHROW  wint_t  fputwchar (wint_t);
957 _CRTIMP __cdecl __MINGW_NOTHROW  int     getw (FILE *);
958 _CRTIMP __cdecl __MINGW_NOTHROW  int     putw (int, FILE *);
959
960 #endif  /* !_NO_OLDNAMES */
961 #endif  /* !__STRICT_ANSI__ */
962
963 _END_C_DECLS
964
965 #endif  /* ! RC_INVOKED */
966 #endif  /* !_STDIO_H: $RCSfile$: end of file */