X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Ffastbuf.c;h=9ba01ef4c6c0126ef24e559f3d28bf8096df0056;hb=caa438d84c8cf94cd32d0dd2d7fb2c655a57a4db;hp=3ab8b826898fd3d68465482925576876252856d1;hpb=031256ad2e123eec58521f8e3eb9496c197641d2;p=libucw.git diff --git a/ucw/fastbuf.c b/ucw/fastbuf.c index 3ab8b826..9ba01ef4 100644 --- a/ucw/fastbuf.c +++ b/ucw/fastbuf.c @@ -31,7 +31,7 @@ void bflush(struct fastbuf *f) f->bptr = f->bstop = f->buffer; } -inline void bsetpos(struct fastbuf *f, sh_off_t pos) +inline void bsetpos(struct fastbuf *f, ucw_off_t pos) { /* We can optimize seeks only when reading */ if (pos >= f->pos - (f->bstop - f->buffer) && pos <= f->pos) @@ -44,7 +44,7 @@ inline void bsetpos(struct fastbuf *f, sh_off_t pos) } } -void bseek(struct fastbuf *f, sh_off_t pos, int whence) +void bseek(struct fastbuf *f, ucw_off_t pos, int whence) { switch (whence) { @@ -189,16 +189,16 @@ bskip_slow(struct fastbuf *f, uns len) return 1; } -sh_off_t +ucw_off_t bfilesize(struct fastbuf *f) { if (!f) return 0; - sh_off_t pos = btell(f); + ucw_off_t pos = btell(f); bflush(f); if (!f->seek(f, 0, SEEK_END)) return -1; - sh_off_t len = btell(f); + ucw_off_t len = btell(f); bsetpos(f, pos); return len; }