#ifndef __LIBUTILS_FILE_USE_H #define __LIBUTILS_FILE_USE_H #include #include #include #include "debug.h" #define F_FILE_NONE 0 #define F_FILE_READ 1 #define F_FILE_WRITE 2 #define F_FILE_RW 3 #define F_SEEK_CUR SEEK_CUR #define F_SEEK_END SEEK_END #define F_SEEK_SET SEEK_SET //simple file using things typedef struct f_file { FILE *fid; int flags; long size; int seek; } f_file; void f_file_null( f_file* ); int f_file_seek( f_file*, long, int ); size_t f_file_read( f_file*, size_t, void* ); //f_file_read_bl(); int f_file_size( f_file* ); size_t f_file_write( f_file*, size_t, void* ); //f_file_write_bl(); f_file* f_file_open( const char*, int ); int f_file_close( f_file* ); //f_file_flush(); //f_file_mmap(); #endif