input_stream: make seek(), buffer() optional

Make those two methods optional to implement, and let input_stream.c
provide fallbacks.  The buffer() method will be removed one day, and
there is now only one implementation left (input_curl.c).
This commit is contained in:
Max Kellermann
2009-01-30 00:58:03 +01:00
parent 82cfce76eb
commit 32d6d4499e
5 changed files with 7 additions and 44 deletions

View File

@@ -211,19 +211,6 @@ iso_is_eof(struct input_stream *is)
return (context->cur_ofs == context->statbuf->size);
}
static bool
iso_is_seek(G_GNUC_UNUSED struct input_stream *is,
G_GNUC_UNUSED off_t offset, G_GNUC_UNUSED int whence)
{
return false;
}
static int
iso_is_buffer(G_GNUC_UNUSED struct input_stream *is)
{
return 0;
}
/* exported structures */
static const char *const iso_extensions[] = {
@@ -235,8 +222,6 @@ static const struct input_plugin iso_inputplugin = {
.close = iso_is_close,
.read = iso_is_read,
.eof = iso_is_eof,
.seek = iso_is_seek,
.buffer = iso_is_buffer
};
const struct archive_plugin iso_plugin = {