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

Diff for /src/usr.bin/ftp/util.c between version 1.48 and 1.49

version 1.48, 2008/05/13 02:09:38 version 1.49, 2008/06/15 03:09:13
Line 298 
Line 298 
                         if (tmp[0] != '\0')                          if (tmp[0] != '\0')
                                 user = tmp;                                  user = tmp;
                 }                  }
                   else
                           exit(0);
         }          }
         n = command("USER %s", user);          n = command("USER %s", user);
         if (n == CONTINUE) {          if (n == CONTINUE) {
Line 351 
Line 353 
         }          }
         fprintf(ttyout, "(%s) ", prompt);          fprintf(ttyout, "(%s) ", prompt);
         line[len++] = ' ';          line[len++] = ' ';
         if (fgets(&line[len], (int)(sizeof(line) - len), stdin) == NULL)          if (fgets(&line[len], (int)(sizeof(line) - len), stdin) == NULL) {
                   clearerr(stdin);
                 intr();                  intr();
           }
         len += strlen(&line[len]);          len += strlen(&line[len]);
         if (len > 0 && line[len - 1] == '\n')          if (len > 0 && line[len - 1] == '\n')
                 line[len - 1] = '\0';                  line[len - 1] = '\0';
Line 459 
Line 463 
 {  {
         char str[BUFSIZ];          char str[BUFSIZ];
   
           if (confirmrest == 2)
                   return (0);
   
         if (!interactive || confirmrest)          if (!interactive || confirmrest)
                 return (1);                  return (1);
 top:  top:
         fprintf(ttyout, "%s %s? ", cmd, file);          fprintf(ttyout, "%s %s? ", cmd, file);
         (void)fflush(ttyout);          (void)fflush(ttyout);
         if (fgets(str, sizeof(str), stdin) == NULL)          if (fgets(str, sizeof(str), stdin) == NULL) {
                   confirmrest = 2;
                   clearerr(stdin);
                 return (0);                  return (0);
           }
         switch (tolower(*str)) {          switch (tolower(*str)) {
                 case 'n':                  case 'n':
                         return (0);                          return (0);

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