- skip_member ();
- return;
- }
-
- /* Print the block from current_header and current_stat. */
-
- if (verbose_option)
- print_header ();
-
- /* Check for fully specified file names and other atrocities. */
-
- skipcrud = 0;
- if (! absolute_names_option)
- {
- if (contains_dot_dot (CURRENT_FILE_NAME))
- {
- ERROR ((0, 0, _("%s: Member name contains `..'"),
- quotearg_colon (CURRENT_FILE_NAME)));
- skip_member ();
- return;
- }
-
- skipcrud = FILESYSTEM_PREFIX_LEN (current_file_name);
- while (ISSLASH (CURRENT_FILE_NAME[0]))
- skipcrud++;
-
- if (skipcrud)
- {
- static int warned_once;
-
- if (!warned_once)
- {
- warned_once = 1;
- WARN ((0, 0, _("Removing leading `%.*s' from member names"),
- (int) skipcrud, current_file_name));
- }
- }
- }
-
- apply_nonancestor_delayed_set_stat (CURRENT_FILE_NAME, 0);
-
- /* Take a safety backup of a previously existing file. */
-
- if (backup_option && !to_stdout_option)
- if (!maybe_backup_file (CURRENT_FILE_NAME, 0))
- {
- int e = errno;
- ERROR ((0, e, _("%s: Was unable to backup this file"),
- quotearg_colon (CURRENT_FILE_NAME)));
- skip_member ();
- return;
- }
-
- /* Extract the archive entry according to its type. */
-
- typeflag = current_header->header.typeflag;
- switch (typeflag)
- {
- /* JK - What we want to do if the file is sparse is loop through
- the array of sparse structures in the header and read in and
- translate the character strings representing 1) the offset at
- which to write and 2) how many bytes to write into numbers,
- which we store into the scratch array, "sparsearray". This
- array makes our life easier the same way it did in creating the
- tar file that had to deal with a sparse file.
-
- After we read in the first five (at most) sparse structures, we
- check to see if the file has an extended header, i.e., if more
- sparse structures are needed to describe the contents of the new
- file. If so, we read in the extended headers and continue to
- store their contents into the sparsearray. */
-
- case GNUTYPE_SPARSE:
- sp_array_size = 10;
- sparsearray =
- xmalloc (sp_array_size * sizeof (struct sp_array));
-
- for (counter = 0; counter < SPARSES_IN_OLDGNU_HEADER; counter++)
- {
- struct sparse const *s = ¤t_header->oldgnu_header.sp[counter];
- sparsearray[counter].offset = OFF_FROM_HEADER (s->offset);
- sparsearray[counter].numbytes = SIZE_FROM_HEADER (s->numbytes);
- if (!sparsearray[counter].numbytes)
- break;
- }
-
- if (current_header->oldgnu_header.isextended)