cURL / Mailing Lists / curl-library / Single Mail

curl-library

Today's minor patch

From: Yang Tse <yangsita_at_gmail.com>
Date: Wed, 30 Nov 2005 09:58:36 +0100

Hi Daniel,

This minor patch is for the experimental ftp-method code. As my other
patches it only addresses a compiler warning. I hope that this one
doesn't break anything ;-) It can be used if you think its usefull.

diff -urp c:\f\curl-old/curl/lib/url.c c:\f\curl-new/curl/lib/url.c
--- c:\f\curl-old/curl/lib/url.c 2005-11-29 00:06:00.000000000 +0100
+++ c:\f\curl-new/curl/lib/url.c 2005-11-30 09:38:27.073838400 +0100
@@ -559,9 +559,9 @@ CURLcode Curl_setopt(struct SessionHandl
     break;
   case CURLOPT_FTP_FILEMETHOD:
     /*
- * How do access files over FTP.
+ * How to access files over FTP.
      */
- data->set.ftp_filemethod = va_arg(param, long);
+ data->set.ftp_filemethod = (curl_ftpfile)va_arg(param, curl_ftpfile);
     break;
   case CURLOPT_NETRC:
     /*
diff -urp c:\f\curl-old/curl/lib/urldata.h c:\f\curl-new/curl/lib/urldata.h
--- c:\f\curl-old/curl/lib/urldata.h 2005-11-29 00:06:00.000000000 +0100
+++ c:\f\curl-new/curl/lib/urldata.h 2005-11-30 09:05:20.307008000 +0100
@@ -313,7 +313,9 @@ typedef enum {
 typedef enum {
   FTPFILE_MULTICWD = 1, /* as defined by RFC1738 */
   FTPFILE_NOCWD = 2, /* use SIZE / RETR / STOR on the full path */
- FTPFILE_SINGLECWD = 3 /* make one CWD, then SIZE / RETR / STOR on
the file */
+ FTPFILE_SINGLECWD = 3, /* make one CWD, then SIZE / RETR / STOR on
the file */
+
+ FTPFILE_INT_MAX = INT_MAX /* Force underlying type of
curl_ftpfile to int */
 } curl_ftpfile;

 struct FTP {

Regards,
Yang
Received on 2005-11-30