-/* SIZE is guaranteed to be divisible by BLOCKSIZE */
-void
-xheader_eof (size_t size)
-{
- union block *header;
- char *name;
- int first_block = 1;
- int nl = 0;
-
- size -= BLOCKSIZE;
- name = xheader_ghdr_name ();
- header = start_private_header (name, size);
- header->header.typeflag = XGLTYPE;
- free (name);
- simple_finish_header (header);
- if (size)
- nl = 1;
- while (size > 0)
- {
- size_t len;
-
- header = find_next_block ();
- len = BLOCKSIZE;
- if (len > size)
- len = size;
- memset (header->buffer, 0, len);
- if (first_block)
- {
- first_block = 0;
- sprintf (header->buffer, "%d GNU.volume.eof=", size);
- }
- size -= len;
- set_next_block_after (header);
- }
- if (nl)
- header->buffer[BLOCKSIZE-1] = '\n';
-}
-