[BACK]Return to sftp.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sftp.c between version 1.53 and 1.54

version 1.53, 2004/06/21 22:30:45 version 1.54, 2004/06/22 01:16:39
Line 68 
Line 68 
 #define LS_TIME_SORT    0x10    /* Sort by mtime */  #define LS_TIME_SORT    0x10    /* Sort by mtime */
 #define LS_SIZE_SORT    0x20    /* Sort by file size */  #define LS_SIZE_SORT    0x20    /* Sort by file size */
 #define LS_REVERSE_SORT 0x40    /* Reverse sort order */  #define LS_REVERSE_SORT 0x40    /* Reverse sort order */
   #define LS_SHOW_ALL     0x80    /* Don't skip filenames starting with '.' */
   
 #define VIEW_FLAGS      (LS_LONG_VIEW|LS_SHORT_VIEW|LS_NUMERIC_VIEW)  #define VIEW_FLAGS      (LS_LONG_VIEW|LS_SHORT_VIEW|LS_NUMERIC_VIEW)
 #define SORT_FLAGS      (LS_NAME_SORT|LS_TIME_SORT|LS_SIZE_SORT)  #define SORT_FLAGS      (LS_NAME_SORT|LS_TIME_SORT|LS_SIZE_SORT)
Line 374 
Line 375 
                         case 'f':                          case 'f':
                                 *lflag &= ~SORT_FLAGS;                                  *lflag &= ~SORT_FLAGS;
                                 break;                                  break;
                           case 'a':
                                   *lflag |= LS_SHOW_ALL;
                                   break;
                         default:                          default:
                                 error("Invalid flag -%c", *cp);                                  error("Invalid flag -%c", *cp);
                                 return(-1);                                  return(-1);
Line 662 
Line 666 
                 char *tmp;                  char *tmp;
   
                 /* Count entries for sort and find longest filename */                  /* Count entries for sort and find longest filename */
                 for (n = 0; d[n] != NULL; n++)                  for (n = 0; d[n] != NULL; n++) {
                         m = MAX(m, strlen(d[n]->filename));                          if (d[n]->filename[0] != '.' || (lflag & LS_SHOW_ALL))
                                   m = MAX(m, strlen(d[n]->filename));
                   }
   
                 /* Add any subpath that also needs to be counted */                  /* Add any subpath that also needs to be counted */
                 tmp = path_strip(path, strip_path);                  tmp = path_strip(path, strip_path);
Line 686 
Line 692 
   
         for (n = 0; d[n] != NULL && !interrupted; n++) {          for (n = 0; d[n] != NULL && !interrupted; n++) {
                 char *tmp, *fname;                  char *tmp, *fname;
   
                   if (d[n]->filename[0] == '.' && !(lflag & LS_SHOW_ALL))
                           continue;
   
                 tmp = path_append(path, d[n]->filename);                  tmp = path_append(path, d[n]->filename);
                 fname = path_strip(tmp, strip_path);                  fname = path_strip(tmp, strip_path);

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.54