1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#ifndef FILE_H #define FILE_H #include <stdint.h> #define FILE_MAX_FILES 100; typedef struct { int(* seek)(int offset, int whence); int(* read)(char *buf, int len); int(* wrtie)(char *buf, int len); int(* close)(); int(* stat)(void *buf); void *data; //opaque }file; #endif