Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
591 B

  1. #ifndef _BUF_
  2. #define _BUF_
  3. //
  4. // Extern declarations and so forth for buffer-management routines.
  5. //
  6. typedef struct _BUF {
  7. char data[512]; // tar depends on this 512
  8. int offset; // offset into data
  9. int count; // how many bytes available?
  10. int fd;
  11. int mode;
  12. } BUF, *PBUF;
  13. PBUF bopen(const char *file, int mode);
  14. PBUF bfdopen(int fd, int mode);
  15. void bclose(PBUF pb);
  16. int bread(PBUF pb, void *buf, int len);
  17. int bwrite(PBUF pb, void *buf, int len);
  18. void bfill(PBUF pb);
  19. void bflush(PBUF pb);
  20. void brewind(PBUF pb);
  21. int bgetc(PBUF pb);
  22. void bputc(PBUF pb, int c);
  23. #endif // _BUF_