From: Robert Spalek Date: Fri, 25 Jun 2004 14:52:37 +0000 (+0000) Subject: implemented bconfig in the internal fastbuf X-Git-Tag: holmes-import~1018 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e6eea48b5e628e7f26b7461e6d15d77d5b5d5394;p=libucw.git implemented bconfig in the internal fastbuf --- diff --git a/lib/bucket.c b/lib/bucket.c index 38836e80..2b7dc27a 100644 --- a/lib/bucket.c +++ b/lib/bucket.c @@ -300,6 +300,18 @@ obuck_find_next(struct obuck_header *hdrp, int full) } } +static int +obuck_bconfig(struct fastbuf *f UNUSED, uns item, int value UNUSED) +{ + switch (item) + { + case BCONFIG_CAN_OVERWRITE: + return 2; + default: + return -1; + } +} + struct fastbuf * obuck_fetch(void) { @@ -316,7 +328,7 @@ obuck_fetch(void) b->spout = NULL; b->seek = NULL; b->close = obuck_fb_close; - b->config = NULL; + b->config = obuck_bconfig; FB_BUCKET(b)->start_pos = bucket_find_pos; FB_BUCKET(b)->bucket_size = obuck_hdr.length; obuck_fb_count++;