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

Diff for /src/usr.bin/ftp/ftp.c between version 1.15 and 1.16

version 1.15, 1997/03/14 23:25:46 version 1.16, 1997/03/21 20:59:29
Line 1 
Line 1 
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
 /*      $NetBSD: ftp.c,v 1.23 1997/03/13 06:23:17 lukem Exp $   */  /*      $NetBSD: ftp.c,v 1.24 1997/03/16 14:24:19 lukem Exp $   */
   
 /*  /*
  * Copyright (c) 1985, 1989, 1993, 1994   * Copyright (c) 1985, 1989, 1993, 1994
Line 810 
Line 810 
         struct stat st;          struct stat st;
         time_t mtime;          time_t mtime;
         int oprogress;          int oprogress;
           int opreserve;
   
         hashbytes = mark;          hashbytes = mark;
         direction = "received";          direction = "received";
         bytes = 0;          bytes = 0;
         filesize = -1;          filesize = -1;
         oprogress = progress;          oprogress = progress;
           opreserve = preserve;
         is_retr = strcmp(cmd, "RETR") == 0;          is_retr = strcmp(cmd, "RETR") == 0;
         if (is_retr && verbose && printnames) {          if (is_retr && verbose && printnames) {
                 if (local && *local != '-')                  if (local && *local != '-')
Line 844 
Line 846 
                 if (oldinti)                  if (oldinti)
                         (void)signal(SIGINFO, oldinti);                          (void)signal(SIGINFO, oldinti);
                 progress = oprogress;                  progress = oprogress;
                   preserve = opreserve;
                 code = -1;                  code = -1;
                 return;                  return;
         }          }
Line 933 
Line 936 
         if (strcmp(local, "-") == 0) {          if (strcmp(local, "-") == 0) {
                 fout = stdout;                  fout = stdout;
                 progress = 0;                  progress = 0;
                   preserve = 0;
         } else if (*local == '|') {          } else if (*local == '|') {
                 oldintp = signal(SIGPIPE, SIG_IGN);                  oldintp = signal(SIGPIPE, SIG_IGN);
                 fout = popen(local + 1, "w");                  fout = popen(local + 1, "w");
Line 941 
Line 945 
                         goto abort;                          goto abort;
                 }                  }
                 progress = 0;                  progress = 0;
                   preserve = 0;
                 closefunc = pclose;                  closefunc = pclose;
         } else {          } else {
                 fout = fopen(local, lmode);                  fout = fopen(local, lmode);
Line 976 
Line 981 
                     lseek(fileno(fout), restart_point, SEEK_SET) < 0) {                      lseek(fileno(fout), restart_point, SEEK_SET) < 0) {
                         warn("local: %s", local);                          warn("local: %s", local);
                         progress = oprogress;                          progress = oprogress;
                           preserve = opreserve;
                         if (closefunc != NULL)                          if (closefunc != NULL)
                                 (*closefunc)(fout);                                  (*closefunc)(fout);
                         return;                          return;
Line 1029 
Line 1035 
 done:  done:
                                 warn("local: %s", local);                                  warn("local: %s", local);
                                 progress = oprogress;                                  progress = oprogress;
                                   preserve = opreserve;
                                 if (closefunc != NULL)                                  if (closefunc != NULL)
                                         (*closefunc)(fout);                                          (*closefunc)(fout);
                                 return;                                  return;
Line 1084 
Line 1091 
         }          }
         progressmeter(1);          progressmeter(1);
         progress = oprogress;          progress = oprogress;
           preserve = opreserve;
         if (closefunc != NULL)          if (closefunc != NULL)
                 (*closefunc)(fout);                  (*closefunc)(fout);
         (void)signal(SIGINT, oldintr);          (void)signal(SIGINT, oldintr);
Line 1116 
Line 1124 
 /* abort using RFC959 recommended IP,SYNC sequence */  /* abort using RFC959 recommended IP,SYNC sequence */
   
         progress = oprogress;          progress = oprogress;
           preserve = opreserve;
         if (oldintp)          if (oldintp)
                 (void)signal(SIGPIPE, oldintp);                  (void)signal(SIGPIPE, oldintp);
         (void)signal(SIGINT, SIG_IGN);          (void)signal(SIGINT, SIG_IGN);

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