Rev 560 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
145 | halyavin | 1 | #ifndef stdio_h |
2 | #define stdio_h |
||
3 | #include "mesys.h" |
||
560 | victor | 4 | #define NULL ((void*)0) |
145 | halyavin | 5 | typedef struct { |
611 | andrew_pro | 6 | char* buffer; |
7 | dword buffersize; |
||
8 | dword filesize; |
||
9 | dword filepos; |
||
10 | char* filename; |
||
11 | int mode; |
||
145 | halyavin | 12 | } FILE; |
13 | #define FILE_OPEN_READ 0 |
||
14 | #define FILE_OPEN_WRITE 1 |
||
15 | #define FILE_OPEN_APPEND 2 |
||
16 | #define FILE_OPEN_TEXT 4 |
||
17 | #define FILE_OPEN_PLUS 8 |
||
18 | #define EOF -1 |
||
19 | extern FILE* fopen(const char* filename, const char *mode); |
||
611 | andrew_pro | 20 | extern void fclose(FILE* file); |
145 | halyavin | 21 | extern int feof(FILE* file); |
22 | extern int fflush(FILE* file); |
||
23 | extern int fgetc(FILE* file); |
||
24 | typedef int fpos_t; |
||
25 | extern int fgetpos(FILE* file,fpos_t* pos); |
||
26 | extern int fsetpos(FILE* file,const fpos_t* pos); |
||
27 | extern int fputc(int c,FILE* file); |
||
28 | extern int fread(void* buffer,int size,int count,FILE* file); |
||
611 | andrew_pro | 29 | extern int fwrite(void *buffer,int size,int count,FILE* file); |
145 | halyavin | 30 | extern long ftell(FILE* file); |
31 | #define SEEK_CUR 0 |
||
32 | #define SEEK_END 1 |
||
33 | #define SEEK_SET 2 |
||
34 | extern int fseek(FILE* file,long offset,int origin); |
||
35 | extern void rewind(FILE* file); |
||
36 | extern int fprintf(FILE* file, const char* format, ...); |
||
37 | extern int fscanf(FILE* file,const char* format, ...); |
||
38 | extern int ungetc(int c,FILE* file); |
||
39 | #endif |