ASSERT(btell(f) >= 0);
}
-inline void bsetpos(struct fastbuf *f, ucw_off_t pos)
+void bsetpos(struct fastbuf *f, ucw_off_t pos)
{
/* We can optimize seeks only when reading */
if (f->bptr < f->bstop && pos <= f->pos && pos >= f->pos - (f->bstop - f->buffer)) /* If bptr == bstop, then [buffer, bstop] may be undefined */
return f->bptr >= f->bstop && !brefill(f, 1);
}
-void bputc_slow(struct fastbuf *f, uns c)
+void bputc_slow(struct fastbuf *f, uint c)
{
if (f->bptr >= f->bufend)
bspout(f);
*f->bptr++ = c;
}
-uns bread_slow(struct fastbuf *f, void *b, uns l, uns check)
+uint bread_slow(struct fastbuf *f, void *b, uint l, uint check)
{
- uns total = 0;
+ uint total = 0;
while (l)
{
- uns k = f->bstop - f->bptr;
+ uint k = f->bstop - f->bptr;
if (!k)
{
return total;
}
-void bwrite_slow(struct fastbuf *f, const void *b, uns l)
+void bwrite_slow(struct fastbuf *f, const void *b, uint l)
{
while (l)
{
- uns k = f->bufend - f->bptr;
+ uint k = f->bufend - f->bptr;
if (!k)
{
}
}
-void bbcopy_slow(struct fastbuf *f, struct fastbuf *t, uns l)
+void bbcopy_slow(struct fastbuf *f, struct fastbuf *t, uint l)
{
while (l)
{
byte *fptr, *tptr;
- uns favail, tavail, n;
+ uint favail, tavail, n;
favail = bdirect_read_prepare(f, &fptr);
if (!favail)
}
}
-int bconfig(struct fastbuf *f, uns item, int value)
+int bconfig(struct fastbuf *f, uint item, int value)
{
return (f->config && !(f->flags & FB_DEAD)) ? f->config(f, item, value) : -1;
}
bsetpos(f, 0);
}
-int bskip_slow(struct fastbuf *f, uns len)
+int bskip_slow(struct fastbuf *f, uint len)
{
while (len)
{
byte *buf;
- uns l = bdirect_read_prepare(f, &buf);
+ uint l = bdirect_read_prepare(f, &buf);
if (!l)
return 0;
l = MIN(l, len);
bclose(f);
}
-static void fb_res_dump(struct resource *r, uns indent UNUSED)
+static void fb_res_dump(struct resource *r, uint indent UNUSED)
{
struct fastbuf *f = r->priv;
printf(" name=%s\n", f->name);