X-Git-Url: https://git.distorted.org.uk/~mdw/disorder/blobdiff_plain/d868c56eb7c65b2c5a287998b08201986e361c5f..73df7db645fa36e1e6d732ec34b7020bc316248e:/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