Changeset 279 for EcnlProtoTool/trunk/ntshell/fatfs/ff.h
- Timestamp:
- Apr 29, 2017, 4:33:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/ntshell/fatfs/ff.h
r278 r279 143 143 /* Directory object structure (DIR) */ 144 144 145 typedef struct {145 typedef struct __dirstream { 146 146 FATFS* fs; /* Pointer to the owner file system object (**do not change order**) */ 147 147 WORD id; /* Owner file system mount ID (**do not change order**) */ … … 162 162 const TCHAR* pat; /* Pointer to the name matching pattern */ 163 163 #endif 164 struct dirent *dirent; 164 165 } DIR; 165 166 … … 252 253 #define f_rewind(fp) f_lseek((fp), 0) 253 254 #define f_rewinddir(dp) f_readdir((dp), 0) 254 #define f_flush(fp) 255 #define f_flush(fp) (FR_OK) 255 256 256 257 #define F_SEEK_SET 1 257 258 #define F_SEEK_CUR 2 258 259 #define F_SEEK_END 3 259 static FRESULT f_seek(FIL* fp, DWORD ofs, BYTE mode) 260 { 261 switch (mode) { 262 case F_SEEK_SET: 263 return f_lseek((fp), ofs); 264 case F_SEEK_CUR: 265 return f_lseek((fp), (fp)->fptr + ofs); 266 case F_SEEK_END: 267 return f_lseek((fp), (fp)->fsize - ofs); 268 default: 269 return FR_INVALID_PARAMETER; 270 } 271 } 260 FRESULT f_seek(FIL* fp, DWORD ofs, BYTE mode); 272 261 273 262 #ifndef EOF
Note:
See TracChangeset
for help on using the changeset viewer.