Here are a couple of patches that clean up the internal File API and
related things a bit:
0001-Update-types-in-File-API.patch
Make the argument types of the File API match stdio better:
- Change the data buffer to void *, from char *.
- Change FileWrite() data buffer to const on top of that.
- Change amounts to size_t, from int.
In passing, change the FilePrefetch() amount argument from int to
off_t, to match the underlying posix_fadvise().
0002-Remove-unnecessary-casts.patch
Some code carefully cast all data buffer arguments for
BufFileWrite() and BufFileRead() to void *, even though the
arguments are already void * (and AFAICT were never anything else).
Remove this unnecessary clutter.
(I had initially thought these casts were related to the first patch,
but as I said the BufFile API never used char * arguments, so this
turned out to be unrelated, but still weird.)