]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/fb-buffer.c
Signals: Document differences against strsignal()
[libucw.git] / ucw / fb-buffer.c
index 846ff8f9814b94aece359f873959562549073545..9fc92277b2248ee99a33fa3e34ae9d1652b9bec0 100644 (file)
@@ -7,8 +7,8 @@
  *     of the GNU Lesser General Public License.
  */
 
-#include "ucw/lib.h"
-#include "ucw/fastbuf.h"
+#include <ucw/lib.h>
+#include <ucw/fastbuf.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -31,8 +31,8 @@ fbbuf_seek(struct fastbuf *f, ucw_off_t pos, int whence)
   if (pos < 0 || pos > len)
     bthrow(f, "seek", "Seek out of range");
   f->bptr = f->buffer + pos;
-  f->bstop = f->buffer;
-  f->pos = 0;
+  f->bstop = f->bufend;
+  f->pos = len;
   return 1;
 }