- set_next_block_after (current_header);
- if (multi_volume_option)
- {
- assign_string (&save_name, current_file_name);
- save_totsize = current_stat.st_size;
- }
- for (size = current_stat.st_size; size > 0; size -= written)
- {
- if (multi_volume_option)
- save_sizeleft = size;
- data_block = find_next_block ();
- if (!data_block)
- {
- ERROR ((0, 0, _("Unexpected EOF in archive")));
- break; /* FIXME: What happens, then? */
- }
- written = available_space_after (data_block);
- if (written > size)
- written = size;
- errno = 0;
- check = fwrite (data_block->buffer, sizeof (char), written, stdlis);
- set_next_block_after ((union block *)
- (data_block->buffer + written - 1));
- if (check != written)
- {
- write_error_details (current_file_name, check, written);
- skip_file (size - written);
- break;
- }
- }
- if (multi_volume_option)
- assign_string (&save_name, 0);
- fputc ('\n', stdlis);
- fflush (stdlis);
- return;