refactor of mcx_delchunk to make things a bit more clear and flexible

This commit is contained in:
2025-08-27 12:03:00 +02:00
parent 43e3e4fe85
commit 767f3a5c13
2 changed files with 23 additions and 17 deletions

View File

@@ -14,9 +14,8 @@ struct mcx_chunk {
u32 time; // modification time in epoch seconds
};
// TODO: should return some form of feedback about its success
/* Deletes chunk `idx` from `buf`, moving all chunks downwards in the process. */
void mcx_delchunk(u8 *restrict buf, int idx);
size_t mcx_delchunk(u8 *restrict buf, int idx);
/* Computes the byte size of the `*.mcX` file in `buf` and returns it. */
size_t mcx_calcsize(const u8 *restrict buf) NONNULL((1)) PURE;