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

@@ -256,19 +256,6 @@ bz2_is_eof(struct input_stream *is)
return false;
}
static bool
bz2_is_seek(G_GNUC_UNUSED struct input_stream *is,
G_GNUC_UNUSED off_t offset, G_GNUC_UNUSED int whence)
{
return false;
}
static int
bz2_is_buffer(G_GNUC_UNUSED struct input_stream *is)
{
return 0;
}
/* exported structures */
static const char *const bz2_extensions[] = {
@@ -280,8 +267,6 @@ static const struct input_plugin bz2_inputplugin = {
.close = bz2_is_close,
.read = bz2_is_read,
.eof = bz2_is_eof,
.seek = bz2_is_seek,
.buffer = bz2_is_buffer
};
const struct archive_plugin bz2_plugin = {