]> git.draconx.ca Git - liblbx.git/blobdiff - src/fops.c
liblbx: Add file operations for handling LBX archive members.
[liblbx.git] / src / fops.c
index 834c8b2e776ef0f7c22bdd0ff3b3cc080ced3e04..2a3db82854e56449ba63d100106ac442b2d0d01c 100644 (file)
@@ -115,3 +115,30 @@ const struct lbx_file_ops lbx_pipe_fops = {
        .tell = pipe_tell,
        .eof  = pipe_eof,
 };
+
+static size_t lbx_read(void *buf, size_t size, void *handle)
+{
+       return lbx_file_read(handle, buf, size);
+}
+
+static int lbx_seek(void *handle, long offset, int whence)
+{
+       return lbx_file_seek(handle, offset, whence);
+}
+
+static long lbx_tell(void *handle)
+{
+       return lbx_file_tell(handle);
+}
+
+static int lbx_eof(void *handle)
+{
+       return lbx_file_eof(handle);
+}
+
+const struct lbx_file_ops lbx_arch_fops = {
+       .read = lbx_read,
+       .seek = lbx_seek,
+       .tell = lbx_tell,
+       .eof  = lbx_eof,
+};