mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-23 07:14:31 +00:00
Encapsulate fseek+ftell idiom in seekSize
This allows a single check for the return value of `seekSize` to verify all three `fseek`+`ftell`+`fseek` calls.
This commit is contained in:
@@ -26,6 +26,9 @@ enum NumberBase {
|
||||
int xfclose(FILE *file);
|
||||
int xclose(int fd);
|
||||
|
||||
// Measure file size with `fseek` and `ftell` idiom
|
||||
long seekSize(FILE *file);
|
||||
|
||||
// Locale-independent character class functions
|
||||
bool isNewline(int c);
|
||||
bool isBlankSpace(int c);
|
||||
|
||||
Reference in New Issue
Block a user