00001 #ifndef H_FALLOC
00002 #define H_FALLOC
00003
00013
00014
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018
00019 static inline long int fadGetFileSize(FD_t fd) {
00020 return fd->fileSize;
00021 }
00022
00023 static inline void fadSetFileSize(FD_t fd, long int fileSize)
00024
00025 {
00026 fd->fileSize = fileSize;
00027 }
00028
00029 static inline unsigned int fadGetFirstFree(FD_t fd) {
00030 return fd->firstFree;
00031 }
00032
00033 static inline void fadSetFirstFree(FD_t fd, unsigned int firstFree)
00034
00035 {
00036 fd->firstFree = firstFree;
00037 }
00038
00041 FD_t fadOpen(const char * path, int flags, mode_t perms)
00042
00043 ;
00044
00050 unsigned int fadAlloc(FD_t fd, unsigned int size)
00051
00052 ;
00053
00058 void fadFree(FD_t fd, unsigned int offset)
00059
00060 ;
00061
00065 int fadFirstOffset(FD_t fd)
00066
00067 ;
00068
00074 int fadNextOffset(FD_t fd, unsigned int lastoff)
00075
00076 ;
00077
00078 #ifdef __cplusplus
00079 }
00080 #endif
00081
00082 #endif