VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/msvcrt/stdio.h@ 19711

最後變更 在這個檔案從19711是 19678,由 vboxsync 提交於 16 年 前

opengl: update wine to 1.1.21, add d3d9.dll to build list

  • 屬性 svn:eol-style 設為 native
檔案大小: 7.7 KB
 
1/*
2 * Standard I/O definitions.
3 *
4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
7 */
8
9/*
10 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
11 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
12 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
13 * a choice of LGPL license versions is made available with the language indicating
14 * that LGPLv2 or any later version may be used, or where a choice of which version
15 * of the LGPL is applied is otherwise unspecified.
16 */
17
18#ifndef __WINE_STDIO_H
19#define __WINE_STDIO_H
20
21#include <crtdefs.h>
22
23#ifndef RC_INVOKED
24#include <stdarg.h>
25#endif
26
27#include <pshpack8.h>
28
29/* file._flag flags */
30#define _IOREAD 0x0001
31#define _IOWRT 0x0002
32#define _IOMYBUF 0x0008
33#define _IOEOF 0x0010
34#define _IOERR 0x0020
35#define _IOSTRG 0x0040
36#define _IORW 0x0080
37
38#ifndef NULL
39#ifdef __cplusplus
40#define NULL 0
41#else
42#define NULL ((void *)0)
43#endif
44#endif
45
46#define STDIN_FILENO 0
47#define STDOUT_FILENO 1
48#define STDERR_FILENO 2
49
50/* more file._flag flags, but these conflict with Unix */
51#define _IOFBF 0x0000
52#define _IONBF 0x0004
53#define _IOLBF 0x0040
54
55#define EOF (-1)
56#define FILENAME_MAX 260
57#define TMP_MAX 0x7fff
58#define FOPEN_MAX 20
59#define L_tmpnam 260
60
61#define BUFSIZ 512
62
63#ifndef SEEK_SET
64#define SEEK_SET 0
65#define SEEK_CUR 1
66#define SEEK_END 2
67#endif
68
69#ifndef _FILE_DEFINED
70#define _FILE_DEFINED
71typedef struct _iobuf
72{
73 char* _ptr;
74 int _cnt;
75 char* _base;
76 int _flag;
77 int _file;
78 int _charbuf;
79 int _bufsiz;
80 char* _tmpfname;
81} FILE;
82#endif /* _FILE_DEFINED */
83
84#ifndef _FPOS_T_DEFINED
85typedef __int64 fpos_t;
86#define _FPOS_T_DEFINED
87#endif
88
89#ifdef __cplusplus
90extern "C" {
91#endif
92
93#ifndef _STDIO_DEFINED
94# ifdef __i386__
95FILE* __cdecl __p__iob(void);
96# define _iob (__p__iob())
97# else
98FILE* __cdecl __iob_func(void);
99# define _iob (__iob_func())
100# endif
101#endif /* _STDIO_DEFINED */
102
103#define stdin (_iob+STDIN_FILENO)
104#define stdout (_iob+STDOUT_FILENO)
105#define stderr (_iob+STDERR_FILENO)
106
107#ifndef _STDIO_DEFINED
108#define _STDIO_DEFINED
109int __cdecl _fcloseall(void);
110FILE* __cdecl _fdopen(int,const char*);
111int __cdecl _fgetchar(void);
112int __cdecl _filbuf(FILE*);
113int __cdecl _fileno(FILE*);
114int __cdecl _flsbuf(int,FILE*);
115int __cdecl _flushall(void);
116int __cdecl _fputchar(int);
117FILE* __cdecl _fsopen(const char*,const char*,int);
118int __cdecl _getmaxstdio(void);
119int __cdecl _getw(FILE*);
120int __cdecl _pclose(FILE*);
121FILE* __cdecl _popen(const char*,const char*);
122int __cdecl _putw(int,FILE*);
123int __cdecl _rmtmp(void);
124int __cdecl _setmaxstdio(int);
125int __cdecl _snprintf(char*,size_t,const char*,...);
126char* __cdecl _tempnam(const char*,const char*);
127int __cdecl _unlink(const char*);
128int __cdecl _vscprintf(const char*,__ms_va_list);
129int __cdecl _vsnprintf(char*,size_t,const char*,__ms_va_list);
130
131void __cdecl clearerr(FILE*);
132int __cdecl fclose(FILE*);
133int __cdecl feof(FILE*);
134int __cdecl ferror(FILE*);
135int __cdecl fflush(FILE*);
136int __cdecl fgetc(FILE*);
137int __cdecl fgetpos(FILE*,fpos_t*);
138char* __cdecl fgets(char*,int,FILE*);
139FILE* __cdecl fopen(const char*,const char*);
140int __cdecl fprintf(FILE*,const char*,...);
141int __cdecl fputc(int,FILE*);
142int __cdecl fputs(const char*,FILE*);
143size_t __cdecl fread(void*,size_t,size_t,FILE*);
144FILE* __cdecl freopen(const char*,const char*,FILE*);
145int __cdecl fscanf(FILE*,const char*,...);
146int __cdecl fseek(FILE*,long,int);
147int __cdecl fsetpos(FILE*,fpos_t*);
148long __cdecl ftell(FILE*);
149size_t __cdecl fwrite(const void*,size_t,size_t,FILE*);
150int __cdecl getc(FILE*);
151int __cdecl getchar(void);
152char* __cdecl gets(char*);
153void __cdecl perror(const char*);
154int __cdecl printf(const char*,...);
155int __cdecl putc(int,FILE*);
156int __cdecl putchar(int);
157int __cdecl puts(const char*);
158int __cdecl remove(const char*);
159int __cdecl rename(const char*,const char*);
160void __cdecl rewind(FILE*);
161int __cdecl scanf(const char*,...);
162void __cdecl setbuf(FILE*,char*);
163int __cdecl setvbuf(FILE*,char*,int,size_t);
164int __cdecl sprintf(char*,const char*,...);
165int __cdecl sscanf(const char*,const char*,...);
166FILE* __cdecl tmpfile(void);
167char* __cdecl tmpnam(char*);
168int __cdecl ungetc(int,FILE*);
169int __cdecl vfprintf(FILE*,const char*,__ms_va_list);
170int __cdecl vprintf(const char*,__ms_va_list);
171int __cdecl vsprintf(char*,const char*,__ms_va_list);
172
173#ifndef _WSTDIO_DEFINED
174#define _WSTDIO_DEFINED
175wint_t __cdecl _fgetwchar(void);
176wint_t __cdecl _fputwchar(wint_t);
177wchar_t* __cdecl _getws(wchar_t*);
178int __cdecl _putws(const wchar_t*);
179int __cdecl _snwprintf(wchar_t*,size_t,const wchar_t*,...);
180int __cdecl _vscwprintf(const wchar_t*,__ms_va_list);
181int __cdecl _vsnwprintf(wchar_t*,size_t,const wchar_t*,__ms_va_list);
182FILE* __cdecl _wfdopen(int,const wchar_t*);
183FILE* __cdecl _wfopen(const wchar_t*,const wchar_t*);
184FILE* __cdecl _wfreopen(const wchar_t*,const wchar_t*,FILE*);
185FILE* __cdecl _wfsopen(const wchar_t*,const wchar_t*,int);
186void __cdecl _wperror(const wchar_t*);
187FILE* __cdecl _wpopen(const wchar_t*,const wchar_t*);
188int __cdecl _wremove(const wchar_t*);
189wchar_t* __cdecl _wtempnam(const wchar_t*,const wchar_t*);
190wchar_t* __cdecl _wtmpnam(wchar_t*);
191
192wint_t __cdecl fgetwc(FILE*);
193wchar_t* __cdecl fgetws(wchar_t*,int,FILE*);
194wint_t __cdecl fputwc(wint_t,FILE*);
195int __cdecl fputws(const wchar_t*,FILE*);
196int __cdecl fwprintf(FILE*,const wchar_t*,...);
197int __cdecl fputws(const wchar_t*,FILE*);
198int __cdecl fwscanf(FILE*,const wchar_t*,...);
199wint_t __cdecl getwc(FILE*);
200wint_t __cdecl getwchar(void);
201wchar_t* __cdecl getws(wchar_t*);
202wint_t __cdecl putwc(wint_t,FILE*);
203wint_t __cdecl putwchar(wint_t);
204int __cdecl putws(const wchar_t*);
205int __cdecl swprintf(wchar_t*,const wchar_t*,...);
206int __cdecl swscanf(const wchar_t*,const wchar_t*,...);
207wint_t __cdecl ungetwc(wint_t,FILE*);
208int __cdecl vfwprintf(FILE*,const wchar_t*,__ms_va_list);
209int __cdecl vswprintf(wchar_t*,const wchar_t*,__ms_va_list);
210int __cdecl vwprintf(const wchar_t*,__ms_va_list);
211int __cdecl wprintf(const wchar_t*,...);
212int __cdecl wscanf(const wchar_t*,...);
213#endif /* _WSTDIO_DEFINED */
214
215#endif /* _STDIO_DEFINED */
216
217#ifdef __cplusplus
218}
219#endif
220
221
222static inline FILE* fdopen(int fd, const char *mode) { return _fdopen(fd, mode); }
223static inline int fgetchar(void) { return _fgetchar(); }
224static inline int fileno(FILE* file) { return _fileno(file); }
225static inline int fputchar(int c) { return _fputchar(c); }
226static inline int pclose(FILE* file) { return _pclose(file); }
227static inline FILE* popen(const char* command, const char* mode) { return _popen(command, mode); }
228static inline char* tempnam(const char *dir, const char *prefix) { return _tempnam(dir, prefix); }
229#ifndef _UNLINK_DEFINED
230static inline int unlink(const char* path) { return _unlink(path); }
231#define _UNLINK_DEFINED
232#endif
233static inline int vsnprintf(char *buffer, size_t size, const char *format, __ms_va_list args) { return _vsnprintf(buffer,size,format,args); }
234
235static inline wint_t fgetwchar(void) { return _fgetwchar(); }
236static inline wint_t fputwchar(wint_t wc) { return _fputwchar(wc); }
237static inline int getw(FILE* file) { return _getw(file); }
238static inline int putw(int val, FILE* file) { return _putw(val, file); }
239static inline FILE* wpopen(const wchar_t* command,const wchar_t* mode) { return _wpopen(command, mode); }
240
241#include <poppack.h>
242
243#endif /* __WINE_STDIO_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette