added macros for printf format codes

This commit is contained in:
2025-11-15 12:12:06 +05:00
parent 5ef223372b
commit ae0fa95d6a
5 changed files with 49 additions and 16 deletions

View File

@@ -58,7 +58,7 @@ Result(i64) file_tellPos(FILE* f){
Result(void) file_seek(FILE* f, i64 offset, SeekOrigin origin){
if(IFWIN(_fseeki64, fseeko64)(f, offset, (int)origin) != 0){
return RESULT_ERROR_FMT(
"Can't seek (offset: " IFWIN("%lli", "%li") ", origin: %i) in file: %s",
"Can't seek (offset: "FMT_i64", origin: %i) in file: %s",
offset, origin, strerror(errno));
}
return RESULT_VOID;
@@ -119,7 +119,7 @@ Result(void) file_readStructsExactly(FILE* f, void* dst, u64 struct_size, u64 ex
}
if(r != exact_count){
return RESULT_ERROR_FMT(
"read " IFWIN("%llu", "%lu") " structures out of " IFWIN("%llu", "%lu"),
"read "FMT_u64" structures out of "FMT_u64,
r, exact_count);
}
return RESULT_VOID;