1 | #ifndef WIN32IO_H |
---|
2 | #define WIN32IO_H |
---|
3 | |
---|
4 | #ifdef __BORLANDC__ |
---|
5 | #include <stdarg.h> |
---|
6 | #endif |
---|
7 | |
---|
8 | typedef struct { |
---|
9 | int signature_begin; |
---|
10 | int * (*pfnerrno)(void); |
---|
11 | char ***(*pfnenviron)(void); |
---|
12 | FILE* (*pfnstdin)(void); |
---|
13 | FILE* (*pfnstdout)(void); |
---|
14 | FILE* (*pfnstderr)(void); |
---|
15 | int (*pfnferror)(FILE *fp); |
---|
16 | int (*pfnfeof)(FILE *fp); |
---|
17 | char* (*pfnstrerror)(int e); |
---|
18 | int (*pfnvfprintf)(FILE *pf, const char *format, va_list arg); |
---|
19 | int (*pfnvprintf)(const char *format, va_list arg); |
---|
20 | size_t (*pfnfread)(void *buf, size_t size, size_t count, FILE *pf); |
---|
21 | size_t (*pfnfwrite)(const void *buf, size_t size, size_t count, FILE *pf); |
---|
22 | FILE* (*pfnfopen)(const char *path, const char *mode); |
---|
23 | FILE* (*pfnfdopen)(int fh, const char *mode); |
---|
24 | FILE* (*pfnfreopen)(const char *path, const char *mode, FILE *pf); |
---|
25 | int (*pfnfclose)(FILE *pf); |
---|
26 | int (*pfnfputs)(const char *s,FILE *pf); |
---|
27 | int (*pfnfputc)(int c,FILE *pf); |
---|
28 | int (*pfnungetc)(int c,FILE *pf); |
---|
29 | int (*pfngetc)(FILE *pf); |
---|
30 | int (*pfnfileno)(FILE *pf); |
---|
31 | void (*pfnclearerr)(FILE *pf); |
---|
32 | int (*pfnfflush)(FILE *pf); |
---|
33 | long (*pfnftell)(FILE *pf); |
---|
34 | int (*pfnfseek)(FILE *pf,long offset,int origin); |
---|
35 | int (*pfnfgetpos)(FILE *pf,fpos_t *p); |
---|
36 | int (*pfnfsetpos)(FILE *pf,const fpos_t *p); |
---|
37 | void (*pfnrewind)(FILE *pf); |
---|
38 | FILE* (*pfntmpfile)(void); |
---|
39 | void (*pfnabort)(void); |
---|
40 | int (*pfnfstat)(int fd,struct stat *bufptr); |
---|
41 | int (*pfnstat)(const char *name,struct stat *bufptr); |
---|
42 | int (*pfnpipe)( int *phandles, unsigned int psize, int textmode ); |
---|
43 | FILE* (*pfnpopen)( const char *command, const char *mode ); |
---|
44 | int (*pfnpclose)( FILE *pf); |
---|
45 | int (*pfnsetmode)( int fd, int mode); |
---|
46 | long (*pfnlseek)( int fd, long offset, int origin); |
---|
47 | long (*pfntell)( int fd); |
---|
48 | int (*pfndup)( int fd); |
---|
49 | int (*pfndup2)(int h1, int h2); |
---|
50 | int (*pfnopen)(const char *path, int oflag,...); |
---|
51 | int (*pfnclose)(int fd); |
---|
52 | int (*pfneof)(int fd); |
---|
53 | int (*pfnread)(int fd, void *buf, unsigned int cnt); |
---|
54 | int (*pfnwrite)(int fd, const void *buf, unsigned int cnt); |
---|
55 | int (*pfnopenmode)(int mode); |
---|
56 | int (*pfn_open_osfhandle)(long handle, int flags); |
---|
57 | long (*pfn_get_osfhandle)(int fd); |
---|
58 | int (*pfnspawnvp)(int mode, const char *cmdname, const char *const *argv); |
---|
59 | int (*pfnmkdir)(const char *path); |
---|
60 | int (*pfnrmdir)(const char *path); |
---|
61 | int (*pfnchdir)(const char *path); |
---|
62 | int (*pfnflock)(int fd, int oper); |
---|
63 | int (*pfnexecvp)(const char *cmdname, const char *const *argv); |
---|
64 | void (*pfnperror)(const char *str); |
---|
65 | void (*pfnsetbuf)(FILE *pf, char *buf); |
---|
66 | int (*pfnsetvbuf)(FILE *pf, char *buf, int type, size_t size); |
---|
67 | int (*pfnflushall)(void); |
---|
68 | int (*pfnfcloseall)(void); |
---|
69 | char* (*pfnfgets)(char *s, int n, FILE *pf); |
---|
70 | char* (*pfngets)(char *s); |
---|
71 | int (*pfnfgetc)(FILE *pf); |
---|
72 | int (*pfnputc)(int c, FILE *pf); |
---|
73 | int (*pfnputs)(const char *s); |
---|
74 | int (*pfngetchar)(void); |
---|
75 | int (*pfnputchar)(int c); |
---|
76 | int (*pfnfscanf)(FILE *pf, const char *format, ...); |
---|
77 | int (*pfnscanf)(const char *format, ...); |
---|
78 | void* (*pfnmalloc)(size_t size); |
---|
79 | void* (*pfncalloc)(size_t numitems, size_t size); |
---|
80 | void* (*pfnrealloc)(void *block, size_t size); |
---|
81 | void (*pfnfree)(void *block); |
---|
82 | int signature_end; |
---|
83 | } WIN32_IOSUBSYSTEM; |
---|
84 | |
---|
85 | typedef WIN32_IOSUBSYSTEM *PWIN32_IOSUBSYSTEM; |
---|
86 | |
---|
87 | #endif /* WIN32IO_H */ |
---|