aboutsummaryrefslogtreecommitdiff
path: root/src/file.h
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2023-11-12 15:15:31 +0100
committerJan Sucan <jan@jansucan.com>2023-11-12 15:15:38 +0100
commitbdcce656c964c6d94d85639e3f064fc8aef0c124 (patch)
tree226ee7572421645d6308eb405ccbb254ad9a5837 /src/file.h
parent28ec9477c63342f05c6d7b0d39581c6611f76ab4 (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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/file.h b/src/file.h
index 886098b..3e4a6ee 100644
--- a/src/file.h
+++ b/src/file.h
@@ -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);