]> granicus.if.org Git - curl/commitdiff
use the newer option names
authorDaniel Stenberg <daniel@haxx.se>
Mon, 8 Dec 2003 14:13:19 +0000 (14:13 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Dec 2003 14:13:19 +0000 (14:13 +0000)
docs/examples/fopen.c
docs/examples/ftpget.c
docs/examples/ftpgetresp.c
docs/examples/ftpupload.c
docs/examples/getinmemory.c
docs/examples/httpput.c
docs/examples/post-callback.c

index 452995bc3c002b7fb5d50ed048850f1f41f0d9e6..272c1ad87815a3482db67a636a3cea5666feb337 100644 (file)
@@ -236,7 +236,7 @@ url_fopen(char *url,const char *operation)
        file->handle.curl = curl_easy_init();
 
        curl_easy_setopt(file->handle.curl, CURLOPT_URL, url);
-       curl_easy_setopt(file->handle.curl, CURLOPT_FILE, file);
+       curl_easy_setopt(file->handle.curl, CURLOPT_WRITEDATA, file);
        curl_easy_setopt(file->handle.curl, CURLOPT_VERBOSE, FALSE);
        curl_easy_setopt(file->handle.curl, CURLOPT_WRITEFUNCTION, write_callback);
 
index 6d728c6ec20d24ed16ba6c91cdf32fa024a949b7..2c2275fa5d5af7c8e333ff6d149ccd5948576236 100644 (file)
@@ -58,7 +58,7 @@ int main(void)
     /* Define our callback to get called when there's data to be written */
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
     /* Set a pointer to our struct to pass to the callback */
-    curl_easy_setopt(curl, CURLOPT_FILE, &ftpfile);
+    curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
 
     /* Switch on full protocol/debug output */
     curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
index eb56e19d271a0357f0020d10b9e12fa3333d9199..82b1d36a70564fc5964a0dfb3c6be5c9a130db41 100644 (file)
@@ -45,7 +45,7 @@ int main(int argc, char **argv)
   if(curl) {
     /* Get a file listing from sunet */
     curl_easy_setopt(curl, CURLOPT_URL, "ftp://ftp.sunet.se/");
-    curl_easy_setopt(curl, CURLOPT_FILE, ftpfile);
+    curl_easy_setopt(curl, CURLOPT_WRITEDATA, ftpfile);
     curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response);
     curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile);
     res = curl_easy_perform(curl);
index dee44c4ab0c7ace27bdc5e3b8bec4de80029cacc..2ac874537e17bf877ffce42697cead444f42bf20 100644 (file)
@@ -70,7 +70,7 @@ int main(int argc, char **argv)
     curl_easy_setopt(curl, CURLOPT_POSTQUOTE, headerlist);
 
     /* now specify which file to upload */
-    curl_easy_setopt(curl, CURLOPT_INFILE, hd_src);
+    curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
 
     /* and give the size of the upload (optional) */
     curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_info.st_size);
index e45beb070afa9ece95303cca0f95c5abaa312a83..f7e27460f1a8488e7f13782d3f779becc00362f5 100644 (file)
@@ -60,7 +60,7 @@ int main(int argc, char **argv)
   curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
 
   /* we pass our 'chunk' struct to the callback function */
-  curl_easy_setopt(curl_handle, CURLOPT_FILE, (void *)&chunk);
+  curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
 
   /* get it! */
   curl_easy_perform(curl_handle);
index 78275c40a0f4e90f1013b2c83d229eabc6a55a28..983e60240b160b16e04a7161ded707ee2888506a 100644 (file)
@@ -82,7 +82,7 @@ int main(int argc, char **argv)
     curl_easy_setopt(curl,CURLOPT_URL, url);
 
     /* now specify which file to upload */
-    curl_easy_setopt(curl, CURLOPT_INFILE, hd_src);
+    curl_easy_setopt(curl, CURLOPT_READDATA, hd_src);
 
     /* and give the size of the upload (optional) */
     curl_easy_setopt(curl, CURLOPT_INFILESIZE, file_info.st_size);
index d4664a57557f8bfb35a6678aa1f4016f1f57d7ec..eda878677ef8276a276a0d7c25ca0dc19b72a5a8 100644 (file)
@@ -74,7 +74,7 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
 
     /* pointer to pass to our read function */
-    curl_easy_setopt(curl, CURLOPT_INFILE, &pooh);
+    curl_easy_setopt(curl, CURLOPT_READDATA, &pooh);
 
     /* get verbose debug output please */
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);