/* Buffer management for tar.
Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001,
/* Buffer management for tar.
Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001,
- 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by John Gilmore, on 1985-08-25.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Written by John Gilmore, on 1985-08-25.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
static off_t save_sizeleft; /* where we are in the file we are writing,
only valid if save_name is nonzero */
static off_t save_sizeleft; /* where we are in the file we are writing,
only valid if save_name is nonzero */
{ ct_compress, 2, "\037\235", "compress", "-Z" },
{ ct_gzip, 2, "\037\213", "gzip", "-z" },
{ ct_bzip2, 3, "BZh", "bzip2", "-j" },
{ ct_compress, 2, "\037\235", "compress", "-Z" },
{ ct_gzip, 2, "\037\213", "gzip", "-z" },
{ ct_bzip2, 3, "BZh", "bzip2", "-j" },
/* Prepare global data needed for find_next_block: */
record_end = record_start; /* set up for 1st record = # 0 */
sfr = read_full_records;
read_full_records = true; /* Suppress fatal error on reading a partial
record */
/* Prepare global data needed for find_next_block: */
record_end = record_start; /* set up for 1st record = # 0 */
sfr = read_full_records;
read_full_records = true; /* Suppress fatal error on reading a partial
record */
print_stats (stderr, _("Total bytes read"),
records_read * record_size);
break;
print_stats (stderr, _("Total bytes read"),
records_read * record_size);
break;
- if (index_file_name)
- {
- stdlis = freopen (index_file_name, "w", stdout);
- if (! stdlis)
- open_error (index_file_name);
- close_stdout_set_file_name (index_file_name);
- }
- else
- stdlis = to_stdout_option ? stderr : stdout;
-
/* TRANSLATORS: This is a ``checkpoint of write operation'',
*not* ``Writing a checkpoint''.
E.g. in Spanish ``Punto de comprobaci@'on de escritura'',
/* TRANSLATORS: This is a ``checkpoint of write operation'',
*not* ``Writing a checkpoint''.
E.g. in Spanish ``Punto de comprobaci@'on de escritura'',
assign_string (&volume_label, NULL);
assign_string (&continued_file_name, NULL);
continued_file_size = continued_file_offset = 0;
assign_string (&volume_label, NULL);
assign_string (&continued_file_name, NULL);
continued_file_size = continued_file_offset = 0;
- xheader_store ("GNU.volume.filename", NULL, real_s_name);
- xheader_store ("GNU.volume.size", NULL, &real_s_sizeleft);
- xheader_store ("GNU.volume.offset", NULL, &d);
+ xheader_store ("GNU.volume.filename", &dummy, real_s_name);
+ xheader_store ("GNU.volume.size", &dummy, &real_s_sizeleft);
+ xheader_store ("GNU.volume.offset", &dummy, &d);
- write_extended (true, NULL, find_next_block ());
+ write_extended (true, &dummy, find_next_block ());
+ tar_stat_destroy (&dummy);
+