francescosacco / forkfs Goto Github PK
View Code? Open in Web Editor NEWIt's a fork from FatFS. The original project is from ELM-Chan.
License: Other
It's a fork from FatFS. The original project is from ELM-Chan.
License: Other
There is some QWORD variables at the code. The definition of this type uses unsigned long long, and it's not compatible using ANSI C (C89).
It's important to try check if it's possible to keep the definition, or define just if it's not C89.
Remove FF_VOLUME_STRS definition.
There's no reason to use it.
Remove the FF_FS_TINY definition.
Remove mem_cpy() to use memcpy() from String.h.
Remove integer types to use Standard Integer.
It's defined at integer.h with name QWORD.
Remove integer types to use Standard Integer.
It's defined at integer.h with name BYTE.
The if() shouldn't have functions as condition. The function's return must be at a variable to be used as condition.
Remove DEF_NAMBUF definition.
Remove FF_USE_EXPAND definition.
This definition enable relative path commands.
We can keed 2 for all functions enabled.
#define FF_FS_RPATH 2
/* This option configures support for relative path.
/ 0: Disable relative path and remove related functions.
/ 1: Enable relative path. f_chdir() and f_chdrive() are available.
/ 2: f_getcwd() function is available in addition to 1.
*/
There's no reason to minimize this version.
Remove FF_FS_MINIMIZE.
The function f_setcp() has the codepage parameter. It's a uint16_t number with the codepage number.
If you change to use enum, it'll not be necessary any check.
The if() shouldn't have functions as condition. The function's return must be at a variable to be used as condition.
Change codepage definitions to be dynamic.
Remove FF_USE_FIND definition.
Remove FF_USE_FORWARD definition.
Change types to use low case.
For example, FRESULT should be fResult_t.
The FILINFO can be changed to fileInfo_t.
The list is:
Remove FF_USE_LABEL definition.
Remove FF_USE_FASTSEEK definition.
Remove FREE_NAMBUF definition.
Remove integer types to use Standard Integer.
It's defined at integer.h with name LONG and DWORD.
The if() shouldn't have functions as condition. The function's return must be at a variable to be used as condition.
Remove FF_USE_MKFS definition.
Remove chk_chr() to use strchr() from String.h.
The function check_fs() return some defined numbers. There are some variables at the code that uses same variables to this returns and fs_type_t.
If the return from this functions changes to use enum, it'll force to use different variables. It'll avoid mistakes.
It's a good practice to use braces even if the code has one line.
Add braces.
Remove INIT_NAMBUF definition.
At this point, there's no meaning to have a version define to lock ff.c and ff.h.
Remove FFCONF_DEF.
Remove FF_MULTI_PARTITION definition.
Remove integer.h to use just stdint.h.
Change one line if to correct format.
Create function's pointers to do the DiskIO.c access.
The if() shouldn't have functions as condition. The function's return must be at a variable to be used as condition.
It's possible to use UINTMAX_MAX definition, from stdint to check if the compiler support 64bits integer.
Remove mem_set() to use memset() from String.h.
Remove integer types to use Standard Integer.
It's defined at integer.h with name INT and UINT.
Move the DiskIO error codes to ff.h.
The definitions should be at column 50.
There are TABs characters.
Change to space.
Load DiskIO functions at fmount().
Remove integer types to use Standard Integer.
It's defined at integer.h with name SHORT, WORD and WCHAR.
Remove FF_USE_CHMOD definition.
Remove mem_cmp() to use memcmp() from String.h.
There is no reason to have a fixed Sector Size.
So, FF_MIN_SS and FF_MAX_SS will always be different.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.