From 8e215729e7f45b1c9e17f8451046b7b5c04943e6 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 1 May 2008 02:32:40 +0000 Subject: Aesthetic: improved consistency of uri terminology Switched any references to 'url' to 'uri' git-archimport-id: getht@sv.gnu.org/getht--mainline--0.1--patch-43 --- src/download.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/download.c') diff --git a/src/download.c b/src/download.c index 0e2e23f..948b289 100644 --- a/src/download.c +++ b/src/download.c @@ -43,10 +43,10 @@ extern char proxy_user[STR_MAX]; extern char proxy_pass[STR_MAX]; extern CURL *main_curl_handle; -int save_file(CURL *curl_handle, char *url, char *filepath, long resume_offset) -/* Save the file *url to *filepath */ +int save_file(CURL *curl_handle, char *uri, char *filepath, long resume_offset) +/* Save the file *uri to *filepath */ { - printf("Downloading %s\n",url); + printf("Downloading %s\n",uri); if(!curl_handle) curl_handle = main_curl_handle; @@ -60,7 +60,7 @@ int save_file(CURL *curl_handle, char *url, char *filepath, long resume_offset) return 1; } - curl_easy_setopt(curl_handle, CURLOPT_URL, url); + curl_easy_setopt(curl_handle, CURLOPT_URL, uri); curl_easy_setopt(curl_handle, CURLOPT_READFUNCTION, read_func); curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, write_func); curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, file); @@ -110,7 +110,7 @@ int save_file(CURL *curl_handle, char *url, char *filepath, long resume_offset) if(curl_easy_perform(curl_handle)) { remove(filepath); - fprintf(stderr,"\nError, could not download %s: %s\n",url, errorinfo); + fprintf(stderr,"\nError, could not download %s: %s\n",uri, errorinfo); return 1; } @@ -120,7 +120,7 @@ int save_file(CURL *curl_handle, char *url, char *filepath, long resume_offset) } else { fprintf(stderr,"Error: curl failed to initialise.\n"); - printf("Could not download %s\n",url); + printf("Could not download %s\n",uri); return 1; } return 0; @@ -148,7 +148,7 @@ int update_progress(void *data, double dltotal, double dlnow, return 0; } -double getremotefilesize(CURL *curl_handle, char *url) +double getremotefilesize(CURL *curl_handle, char *uri) { double filesize; @@ -157,7 +157,7 @@ double getremotefilesize(CURL *curl_handle, char *url) if(curl_handle) { - curl_easy_setopt(curl_handle, CURLOPT_URL, url); + curl_easy_setopt(curl_handle, CURLOPT_URL, uri); curl_easy_setopt(curl_handle, CURLOPT_READFUNCTION, read_func); /* don't download or return either body or header */ -- cgit v1.2.3