private.h 393 B

123456789101112131415
  1. #include "faux/faux.h"
  2. #include "faux/list.h"
  3. #include "faux/file.h"
  4. /** @brief Chunk size to allocate buffer */
  5. #define FAUX_FILE_CHUNK_SIZE 1024
  6. struct faux_file_s {
  7. int fd; // File descriptor
  8. char *buf; // Data buffer
  9. size_t buf_size; // Current buffer size
  10. size_t len; // Current data length
  11. bool_t eof; // EOF flag
  12. bool_t close_file; // Whether close the file on free function
  13. };