Go to most recent revision | Details | 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" |
||
4 | typedef struct { |
||
5 | char* buffer; |
||
6 | int buffersize; |
||
7 | int filesize; |
||
8 | int filepos; |
||
9 | char* filename; |
||
10 | int mode; |
||
11 | } FILE; |
||
12 | #define FILE_OPEN_READ 0 |
||
13 | #define FILE_OPEN_WRITE 1 |
||
14 | #define FILE_OPEN_APPEND 2 |
||
15 | #define FILE_OPEN_TEXT 4 |
||
16 | #define FILE_OPEN_PLUS 8 |
||
17 | #define EOF -1 |
||
18 | extern FILE* fopen(const char* filename, const char *mode); |
||
19 | extern int fclose(FILE* file); |
||
20 | extern int feof(FILE* file); |
||
21 | extern int fflush(FILE* file); |
||
22 | extern int fgetc(FILE* file); |
||
23 | typedef int fpos_t; |
||
24 | extern int fgetpos(FILE* file,fpos_t* pos); |
||
25 | extern int fsetpos(FILE* file,const fpos_t* pos); |
||
26 | extern int fputc(int c,FILE* file); |
||
27 | extern int fread(void* buffer,int size,int count,FILE* file); |
||
28 | extern int fwrite(const void* buffer,int size,int count,FILE* file); |
||
29 | extern long ftell(FILE* file); |
||
30 | #define SEEK_CUR 0 |
||
31 | #define SEEK_END 1 |
||
32 | #define SEEK_SET 2 |
||
33 | extern int fseek(FILE* file,long offset,int origin); |
||
34 | extern void rewind(FILE* file); |
||
35 | extern int fprintf(FILE* file, const char* format, ...); |
||
36 | extern int fscanf(FILE* file,const char* format, ...); |
||
37 | extern int ungetc(int c,FILE* file); |
||
38 | #endif |