[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.11 and 1.12

version 1.11, 1997/02/03 01:05:40 version 1.12, 1997/02/05 04:55:18
Line 62 
Line 62 
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   #include <utime.h>
 #include <varargs.h>  #include <varargs.h>
   
 #include "ftp_var.h"  #include "ftp_var.h"
Line 88 
Line 89 
         int s, len, tos;          int s, len, tos;
         static char hostnamebuf[MAXHOSTNAMELEN];          static char hostnamebuf[MAXHOSTNAMELEN];
   
         memset((char *)&hisctladdr, 0, sizeof(hisctladdr));          memset((void *)&hisctladdr, 0, sizeof(hisctladdr));
         if (inet_aton(host, &hisctladdr.sin_addr) != 0) {          if (inet_aton(host, &hisctladdr.sin_addr) != 0) {
                 hisctladdr.sin_family = AF_INET;                  hisctladdr.sin_family = AF_INET;
                 (void)strncpy(hostnamebuf, host, sizeof(hostnamebuf) - 1);                  (void)strncpy(hostnamebuf, host, sizeof(hostnamebuf) - 1);
Line 194 
Line 195 
 {  {
         char tmp[80];          char tmp[80];
         char *user, *pass, *acct;          char *user, *pass, *acct;
         char anonpass[MAXLOGNAME + MAXHOSTNAMELEN + 2]; /* "user@hostname\0" */          char anonpass[MAXLOGNAME + 1 + MAXHOSTNAMELEN]; /* "user@hostname" */
         char hostname[MAXHOSTNAMELEN + 1];          char hostname[MAXHOSTNAMELEN];
         int n, aflag = 0;          int n, aflag = 0;
   
         user = pass = acct = NULL;          user = pass = acct = NULL;
Line 285 
Line 286 
 }  }
   
 void  void
 cmdabort()  cmdabort(notused)
           int notused;
 {  {
   
         alarmtimer(0);          alarmtimer(0);
Line 473 
Line 475 
 jmp_buf sendabort;  jmp_buf sendabort;
   
 void  void
 abortsend()  abortsend(notused)
           int notused;
 {  {
   
         alarmtimer(0);          alarmtimer(0);
Line 750 
Line 753 
 jmp_buf recvabort;  jmp_buf recvabort;
   
 void  void
 abortrecv()  abortrecv(notused)
           int notused;
 {  {
   
         alarmtimer(0);          alarmtimer(0);
Line 775 
Line 779 
         off_t hashbytes;          off_t hashbytes;
         struct stat st;          struct stat st;
         time_t mtime;          time_t mtime;
         struct timeval tval[2];  
   
         hashbytes = mark;          hashbytes = mark;
         direction = "received";          direction = "received";
Line 1053 
Line 1056 
                 if (preserve && (closefunc == fclose)) {                  if (preserve && (closefunc == fclose)) {
                         mtime = remotemodtime(remote, 0);                          mtime = remotemodtime(remote, 0);
                         if (mtime != -1) {                          if (mtime != -1) {
                                 (void)gettimeofday(&tval[0],                                  struct utimbuf ut;
                                     (struct timezone *)0);  
                                 tval[1].tv_sec = mtime;                                  ut.actime = time(NULL);
                                 tval[1].tv_usec = 0;                                  ut.modtime = mtime;
                                 if (utimes(local, tval) == -1) {                                  if (utime(local, &ut) == -1)
                                         printf("Can't change modification time on %s to %s",                                          printf("Can't change modification time on %s to %s",
                                             local, asctime(localtime(&mtime)));                                              local, asctime(localtime(&mtime)));
                                 }  
                         }                          }
                 }                  }
         }          }
Line 1261 
Line 1263 
 }  }
   
 void  void
 psabort()  psabort(notused)
           int notused;
 {  {
   
         alarmtimer(0);          alarmtimer(0);
Line 1362 
Line 1365 
 }  }
   
 void  void
 abortpt()  abortpt(notused)
           int notused;
 {  {
   
         alarmtimer(0);          alarmtimer(0);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12