diff options
author | Daniel Stenberg <daniel@haxx.se> | 2010-10-05 15:00:19 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2010-10-05 15:00:19 +0200 |
commit | 18e7b52e8e95f7204d8ef7ff0f0ff0043afe45a9 (patch) | |
tree | 16916d3680982a91be43e16cad44df14d3dd6d7b /docs/examples/ftpuploadresume.c | |
parent | 6d272e53a2b109400c1ee9a31ffa40f288459b41 (diff) |
examples: use example.com in example URLs
Diffstat (limited to 'docs/examples/ftpuploadresume.c')
-rw-r--r-- | docs/examples/ftpuploadresume.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c index 3dda06781..81a790a11 100644 --- a/docs/examples/ftpuploadresume.c +++ b/docs/examples/ftpuploadresume.c @@ -32,7 +32,8 @@ int __cdecl _snscanf(const char * input, size_t length, const char * format, ... /* parse headers for Content-Length */ -size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) { +size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) +{ int r; long len = 0; @@ -46,7 +47,8 @@ size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) } /* discard downloaded data */ -size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) { +size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) +{ return size * nmemb; } @@ -143,13 +145,14 @@ int upload(CURL *curlhandle, const char * remotepath, const char * localpath, } } -int main(int c, char **argv) { +int main(int c, char **argv) +{ CURL *curlhandle = NULL; curl_global_init(CURL_GLOBAL_ALL); curlhandle = curl_easy_init(); - upload(curlhandle, "ftp://user:pass@host/path/file", "C:\\file", 0, 3); + upload(curlhandle, "ftp://user:pass@example.com/path/file", "C:\\file", 0, 3); curl_easy_cleanup(curlhandle); curl_global_cleanup(); |