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

Diff of /tar/src/list.c

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

revision 1.49 by gray, Thu Jul 24 14:48:08 2003 UTC revision 1.50 by gray, Fri Jul 25 15:05:41 2003 UTC
# Line 903  print_header (off_t block_ordinal) Line 903  print_header (off_t block_ordinal)
903  {  {
904    char modes[11];    char modes[11];
905    char const *time_stamp;    char const *time_stamp;
906      char *temp_name;
907      
908    /* These hold formatted ints.  */    /* These hold formatted ints.  */
909    char uform[UINTMAX_STRSIZE_BOUND], gform[UINTMAX_STRSIZE_BOUND];    char uform[UINTMAX_STRSIZE_BOUND], gform[UINTMAX_STRSIZE_BOUND];
910    char *user, *group;    char *user, *group;
# Line 922  print_header (off_t block_ordinal) Line 924  print_header (off_t block_ordinal)
924                 STRINGIFY_BIGINT (block_ordinal, buf));                 STRINGIFY_BIGINT (block_ordinal, buf));
925      }      }
926    
927      if (current_trailing_slash)
928        {
929          temp_name = xmalloc (strlen (current_file_name) + 2);
930          strcpy (temp_name, current_file_name);
931          strcat (temp_name, "/");
932        }
933      else
934        {
935          temp_name = xmalloc (strlen (current_file_name) + 1);
936          strcpy (temp_name, current_file_name);
937        }
938      
939    if (verbose_option <= 1)    if (verbose_option <= 1)
940      {      {
941        /* Just the fax, mam.  */        /* Just the fax, mam.  */
942        fprintf (stdlis, "%s", quotearg (current_file_name));        fprintf (stdlis, "%s\n", quotearg (temp_name));
       if (current_trailing_slash)  
         fprintf (stdlis, "/");  
       fprintf (stdlis, "\n");  
943      }      }
944    else    else
945      {      {
# Line 959  print_header (off_t block_ordinal) Line 970  print_header (off_t block_ordinal)
970          case REGTYPE:          case REGTYPE:
971          case AREGTYPE:          case AREGTYPE:
972            modes[0] = '-';            modes[0] = '-';
973            if (current_file_name[strlen (current_file_name) - 1] == '/')            if (temp_name[strlen (temp_name) - 1] == '/')
974              modes[0] = 'd';              modes[0] = 'd';
975            break;            break;
976          case LNKTYPE:          case LNKTYPE:
# Line 1073  print_header (off_t block_ordinal) Line 1084  print_header (off_t block_ordinal)
1084        fprintf (stdlis, "%s %s/%s %*s%s %s",        fprintf (stdlis, "%s %s/%s %*s%s %s",
1085                 modes, user, group, ugswidth - pad, "", size, time_stamp);                 modes, user, group, ugswidth - pad, "", size, time_stamp);
1086    
1087        fprintf (stdlis, " %s", quotearg (current_file_name));        fprintf (stdlis, " %s", quotearg (temp_name));
1088    
1089        switch (current_header->header.typeflag)        switch (current_header->header.typeflag)
1090          {          {
# Line 1132  print_header (off_t block_ordinal) Line 1143  print_header (off_t block_ordinal)
1143            break;            break;
1144          }          }
1145      }      }
1146      free (temp_name);
1147    fflush (stdlis);    fflush (stdlis);
1148  }  }
1149    

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

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