X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/d868c56eb7c65b2c5a287998b08201986e361c5f..92db088e5b292c1180a090ed369b9851e933e610:/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