X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/b386d6502db041f0c3fdcecf55dd7563defb6fed..6ebc4527c6a103d0532c08744fb916f951018413:/lib/hreader.h diff --git a/lib/hreader.h b/lib/hreader.h index 9e9a91c..90431c1 100644 --- a/lib/hreader.h +++ b/lib/hreader.h @@ -28,7 +28,7 @@ * Allows files to be read without holding them open. */ struct hreader { - const char *path; /* file to read */ + char *path; /* file to read */ off_t size; /* file size */ off_t read_offset; /* for next hreader_read() */ off_t buf_offset; /* offset of start of buffer */ @@ -44,6 +44,11 @@ struct hreader { */ int hreader_init(const char *path, struct hreader *h); +/** @brief Close a hands-off reader + * @param h Reader to close + */ +void hreader_close(struct hreader *h); + /** @brief Read some bytes * @param h Reader to read from * @param buffer Where to store bytes