Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1.  
  2. #define _READ   0x0001  /* file opened for reading */
  3. #define _WRITE  0x0002  /* file opened for writing */
  4. #define _UNGET  0x0004  /* ungetc has been done */
  5. #define _BIGBUF 0x0008  /* big buffer allocated */
  6. #define _EOF    0x0010  /* EOF has occurred */
  7. #define _SFERR  0x0020  /* error has occurred on this file */
  8. #define _APPEND 0x0080  /* file opened for append */
  9. #define _BINARY 0x0040  /* file is binary, skip CRLF processing */
  10. #define _TMPFIL 0x0800  /* this is a temporary file */
  11. #define _DIRTY  0x1000  /* buffer has been modified */
  12. #define _ISTTY  0x2000  /* is console device */
  13. #define _DYNAMIC 0x4000 /* FILE is dynamically allocated   */
  14. #define _FILEEXT 0x8000 /* lseek with positive offset has been done */
  15. #define _COMMIT 0x0001  /* extended flag: commit OS buffers on flush */
  16.  
  17. typedef struct
  18. {
  19.     char *name;
  20.     unsigned int offset;
  21.     int mode;
  22.     int lock;
  23.     int (*read)(const char *, void *, size_t, size_t, size_t *);
  24.     int (*write)(const char*, const void *, size_t, size_t, size_t*);
  25. }__io_handle;
  26.  
  27. extern __io_handle __io_tab[64];
  28.  
  29. int __io_alloc();
  30. void __io_free(int handle);
  31.  
  32.  
  33.