mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 11:25:45 +01:00
write a function for deleting a specific chunk.
This commit is contained in:
@@ -11,9 +11,13 @@
|
||||
struct mcx_chunk {
|
||||
size_t idx; // byte offset for start of chunk data
|
||||
u32 len; // byte length of chunk (+ padding)
|
||||
u32 time; // modification time in epoch seconds
|
||||
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);
|
||||
|
||||
/* indexes the chunks in an `*.mcX` file, writing `0x400` of entries to `chunks` */
|
||||
void mcx_index(const u8 *restrict buf, struct mcx_chunk *restrict chunks) NONNULL((1, 2));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user