-/* JF we're reading, but we just read the last record and its time to update */
-extern time_to_start_writing;
-int file_to_switch_to = -1; /* If remote update, close archive, and use
- this descriptor to write to */
+/* We're reading, but we just read the last block and it's time to update.
+ Declared in update.c
+
+ As least EXTERN like this one as possible. (?? --gray)
+ FIXME: Either eliminate it or move it to common.h.
+*/
+extern bool time_to_start_writing;
+
+static int volno = 1; /* which volume of a multi-volume tape we're
+ on */
+static int global_volno = 1; /* volume number to print in external
+ messages */
+
+/* The pointer save_name, which is set in function dump_file() of module
+ create.c, points to the original long filename instead of the new,
+ shorter mangled name that is set in start_header() of module create.c.
+ The pointer save_name is only used in multi-volume mode when the file
+ being processed is non-sparse; if a file is split between volumes, the
+ save_name is used in generating the LF_MULTIVOL record on the second
+ volume. (From Pierce Cantrell, 1991-08-13.) */
+
+char *save_name; /* name of the file we are currently writing */
+off_t save_totsize; /* total size of file we are writing, only
+ valid if save_name is nonzero */
+off_t save_sizeleft; /* where we are in the file we are writing,
+ only valid if save_name is nonzero */
+
+bool write_archive_to_stdout;
+
+/* Used by flush_read and flush_write to store the real info about saved
+ names. */
+static char *real_s_name;
+static off_t real_s_totsize;
+static off_t real_s_sizeleft;
+\f
+/* Functions. */