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

Diff for /src/usr.bin/ssh/Attic/sftp-int.c between version 1.64 and 1.65

version 1.64, 2003/11/08 19:17:29 version 1.65, 2003/11/21 11:57:03
Line 362 
Line 362 
                         }                          }
                         if (cp[i] == '\\') {    /* Escaped characters */                          if (cp[i] == '\\') {    /* Escaped characters */
                                 i++;                                  i++;
                                 if (cp[i] != '\'' && cp[i] != '\"' &&                                  if (cp[i] != '\'' && cp[i] != '\"' &&
                                     cp[i] != '\\') {                                      cp[i] != '\\') {
                                         error("Bad escaped character '\%c'",                                          error("Bad escaped character '\%c'",
                                             cp[i]);                                              cp[i]);
Line 390 
Line 390 
         return (0);          return (0);
   
  fail:   fail:
         xfree(*path);          xfree(*path);
         *path = NULL;          *path = NULL;
         return (-1);          return (-1);
 }  }
   
Line 531 
Line 531 
   
         for (i = 0; g.gl_pathv[i]; i++) {          for (i = 0; g.gl_pathv[i]; i++) {
                 if (!is_reg(g.gl_pathv[i])) {                  if (!is_reg(g.gl_pathv[i])) {
                         error("skipping non-regular file %s",                          error("skipping non-regular file %s",
                             g.gl_pathv[i]);                              g.gl_pathv[i]);
                         continue;                          continue;
                 }                  }
Line 599 
Line 599 
                 for (n = 0; d[n] != NULL; n++)                  for (n = 0; d[n] != NULL; n++)
                         m = MAX(m, strlen(d[n]->filename));                          m = MAX(m, strlen(d[n]->filename));
   
                 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)                  if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)
                         width = ws.ws_col;                          width = ws.ws_col;
   
                 columns = width / (m + 2);                  columns = width / (m + 2);
Line 669 
Line 669 
             strncmp(path, g.gl_pathv[0], strlen(g.gl_pathv[0]) - 1) == 0) {              strncmp(path, g.gl_pathv[0], strlen(g.gl_pathv[0]) - 1) == 0) {
                 if ((a = do_lstat(conn, path, 1)) == NULL) {                  if ((a = do_lstat(conn, path, 1)) == NULL) {
                         globfree(&g);                          globfree(&g);
                         return (-1);                          return (-1);
                 }                  }
                 if ((a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) &&                  if ((a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) &&
                     S_ISDIR(a->perm)) {                      S_ISDIR(a->perm)) {
Line 680 
Line 680 
   
         if (!(lflag & SHORT_VIEW)) {          if (!(lflag & SHORT_VIEW)) {
                 int m = 0, width = 80;                  int m = 0, width = 80;
                 struct winsize ws;                  struct winsize ws;
   
                 /* Count entries for sort and find longest filename */                  /* Count entries for sort and find longest filename */
                 for (i = 0; g.gl_pathv[i]; i++)                  for (i = 0; g.gl_pathv[i]; i++)
                         m = MAX(m, strlen(g.gl_pathv[i]));                          m = MAX(m, strlen(g.gl_pathv[i]));
   
                 if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)                  if (ioctl(fileno(stdin), TIOCGWINSZ, &ws) != -1)
Line 760 
Line 760 
                 *iflag = 1;                  *iflag = 1;
                 cp++;                  cp++;
         }          }
   
         /* Figure out which command we have */          /* Figure out which command we have */
         for (i = 0; cmds[i].c; i++) {          for (i = 0; cmds[i].c; i++) {
                 int cmdlen = strlen(cmds[i].c);                  int cmdlen = strlen(cmds[i].c);

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65