Bugfix: Fix problems exposed by f_file project tests.
The f_file_access() should have the mode parameter.
Add missing f_file_access_at().
The f_file_clone() and f_file_copy() are treating exclusive incorrectly.
Do not test for exclusive when assigning the file mode, that is not what exclusive is for.
Add missing paramter check in f_file_descriptor(), f_file_read(), f_file_read_block(), f_file_read_until(), f_file_stream_read(), and f_file_stream_read_until().
The return error result for when a file is not a directory should return F_directory_not rather than F_directory.
Remove unneeded parameter check from f_file_mode_set(), f_file_stream_write_until(), and f_file_stream_write_range().
Add missing range.start > range.stop checks where appropriate.
Many of the file stream functions have locked function calls when unlocked function calls should be used.
Such as where feof() should instead be feof_unlocked() and ferror() should instead be ferror_unlocked().
The private_f_file_stream_write_until() function needs to use unlocked function calls and then must be wrapped between manual flockfile() and funlockfile() calls.
Update documentation comments.
Clean up much of the errno checks alphabetic ordering as appropriate.
Clean up the macro definitions, adding more structure and organization.
Add file access mode define macros.
Simplify function calls where the function may be called with different number of parameters.
This is not strictly allowed by the C language but somehow the POSIX standard got these in and implemented.
This is likely done through macros or some fancy linker tricks.
Avoid these uses and instead use the most likely implemented one.
Example:
openat(at_id, path.string, file->flag);
vs
openat(at_id, path.string, file->flag, mode);
The latter is the one chosen to be most likely.
Add missing result checks that without those checks could potentially alter owner/group on files after an error occurred.
The f_file project tests are a works in progress and so there may be more such fixes to come.