tr_file.h 746 B

123456789101112131415161718192021222324252627282930
  1. #ifndef FILE_H_INCLUDED
  2. #define FILE_H_INCLUDED
  3. #include <stdlib.h>
  4. #include <stdarg.h>
  5. #include "config.h"
  6. struct woe_file;
  7. typedef struct woe_file woe_file;
  8. woe_file * woe_file_open(struct woe_config * cfg, char * filename, char * mode);
  9. void woe_file_close(woe_file * file);
  10. size_t woe_file_write(woe_file * file, void * buf, size_t size);
  11. size_t woe_file_read(woe_file * file, void * buf, size_t size);
  12. int woe_file_puts(woe_file * file, char * buf);
  13. int woe_file_gets(woe_file * file, char * buf, int size);
  14. int woe_file_putc(woe_file * file, char c);
  15. int woe_file_getc(woe_file * file, char c);
  16. int woe_mkdir(struct woe_config * cfg, char * filename);
  17. int woe_file_eof(woe_file * file);
  18. int tr_init_file(mrb_state * mrb);
  19. #endif