51
51
my_b_copy_to_file(IO_CACHE *cache, FILE *file)
55
56
/* Reinit the cache to read from the beginning of the cache */
56
if (reinit_io_cache(cache, READ_CACHE, 0L, false, false))
57
if (reinit_io_cache(cache, READ_CACHE, 0L, FALSE, FALSE))
58
59
bytes_in_cache= my_b_bytes_in_cache(cache);
61
62
if (my_fwrite(file, cache->read_pos, bytes_in_cache,
62
63
MYF(MY_WME | MY_NABP)) == (size_t) -1)
64
65
cache->read_pos= cache->read_end;
65
66
} while ((bytes_in_cache= my_b_fill(cache)));