home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
old
/
ckermit80
/
edit211
/
ckcftp.pat
< prev
next >
Wrap
Text File
|
2020-01-01
|
3KB
|
113 lines
*** /w/pub/ftp/kermit/f/ckcftp.c Sat Nov 2 19:13:15 2002
--- ./ckcftp.c Sun Nov 17 15:59:13 2002
***************
*** 1,6 ****
/* C K C F T P -- FTP Client for C-Kermit */
! char *ckftpv = "FTP Client, 8.0.197, 24 Oct 2002";
/*
Authors:
--- 1,6 ----
/* C K C F T P -- FTP Client for C-Kermit */
! char *ckftpv = "FTP Client, 8.0.200, 24 Oct 2002";
/*
Authors:
***************
*** 1260,1265 ****
--- 1260,1266 ----
{ "filenames", FTS_CNV, 0 },
{ "get-filetype-switching", FTS_GFT, 0 },
{ "passive-mode", FTS_PSV, 0 },
+ { "pasv", FTS_PSV, CM_INV },
{ "permissions", FTS_PRM, 0 },
{ "progress-messages", FTS_TST, 0 },
{ "send-port-commands", FTS_SPC, 0 },
***************
*** 6965,6971 ****
--- 6966,6987 ----
!strncmp(src,s,usrpath)) {
s2 = s + usrpath; /* Local name skips past remote path */
}
+ #ifdef COMMENT
+ /* This doesn't work if the path prefix contains wildcards! */
haspath = (srvpath > usrpath);
+ #else
+ { /* Count path segments instead */
+ int x1 = 0, x2 = 0;
+ char *p;
+ for (p = s; *p; p++)
+ if (ispathsep(*p)) x1++;
+ for (p = src; *p; p++)
+ if (ispathsep(*p)) x2++;
+ haspath = x1 > x2;
+ debug(F111,"ftp get server path segments",s,x1);
+ debug(F111,"ftp get user path segments",src,x2);
+ }
+ #endif /* COMMENT */
debug(F111,"ftp get haspath",s+usrpath,haspath);
if (haspath) { /* Server file has path segments? */
***************
*** 7028,7033 ****
--- 7044,7053 ----
ckstrncpy(filnam,s,CKMAXPATH); /* For \v(filename) */
if (!*s2) /* Local name */
s2 = asnambuf; /* As-name */
+
+ if (!*s2) /* Sat Nov 16 19:19:39 2002 */
+ s2 = nam;
+
debug(F110,"ftp get filnam ",s,0);
debug(F110,"ftp get asnam A",s2,0);
***************
*** 14745,14757 ****
/* Get temp file */
! if ((tmpfilnam[mlsdepth] = (char *)malloc(16))) {
! ckmakmsg((char *)tmpfilnam[mlsdepth],16,p,"ckXXXXXX",NULL,NULL);
} else {
printf("?Malloc failure: remote_files()\n");
return(NULL);
}
#ifdef MKTEMP
#ifdef MKSTEMP
x = mkstemp((char *)tmpfilnam[mlsdepth]);
--- 14765,14785 ----
/* Get temp file */
! if ((tmpfilnam[mlsdepth] = (char *)malloc(CKMAXPATH+1))) {
! ckmakmsg((char *)tmpfilnam[mlsdepth],
! CKMAXPATH+1,p,"ckXXXXXX",NULL,NULL);
} else {
printf("?Malloc failure: remote_files()\n");
return(NULL);
}
+ #ifdef NT
+ {
+ char * tmpfil = mktemp((char *)tmpfilnam[mlsdepth]);
+ if ( tmpfil )
+ ckstrncpy(tmpfilnam[mlsdepth],tmpfil,CKMAXPATH+1);
+ }
+ #else /* NT */
#ifdef MKTEMP
#ifdef MKSTEMP
x = mkstemp((char *)tmpfilnam[mlsdepth]);
***************
*** 14761,14766 ****
--- 14789,14795 ----
#endif /* MKSTEMP */
/* if no mktmpnam() the name will just be "ckXXXXXX"... */
#endif /* MKTEMP */
+ #endif /* NT */
debug(F111,"ftp remote_files tmpfilnam[mlsdepth]",
tmpfilnam[mlsdepth],mlsdepth);