]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fastbuf.c
Make autoconf recognize the amd64 architecture.
[libucw.git] / lib / fastbuf.c
index 85df8250370f10197234d902f4cbcc908fd73895..6fbb2184ca2d0a90a0135ab012e248db3e09fec1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     Sherlock Library -- Fast Buffered I/O
+ *     UCW Library -- Fast Buffered I/O
  *
  *     (c) 1997--2004 Martin Mares <mj@ucw.cz>
  *
@@ -343,17 +343,20 @@ brewind(struct fastbuf *f)
   bsetpos(f, 0);
 }
 
-void
-bskip(struct fastbuf *f, uns len)
+int
+bskip_slow(struct fastbuf *f, uns len)
 {
   while (len)
     {
       byte *buf;
       uns l = bdirect_read_prepare(f, &buf);
+      if (!l)
+       return 0;
       l = MIN(l, len);
       bdirect_read_commit(f, buf+l);
       len -= l;
     }
+  return 1;
 }
 
 sh_off_t