X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ffb-buffer.c;h=b06088e0c3a028e6167a4f78a23887ecfd42cb31;hb=6829bc0163f6ecfc8ae70ee7b3ce2b79e7484dfe;hp=5a248efdf85ee1c332c54a16a6942bea7ea73ef5;hpb=49edfa12025a3552d1cfcd2a936201c1da95148a;p=libucw.git diff --git a/lib/fb-buffer.c b/lib/fb-buffer.c index 5a248efd..b06088e0 100644 --- a/lib/fb-buffer.c +++ b/lib/fb-buffer.c @@ -1,8 +1,7 @@ /* - * Sherlock Library -- Fast Buffered I/O on Static Buffers + * UCW Library -- Fast Buffered I/O on Static Buffers * - * (c) 2003 Martin Mares - * (c) 2004 Robert Spalek + * (c) 2003--2004 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -18,7 +17,7 @@ fbbuf_refill(struct fastbuf *f UNUSED) } void -fbbuf_init_read(struct fastbuf *f, byte *buf, uns size) +fbbuf_init_read(struct fastbuf *f, byte *buf, uns size, uns can_overwrite) { f->buffer = f->bptr = buf; f->bstop = f->bufend = buf + size; @@ -29,7 +28,7 @@ fbbuf_init_read(struct fastbuf *f, byte *buf, uns size) f->seek = NULL; f->close = NULL; f->config = NULL; - f->can_overwrite_buffer = 1; + f->can_overwrite_buffer = can_overwrite; } static void