Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenstdio.h
Go to the documentation of this file.
00001 00006 #ifndef _INC_STDIO 00007 #define _INC_STDIO 00008 00009 #include <crtdefs.h> 00010 00011 #define __need___va_list 00012 #include <stdarg.h> 00013 00014 #pragma pack(push,_CRT_PACKING) 00015 00016 #ifdef __cplusplus 00017 extern "C" { 00018 #endif 00019 00020 #define BUFSIZ 512 00021 #define _NFILE _NSTREAM_ 00022 #define _NSTREAM_ 512 00023 #define _IOB_ENTRIES 20 00024 #define EOF (-1) 00025 00026 #ifndef _FILE_DEFINED 00027 struct _iobuf { 00028 char *_ptr; 00029 int _cnt; 00030 char *_base; 00031 int _flag; 00032 int _file; 00033 int _charbuf; 00034 int _bufsiz; 00035 char *_tmpfname; 00036 }; 00037 typedef struct _iobuf FILE; 00038 #define _FILE_DEFINED 00039 #endif 00040 00041 #ifdef _POSIX_ 00042 #define _P_tmpdir "/" 00043 #define _wP_tmpdir L"/" 00044 #else 00045 #define _P_tmpdir "\\" 00046 #define _wP_tmpdir L"\\" 00047 #endif 00048 00049 #define L_tmpnam (sizeof(_P_tmpdir) + 12) 00050 00051 #ifdef _POSIX_ 00052 #define L_ctermid 9 00053 #define L_cuserid 32 00054 #endif 00055 00056 #define SEEK_CUR 1 00057 #define SEEK_END 2 00058 #define SEEK_SET 0 00059 00060 #define STDIN_FILENO 0 00061 #define STDOUT_FILENO 1 00062 #define STDERR_FILENO 2 00063 00064 #define FILENAME_MAX 260 00065 #define FOPEN_MAX 20 00066 #define _SYS_OPEN 20 00067 #define TMP_MAX 32767 00068 00069 #ifndef NULL 00070 #ifdef __cplusplus 00071 #define NULL 0 00072 #else 00073 #define NULL ((void *)0) 00074 #endif 00075 #endif 00076 00077 #ifndef _OFF_T_DEFINED 00078 #define _OFF_T_DEFINED 00079 #ifndef _OFF_T_ 00080 #define _OFF_T_ 00081 typedef long _off_t; 00082 #if !defined(NO_OLDNAMES) || defined(_POSIX) 00083 typedef long off_t; 00084 #endif 00085 #endif 00086 #endif 00087 00088 #ifndef _OFF64_T_DEFINED 00089 #define _OFF64_T_DEFINED 00090 __MINGW_EXTENSION typedef long long _off64_t; 00091 #if !defined(NO_OLDNAMES) || defined(_POSIX) 00092 __MINGW_EXTENSION typedef long long off64_t; 00093 #endif 00094 #endif 00095 00096 #ifndef _STDIO_DEFINED 00097 _CRTIMP FILE *__cdecl __iob_func(void); 00098 _CRTDATA(extern FILE _iob[];) 00099 #ifdef _M_CEE_PURE 00100 #define _iob __iob_func() 00101 #endif 00102 #endif 00103 00104 #ifndef _FPOS_T_DEFINED 00105 #define _FPOS_T_DEFINED 00106 #undef _FPOSOFF 00107 00108 #if (!defined(NO_OLDNAMES) || defined(__GNUC__)) && _INTEGRAL_MAX_BITS >= 64 00109 __MINGW_EXTENSION typedef __int64 fpos_t; 00110 #define _FPOSOFF(fp) ((long)(fp)) 00111 #else 00112 __MINGW_EXTENSION typedef long long fpos_t; 00113 #define _FPOSOFF(fp) ((long)(fp)) 00114 #endif 00115 00116 #endif 00117 00118 #ifndef _STDSTREAM_DEFINED 00119 #define _STDSTREAM_DEFINED 00120 #define stdin (&_iob[0]) 00121 #define stdout (&_iob[1]) 00122 #define stderr (&_iob[1]) 00123 #endif /* !_STDSTREAM_DEFINED */ 00124 00125 #define _IOREAD 0x0001 00126 #define _IOWRT 0x0002 00127 00128 #define _IOFBF 0x0000 00129 #define _IOLBF 0x0040 00130 #define _IONBF 0x0004 00131 00132 #define _IOMYBUF 0x0008 00133 #define _IOEOF 0x0010 00134 #define _IOERR 0x0020 00135 #define _IOSTRG 0x0040 00136 #define _IORW 0x0080 00137 00138 #define _TWO_DIGIT_EXPONENT 0x1 00139 00140 #ifndef _STDIO_DEFINED 00141 00142 _CRTIMP int __cdecl _filbuf(FILE *_File); 00143 _CRTIMP int __cdecl _flsbuf(int _Ch,FILE *_File); 00144 #ifdef _POSIX_ 00145 _CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode); 00146 #else 00147 _CRTIMP FILE *__cdecl _fsopen(const char *_Filename,const char *_Mode,int _ShFlag); 00148 #endif 00149 _CRTIMP void __cdecl clearerr(FILE *_File); 00150 _CRTIMP int __cdecl fclose(FILE *_File); 00151 _CRTIMP int __cdecl _fcloseall(void); 00152 #ifdef _POSIX_ 00153 FILE *__cdecl fdopen(int _FileHandle,const char *_Mode); 00154 #else 00155 _CRTIMP FILE *__cdecl _fdopen(int _FileHandle,const char *_Mode); 00156 #endif 00157 _CRTIMP int __cdecl feof(FILE *_File); 00158 _CRTIMP int __cdecl ferror(FILE *_File); 00159 _CRTIMP int __cdecl fflush(FILE *_File); 00160 _CRTIMP int __cdecl fgetc(FILE *_File); 00161 _CRTIMP int __cdecl _fgetchar(void); 00162 _CRTIMP int __cdecl fgetpos(FILE *_File ,fpos_t *_Pos); 00163 _CRTIMP char *__cdecl fgets(char *_Buf,int _MaxCount,FILE *_File); 00164 #ifdef _POSIX_ 00165 int __cdecl fileno(FILE *_File); 00166 #else 00167 _CRTIMP int __cdecl _fileno(FILE *_File); 00168 #endif 00169 _CRTIMP char *__cdecl _tempnam(const char *_DirName,const char *_FilePrefix); 00170 _CRTIMP int __cdecl _flushall(void); 00171 _CRTIMP FILE *__cdecl fopen(const char *_Filename,const char *_Mode); 00172 _CRTIMP int __cdecl fprintf(FILE *_File,const char *_Format,...); 00173 _CRTIMP int __cdecl fputc(int _Ch,FILE *_File); 00174 _CRTIMP int __cdecl _fputchar(int _Ch); 00175 _CRTIMP int __cdecl fputs(const char *_Str,FILE *_File); 00176 _CRTIMP size_t __cdecl fread(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File); 00177 _CRTIMP _CRT_INSECURE_DEPRECATE(freopen_s) FILE *__cdecl freopen(const char *_Filename,const char *_Mode,FILE *_File); 00178 _CRTIMP _CRT_INSECURE_DEPRECATE(fscanf_s) int __cdecl fscanf(FILE *_File,const char *_Format,...); 00179 _CRTIMP int __cdecl fsetpos(FILE *_File,const fpos_t *_Pos); 00180 _CRTIMP int __cdecl fseek(FILE *_File,long _Offset,int _Origin); 00181 _CRTIMP long __cdecl ftell(FILE *_File); 00182 __MINGW_EXTENSION _CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin); 00183 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _ftelli64(FILE *_File); 00184 _CRTIMP size_t __cdecl fwrite(const void *_Str,size_t _Size,size_t _Count,FILE *_File); 00185 _CRTIMP int __cdecl getc(FILE *_File); 00186 _CRTIMP int __cdecl getchar(void); 00187 _CRTIMP int __cdecl _getmaxstdio(void); 00188 _CRTIMP char *__cdecl gets(char *_Buffer); // FIXME: non-standard 00189 _CRTIMP int __cdecl _getw(FILE *_File); 00190 #ifndef _CRT_PERROR_DEFINED 00191 #define _CRT_PERROR_DEFINED 00192 _CRTIMP void __cdecl perror(const char *_ErrMsg); 00193 #endif 00194 _CRTIMP int __cdecl _pclose(FILE *_File); 00195 _CRTIMP FILE *__cdecl _popen(const char *_Command,const char *_Mode); 00196 _CRTIMP int __cdecl printf(const char *_Format,...); 00197 _CRTIMP int __cdecl putc(int _Ch,FILE *_File); 00198 _CRTIMP int __cdecl putchar(int _Ch); 00199 _CRTIMP int __cdecl puts(const char *_Str); 00200 _CRTIMP int __cdecl _putw(int _Word,FILE *_File); 00201 #ifndef _CRT_DIRECTORY_DEFINED 00202 #define _CRT_DIRECTORY_DEFINED 00203 _CRTIMP int __cdecl remove(const char *_Filename); 00204 _CRTIMP int __cdecl rename(const char *_OldFilename,const char *_NewFilename); 00205 _CRTIMP int __cdecl _unlink(const char *_Filename); 00206 #ifndef NO_OLDNAMES 00207 _CRTIMP _CRT_NONSTDC_DEPRECATE(_unlink) int __cdecl unlink(const char *_Filename); 00208 #endif 00209 #endif 00210 _CRTIMP void __cdecl rewind(FILE *_File); 00211 _CRTIMP int __cdecl _rmtmp(void); 00212 _CRTIMP _CRT_INSECURE_DEPRECATE_CORE(scanf_s) int __cdecl scanf(const char *_Format,...); 00213 _CRTIMP _CRT_INSECURE_DEPRECATE(setvbuf) void __cdecl setbuf(FILE *_File,char *_Buffer); 00214 _CRTIMP int __cdecl _setmaxstdio(int _Max); 00215 _CRTIMP unsigned int __cdecl _set_output_format(unsigned int _Format); 00216 _CRTIMP unsigned int __cdecl _get_output_format(void); 00217 _CRTIMP int __cdecl setvbuf(FILE *_File,char *_Buf,int _Mode,size_t _Size); 00218 _CRTIMP int __cdecl _scprintf(const char *_Format,...); 00219 _CRTIMP _CRT_INSECURE_DEPRECATE_CORE(sscanf_s) int __cdecl sscanf(const char *_Src,const char *_Format,...); 00220 _CRTIMP _CRT_INSECURE_DEPRECATE_CORE(_snscanf_s) int __cdecl _snscanf(const char *_Src,size_t _MaxCount,const char *_Format,...); 00221 _CRTIMP _CRT_INSECURE_DEPRECATE(tmpfile_s) FILE *__cdecl tmpfile(void); 00222 _CRTIMP char *__cdecl tmpnam(char *_Buffer); 00223 _CRTIMP_ALT int __cdecl ungetc(int _Ch,FILE *_File); 00224 _CRTIMP int __cdecl vfprintf(FILE *_File,const char *_Format,va_list _ArgList); 00225 _CRTIMP int __cdecl vprintf(const char *_Format,va_list _ArgList); 00226 /* Make sure macros are not defined. */ 00227 #if __MINGW_GNUC_PREREQ(4,4) 00228 #pragma push_macro("vsnprintf") 00229 #pragma push_macro("snprintf") 00230 #endif 00231 #undef vsnprintf 00232 #undef snprintf 00233 _CRTIMP _CRT_INSECURE_DEPRECATE(vsnprintf_s) int __cdecl vsnprintf(char *_DstBuf,size_t _MaxCount,const char *_Format,va_list _ArgList); 00234 _CRTIMP int __cdecl _snprintf(char *_Dest,size_t _Count,const char *_Format,...); 00235 _CRTIMP int __cdecl _vsnprintf(char *_Dest,size_t _Count,const char *_Format,va_list _Args); 00236 int __cdecl sprintf(char *_Dest,const char *_Format,...); 00237 int __cdecl vsprintf(char *_Dest,const char *_Format,va_list _Args); 00238 #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ 00239 int __cdecl snprintf(char* s, size_t n, const char* format, ...); 00240 int __cdecl vscanf(const char * __restrict__ Format, va_list argp); 00241 int __cdecl vfscanf (FILE * __restrict__ fp, const char * Format,va_list argp); 00242 int __cdecl vsscanf (const char * __restrict__ _Str,const char * __restrict__ Format,va_list argp); 00243 #endif 00244 /* Restore may prior defined macros snprintf/vsnprintf. */ 00245 #if __MINGW_GNUC_PREREQ(4,4) 00246 #pragma pop_macro("snprintf") 00247 #pragma pop_macro("vsnprintf") 00248 #endif 00249 00250 #ifndef vsnprintf 00251 #define vsnprintf _vsnprintf 00252 #endif 00253 #ifndef snprintf 00254 #define snprintf _snprintf 00255 #endif 00256 00257 _CRTIMP int __cdecl _vscprintf(const char *_Format,va_list _ArgList); 00258 #ifdef _SAFECRT_IMPL 00259 #define _set_printf_count_output(i) 00260 #define _get_printf_count_output() (FALSE) 00261 #else 00262 _CRTIMP int __cdecl _set_printf_count_output(int _Value); 00263 _CRTIMP int __cdecl _get_printf_count_output(void); 00264 #endif 00265 00266 #ifndef _WSTDIO_DEFINED 00267 00268 #ifndef WEOF 00269 #define WEOF (wint_t)(0xFFFF) 00270 #endif 00271 00272 #ifdef _POSIX_ 00273 _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode); 00274 #else 00275 _CRTIMP FILE *__cdecl _wfsopen(const wchar_t *_Filename,const wchar_t *_Mode,int _ShFlag); 00276 #endif 00277 _CRTIMP wint_t __cdecl fgetwc(FILE *_File); 00278 _CRTIMP wint_t __cdecl _fgetwchar(void); 00279 _CRTIMP wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File); 00280 _CRTIMP wint_t __cdecl _fputwchar(wchar_t _Ch); 00281 _CRTIMP wint_t __cdecl getwc(FILE *_File); 00282 _CRTIMP wint_t __cdecl getwchar(void); 00283 _CRTIMP wint_t __cdecl putwc(wchar_t _Ch,FILE *_File); 00284 _CRTIMP wint_t __cdecl putwchar(wchar_t _Ch); 00285 _CRTIMP wint_t __cdecl ungetwc(wint_t _Ch,FILE *_File); 00286 _CRTIMP wchar_t *__cdecl fgetws(wchar_t *_Dst,int _SizeInWords,FILE *_File); 00287 _CRTIMP int __cdecl fputws(const wchar_t *_Str,FILE *_File); 00288 _CRTIMP wchar_t *__cdecl _getws(wchar_t *_String); 00289 _CRTIMP int __cdecl _putws(const wchar_t *_Str); 00290 _CRTIMP int __cdecl fwprintf(FILE *_File,const wchar_t *_Format,...); 00291 _CRTIMP int __cdecl wprintf(const wchar_t *_Format,...); 00292 _CRTIMP int __cdecl _scwprintf(const wchar_t *_Format,...); 00293 _CRTIMP int __cdecl vfwprintf(FILE *_File,const wchar_t *_Format,va_list _ArgList); 00294 _CRTIMP int __cdecl vwprintf(const wchar_t *_Format,va_list _ArgList); 00295 _CRTIMP int __cdecl swprintf(wchar_t*, const wchar_t*, ...); 00296 _CRTIMP int __cdecl vswprintf(wchar_t*, const wchar_t*,va_list); 00297 _CRTIMP int __cdecl _swprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,...); 00298 _CRTIMP int __cdecl _vswprintf_c(wchar_t *_DstBuf,size_t _SizeInWords,const wchar_t *_Format,va_list _ArgList); 00299 _CRTIMP int __cdecl _snwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,...); 00300 _CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest,size_t _Count,const wchar_t *_Format,va_list _Args); 00301 #ifndef __NO_ISOCEXT /* externs in libmingwex.a */ 00302 _CRTIMP int __cdecl snwprintf (wchar_t* s, size_t n, const wchar_t* format, ...); 00303 __CRT_INLINE int __cdecl vsnwprintf (wchar_t* s, size_t n, const wchar_t* format, va_list arg) 00304 { 00305 #ifdef _MSC_VER 00306 #pragma warning(push) 00307 #pragma warning(disable:28719) /* disable banned api usage warning */ 00308 #endif /* _MSC_VER */ 00309 return _vsnwprintf(s,n,format,arg); 00310 #ifdef _MSC_VER 00311 #pragma warning(pop) 00312 #endif /* _MSC_VER */ 00313 } 00314 _CRTIMP int __cdecl vwscanf (const wchar_t *, va_list); 00315 _CRTIMP int __cdecl vfwscanf (FILE *,const wchar_t *,va_list); 00316 _CRTIMP int __cdecl vswscanf (const wchar_t *,const wchar_t *,va_list); 00317 #endif 00318 _CRTIMP int __cdecl _swprintf(wchar_t *_Dest,const wchar_t *_Format,...); 00319 _CRTIMP int __cdecl _vswprintf(wchar_t *_Dest,const wchar_t *_Format,va_list _Args); 00320 00321 #ifndef RC_INVOKED 00322 #include <vadefs.h> 00323 #endif 00324 00325 #ifdef _CRT_NON_CONFORMING_SWPRINTFS 00326 #ifndef __cplusplus 00327 #define swprintf _swprintf 00328 #define vswprintf _vswprintf 00329 #define _swprintf_l __swprintf_l 00330 #define _vswprintf_l __vswprintf_l 00331 #endif 00332 #endif 00333 00334 _CRTIMP wchar_t *__cdecl _wtempnam(const wchar_t *_Directory,const wchar_t *_FilePrefix); 00335 _CRTIMP int __cdecl _vscwprintf(const wchar_t *_Format,va_list _ArgList); 00336 _CRTIMP int __cdecl fwscanf(FILE *_File,const wchar_t *_Format,...); 00337 _CRTIMP int __cdecl swscanf(const wchar_t *_Src,const wchar_t *_Format,...); 00338 _CRTIMP int __cdecl _snwscanf(const wchar_t *_Src,size_t _MaxCount,const wchar_t *_Format,...); 00339 _CRTIMP int __cdecl wscanf(const wchar_t *_Format,...); 00340 _CRTIMP FILE *__cdecl _wfdopen(int _FileHandle ,const wchar_t *_Mode); 00341 _CRTIMP FILE *__cdecl _wfopen(const wchar_t *_Filename,const wchar_t *_Mode); 00342 _CRTIMP FILE *__cdecl _wfreopen(const wchar_t *_Filename,const wchar_t *_Mode,FILE *_OldFile); 00343 #ifndef _CRT_WPERROR_DEFINED 00344 #define _CRT_WPERROR_DEFINED 00345 _CRTIMP void __cdecl _wperror(const wchar_t *_ErrMsg); 00346 #endif 00347 _CRTIMP FILE *__cdecl _wpopen(const wchar_t *_Command,const wchar_t *_Mode); 00348 #if !defined(NO_OLDNAMES) && !defined(wpopen) 00349 #define wpopen _wpopen 00350 #endif 00351 _CRTIMP int __cdecl _wremove(const wchar_t *_Filename); 00352 _CRTIMP wchar_t *__cdecl _wtmpnam(wchar_t *_Buffer); 00353 _CRTIMP wint_t __cdecl _fgetwc_nolock(FILE *_File); 00354 _CRTIMP wint_t __cdecl _fputwc_nolock(wchar_t _Ch,FILE *_File); 00355 _CRTIMP wint_t __cdecl _ungetwc_nolock(wint_t _Ch,FILE *_File); 00356 00357 #undef _CRT_GETPUTWCHAR_NOINLINE 00358 00359 #if !defined(__cplusplus) || defined(_CRT_GETPUTWCHAR_NOINLINE) 00360 #define getwchar() fgetwc(stdin) 00361 #define putwchar(_c) fputwc((_c),stdout) 00362 #else 00363 __CRT_INLINE wint_t __cdecl getwchar() { return (fgetwc(stdin)); } 00364 __CRT_INLINE wint_t __cdecl putwchar(wchar_t _C) { return (fputwc(_C,stdout)); } 00365 #endif 00366 00367 #define getwc(_stm) fgetwc(_stm) 00368 #define putwc(_c,_stm) fputwc(_c,_stm) 00369 #define _putwc_nolock(_c,_stm) _fputwc_nolock(_c,_stm) 00370 #define _getwc_nolock(_stm) _fgetwc_nolock(_stm) 00371 00372 #define _WSTDIO_DEFINED 00373 #endif 00374 00375 #define _STDIO_DEFINED 00376 #endif 00377 00378 #define _fgetc_nolock(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream)) 00379 #define _fputc_nolock(_c,_stream) (--(_stream)->_cnt >= 0 ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream))) 00380 #define _getc_nolock(_stream) _fgetc_nolock(_stream) 00381 #define _putc_nolock(_c,_stream) _fputc_nolock(_c,_stream) 00382 #define _getchar_nolock() _getc_nolock(stdin) 00383 #define _putchar_nolock(_c) _putc_nolock((_c),stdout) 00384 #define _getwchar_nolock() _getwc_nolock(stdin) 00385 #define _putwchar_nolock(_c) _putwc_nolock((_c),stdout) 00386 00387 _CRTIMP void __cdecl _lock_file(FILE *_File); 00388 _CRTIMP void __cdecl _unlock_file(FILE *_File); 00389 _CRTIMP int __cdecl _fclose_nolock(FILE *_File); 00390 _CRTIMP int __cdecl _fflush_nolock(FILE *_File); 00391 _CRTIMP size_t __cdecl _fread_nolock(void *_DstBuf,size_t _ElementSize,size_t _Count,FILE *_File); 00392 _CRTIMP int __cdecl _fseek_nolock(FILE *_File,long _Offset,int _Origin); 00393 _CRTIMP long __cdecl _ftell_nolock(FILE *_File); 00394 __MINGW_EXTENSION _CRTIMP int __cdecl _fseeki64_nolock(FILE *_File,__int64 _Offset,int _Origin); 00395 __MINGW_EXTENSION _CRTIMP __int64 __cdecl _ftelli64_nolock(FILE *_File); 00396 _CRTIMP size_t __cdecl _fwrite_nolock(const void *_DstBuf,size_t _Size,size_t _Count,FILE *_File); 00397 _CRTIMP int __cdecl _ungetc_nolock(int _Ch,FILE *_File); 00398 00399 #if !defined(NO_OLDNAMES) || !defined(_POSIX) 00400 #define P_tmpdir _P_tmpdir 00401 #define SYS_OPEN _SYS_OPEN 00402 00403 _CRTIMP char *__cdecl tempnam(const char *_Directory,const char *_FilePrefix); 00404 _CRTIMP int __cdecl fcloseall(void); 00405 _CRTIMP FILE *__cdecl fdopen(int _FileHandle,const char *_Format); 00406 _CRTIMP int __cdecl fgetchar(void); 00407 _CRTIMP int __cdecl fileno(FILE *_File); 00408 _CRTIMP int __cdecl flushall(void); 00409 _CRTIMP int __cdecl fputchar(int _Ch); 00410 _CRTIMP int __cdecl getw(FILE *_File); 00411 _CRTIMP int __cdecl putw(int _Ch,FILE *_File); 00412 _CRTIMP int __cdecl rmtmp(void); 00413 #endif 00414 00415 #ifdef __cplusplus 00416 } 00417 #endif 00418 00419 #pragma pack(pop) 00420 00421 #include <sec_api/stdio_s.h> 00422 00423 #endif Generated on Sun May 27 2012 04:28:47 for ReactOS by
1.7.6.1
|