~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to docs/examples/ftp-wildcard.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2014-11-10 08:48:21 UTC
  • mfrom: (3.4.52 sid)
  • Revision ID: package-import@ubuntu.com-20141110084821-inwi9tek417xe4te
Tags: 7.38.0-3ubuntu1
* Merge from Debian. Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.
* Dropped patches:
  - debian/patches/09_fix-timeout-in-poll-and-wait.patch: upstream
  - debian/patches/CVE-2014-3613.patch: upstream
  - debian/patches/CVE-2014-3620.patch: upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
26
26
  FILE *output;
27
27
};
28
28
 
29
 
static long file_is_comming(struct curl_fileinfo *finfo,
30
 
                            struct callback_data *data,
31
 
                            int remains);
 
29
static long file_is_coming(struct curl_fileinfo *finfo,
 
30
                           struct callback_data *data,
 
31
                           int remains);
32
32
 
33
33
static long file_is_downloaded(struct callback_data *data);
34
34
 
61
61
  curl_easy_setopt(handle, CURLOPT_WILDCARDMATCH, 1L);
62
62
 
63
63
  /* callback is called before download of concrete file started */
64
 
  curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_comming);
 
64
  curl_easy_setopt(handle, CURLOPT_CHUNK_BGN_FUNCTION, file_is_coming);
65
65
 
66
66
  /* callback is called after data from the file have been transferred */
67
67
  curl_easy_setopt(handle, CURLOPT_CHUNK_END_FUNCTION, file_is_downloaded);
89
89
  return rc;
90
90
}
91
91
 
92
 
static long file_is_comming(struct curl_fileinfo *finfo,
93
 
                            struct callback_data *data,
94
 
                            int remains)
 
92
static long file_is_coming(struct curl_fileinfo *finfo,
 
93
                           struct callback_data *data,
 
94
                           int remains)
95
95
{
96
96
  printf("%3d %40s %10luB ", remains, finfo->filename,
97
97
         (unsigned long)finfo->size);