Subversion Repositories Kolibri OS

Rev

Rev 215 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #ifndef stdio_h
  2. #define stdio_h
  3. #include "mesys.h"
  4. #define NULL ((void*)0)
  5. typedef struct {
  6.   char* buffer;
  7.   int   buffersize;
  8.   int   filesize;
  9.   int   filepos;
  10.   char* filename;
  11.   int   mode;
  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);
  20. extern int fclose(FILE* file);
  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);
  29. extern int fwrite(const void* buffer,int size,int count,FILE* file);
  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
  40.