]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/fb-null.c
Strtonum: Support u32 and s32
[libucw.git] / ucw / fb-null.c
index 6f0a40a217ba74df600a9186bcfb46a617d0a96a..5d1649206991e98108614460ca0045a936c2525c 100644 (file)
@@ -17,10 +17,11 @@ static void fbnull_close(struct fastbuf *b)
   xfree(b);
 }
 
   xfree(b);
 }
 
-struct fastbuf *fbnull_open(uns bufsize)
+struct fastbuf *fbnull_open(uint bufsize)
 {
   struct fastbuf *b = xmalloc(sizeof(*b) + bufsize);
   bzero(b, sizeof(*b));
 {
   struct fastbuf *b = xmalloc(sizeof(*b) + bufsize);
   bzero(b, sizeof(*b));
+  b->name = "<fbnull>";
   b->close = fbnull_close;
   fbnull_start(b, (byte *)(b + 1), bufsize);
   return b;
   b->close = fbnull_close;
   fbnull_start(b, (byte *)(b + 1), bufsize);
   return b;
@@ -44,7 +45,7 @@ static int fbnull_seek(struct fastbuf *b, ucw_off_t pos, int whence)
   return 1;
 }
 
   return 1;
 }
 
-void fbnull_start(struct fastbuf *b, byte *buf, uns bufsize)
+void fbnull_start(struct fastbuf *b, byte *buf, uint bufsize)
 {
   ASSERT(buf && bufsize);
   b->pos = btell(b);
 {
   ASSERT(buf && bufsize);
   b->pos = btell(b);
@@ -65,7 +66,7 @@ bool fbnull_test(struct fastbuf *b)
 int main(void)
 {
   struct fastbuf *b = fbnull_open(7);
 int main(void)
 {
   struct fastbuf *b = fbnull_open(7);
-  for (uns i = 0; i < 100; i++)
+  for (uint i = 0; i < 100; i++)
     {
       if (btell(b) != i * 10)
        ASSERT(0);
     {
       if (btell(b) != i * 10)
        ASSERT(0);