diff options
| author | Jan Sucan <jan@jansucan.com> | 2023-11-12 15:15:31 +0100 |
|---|---|---|
| committer | Jan Sucan <jan@jansucan.com> | 2023-11-12 15:15:38 +0100 |
| commit | bdcce656c964c6d94d85639e3f064fc8aef0c124 (patch) | |
| tree | 226ee7572421645d6308eb405ccbb254ad9a5837 /src/file.h | |
| parent | 28ec9477c63342f05c6d7b0d39581c6611f76ab4 (diff) | |
Refactor the file size and tell operations
This was done in order to avoid C++ compiler warnings about comparing types with
different signedness.
Diffstat (limited to 'src/file.h')
| -rw-r--r-- | src/file.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -27,10 +27,12 @@ #ifndef FILE_H #define FILE_H +#include <stdbool.h> #include <stdint.h> #include <stdio.h> -long file_size(FILE *const file); +size_t file_size(FILE *const file, bool *const return_is_ok); +size_t file_tell(FILE *const file, bool *const return_is_ok); size_t file_read_sectors(FILE *const file, char *const buffer, uint32_t buffer_size, uint32_t sector_size); |
