~ubuntu-branches/ubuntu/saucy/curl/saucy-201307251546

« back to all changes in this revision

Viewing changes to docs/examples/ftpuploadresume.c

  • Committer: Bazaar Package Importer
  • Author(s): Ramakrishnan Muthukrishnan
  • Date: 2010-10-18 11:13:17 UTC
  • mto: (3.6.1 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20101018111317-9rkas34ecwtq0upn
Tags: upstream-7.21.2
ImportĀ upstreamĀ versionĀ 7.21.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
 
34
34
/* parse headers for Content-Length */
35
 
size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream) {
 
35
size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, void *stream)
 
36
{
36
37
  int r;
37
38
  long len = 0;
38
39
 
46
47
}
47
48
 
48
49
/* discard downloaded data */
49
 
size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) {
 
50
size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream)
 
51
{
50
52
  return size * nmemb;
51
53
}
52
54
 
143
145
  }
144
146
}
145
147
 
146
 
int main(int c, char **argv) {
 
148
int main(int c, char **argv)
 
149
{
147
150
  CURL *curlhandle = NULL;
148
151
 
149
152
  curl_global_init(CURL_GLOBAL_ALL);
150
153
  curlhandle = curl_easy_init();
151
154
 
152
 
  upload(curlhandle, "ftp://user:pass@host/path/file", "C:\\file", 0, 3);
 
155
  upload(curlhandle, "ftp://user:pass@example.com/path/file", "C:\\file", 0, 3);
153
156
 
154
157
  curl_easy_cleanup(curlhandle);
155
158
  curl_global_cleanup();