home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / c-kermit / ckcftp.pat < prev    next >
Text File  |  2020-01-01  |  3KB  |  113 lines

  1. *** /w/pub/ftp/kermit/f/ckcftp.c    Sat Nov  2 19:13:15 2002
  2. --- ./ckcftp.c    Sun Nov 17 15:59:13 2002
  3. ***************
  4. *** 1,6 ****
  5.   /*  C K C F T P  --  FTP Client for C-Kermit  */
  6.   
  7. ! char *ckftpv = "FTP Client, 8.0.197, 24 Oct 2002";
  8.   
  9.   /*
  10.     Authors:
  11. --- 1,6 ----
  12.   /*  C K C F T P  --  FTP Client for C-Kermit  */
  13.   
  14. ! char *ckftpv = "FTP Client, 8.0.200, 24 Oct 2002";
  15.   
  16.   /*
  17.     Authors:
  18. ***************
  19. *** 1260,1265 ****
  20. --- 1260,1266 ----
  21.       { "filenames",                FTS_CNV, 0 },
  22.       { "get-filetype-switching",   FTS_GFT, 0 },
  23.       { "passive-mode",             FTS_PSV, 0 },
  24. +     { "pasv",                     FTS_PSV, CM_INV },
  25.       { "permissions",              FTS_PRM, 0 },
  26.       { "progress-messages",        FTS_TST, 0 },
  27.       { "send-port-commands",       FTS_SPC, 0 },
  28. ***************
  29. *** 6965,6971 ****
  30. --- 6966,6987 ----
  31.           !strncmp(src,s,usrpath)) {
  32.                   s2 = s + usrpath;       /* Local name skips past remote path */
  33.               }
  34. + #ifdef COMMENT
  35. +         /* This doesn't work if the path prefix contains wildcards! */
  36.           haspath = (srvpath > usrpath);
  37. + #else
  38. +         {                /* Count path segments instead */
  39. +         int x1 = 0, x2 = 0;
  40. +         char *p;
  41. +         for (p = s; *p; p++)
  42. +           if (ispathsep(*p)) x1++;
  43. +         for (p = src; *p; p++)
  44. +           if (ispathsep(*p)) x2++;
  45. +         haspath = x1 > x2;
  46. +         debug(F111,"ftp get server path segments",s,x1);
  47. +         debug(F111,"ftp get user   path segments",src,x2);
  48. +         }
  49. + #endif /* COMMENT */
  50.               debug(F111,"ftp get haspath",s+usrpath,haspath);
  51.   
  52.               if (haspath) {              /* Server file has path segments? */
  53. ***************
  54. *** 7028,7033 ****
  55. --- 7044,7053 ----
  56.           ckstrncpy(filnam,s,CKMAXPATH);  /* For \v(filename) */
  57.           if (!*s2)                       /* Local name */
  58.             s2 = asnambuf;                /* As-name */
  59. +     if (!*s2)            /* Sat Nov 16 19:19:39 2002 */
  60. +       s2 = nam;
  61.           debug(F110,"ftp get filnam ",s,0);
  62.           debug(F110,"ftp get asnam A",s2,0);
  63.   
  64. ***************
  65. *** 14745,14757 ****
  66.   
  67.       /* Get temp file */
  68.   
  69. !     if ((tmpfilnam[mlsdepth] = (char *)malloc(16))) {
  70. !         ckmakmsg((char *)tmpfilnam[mlsdepth],16,p,"ckXXXXXX",NULL,NULL);
  71.       } else {
  72.           printf("?Malloc failure: remote_files()\n");
  73.           return(NULL);
  74.       }
  75.   
  76.   #ifdef MKTEMP
  77.   #ifdef MKSTEMP
  78.       x = mkstemp((char *)tmpfilnam[mlsdepth]);
  79. --- 14765,14785 ----
  80.   
  81.       /* Get temp file */
  82.   
  83. !     if ((tmpfilnam[mlsdepth] = (char *)malloc(CKMAXPATH+1))) {
  84. !         ckmakmsg((char *)tmpfilnam[mlsdepth],
  85. !              CKMAXPATH+1,p,"ckXXXXXX",NULL,NULL);
  86.       } else {
  87.           printf("?Malloc failure: remote_files()\n");
  88.           return(NULL);
  89.       }
  90.   
  91. + #ifdef NT
  92. +     {
  93. +         char * tmpfil = mktemp((char *)tmpfilnam[mlsdepth]);
  94. +         if ( tmpfil )
  95. +         ckstrncpy(tmpfilnam[mlsdepth],tmpfil,CKMAXPATH+1);
  96. +     }
  97. + #else /* NT */
  98.   #ifdef MKTEMP
  99.   #ifdef MKSTEMP
  100.       x = mkstemp((char *)tmpfilnam[mlsdepth]);
  101. ***************
  102. *** 14761,14766 ****
  103. --- 14789,14795 ----
  104.   #endif /* MKSTEMP */
  105.           /* if no mktmpnam() the name will just be "ckXXXXXX"... */
  106.   #endif /* MKTEMP */
  107. + #endif /* NT */
  108.   
  109.       debug(F111,"ftp remote_files tmpfilnam[mlsdepth]",
  110.             tmpfilnam[mlsdepth],mlsdepth);
  111.