/[tar]/tar/src/delete.c
ViewVC logotype

Diff of /tar/src/delete.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by gray, Thu Sep 4 13:58:42 2003 UTC revision 1.16 by gray, Sat Oct 4 13:49:46 2003 UTC
# Line 173  delete_archive_members (void) Line 173  delete_archive_members (void)
173            abort ();            abort ();
174    
175          case HEADER_SUCCESS:          case HEADER_SUCCESS:
176            if (name = name_scan (current_stat_info.file_name), !name)            if ((name = name_scan (current_stat_info.file_name)) == NULL)
177              {              {
178                skip_member ();                skip_member ();
179                break;                break;
180              }              }
181            name->found = 1;            name->found_count++;
182              if (!ISFOUND(name))
183                {
184                  skip_member ();
185                  break;
186                }
187              
188            /* Fall through.  */            /* Fall through.  */
189          case HEADER_SUCCESS_EXTENDED:          case HEADER_SUCCESS_EXTENDED:
190            logical_status = status;            logical_status = status;
# Line 279  delete_archive_members (void) Line 285  delete_archive_members (void)
285    
286            /* Found another header.  */            /* Found another header.  */
287    
288            if (name = name_scan (current_stat_info.file_name), name)            if ((name = name_scan (current_stat_info.file_name)) != NULL)
289              {              {
290                name->found = 1;                name->found_count++;
291              flush_file:                if (ISFOUND(name))
               set_next_block_after (current_header);  
               blocks_to_skip = (current_stat_info.stat.st_size + BLOCKSIZE - 1) / BLOCKSIZE;  
   
               while (record_end - current_block <= blocks_to_skip)  
292                  {                  {
293                    blocks_to_skip -= (record_end - current_block);                  flush_file:
294                    flush_archive ();                    set_next_block_after (current_header);
295                      blocks_to_skip = (current_stat_info.stat.st_size
296                                        + BLOCKSIZE - 1) / BLOCKSIZE;
297    
298                      while (record_end - current_block <= blocks_to_skip)
299                        {
300                          blocks_to_skip -= (record_end - current_block);
301                          flush_archive ();
302                        }
303                      current_block += blocks_to_skip;
304                      blocks_to_skip = 0;
305                      continue;
306                  }                  }
               current_block += blocks_to_skip;  
               blocks_to_skip = 0;  
               continue;  
307              }              }
   
308            /* Copy header.  */            /* Copy header.  */
309    
310            if (extended_header.size)            if (extended_header.size)

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26