diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-12-31 11:10:25 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-12-31 11:10:42 +0000 |
commit | 60bd22620a1e63fb163a788f9565b94d138c6030 (patch) | |
tree | 8562a7bf927008c57b006ed907996a4f69dd52bf /lib/file.c | |
parent | 6e4d4a9b51fe65b47992148fc548a5d4efa8ef64 (diff) |
mprintf: Replaced internal usage of FORMAT_OFF_T and FORMAT_OFF_TU
Following commit 0aafd77fa4c6f2, replaced the internal usage of
FORMAT_OFF_T and FORMAT_OFF_TU with the external versions that we
expect API programmers to use.
This negates the need for separate definitions which were subtly
different under different platforms/compilers.
Diffstat (limited to 'lib/file.c')
-rw-r--r-- | lib/file.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/file.c b/lib/file.c index e658ada0a..043cccd47 100644 --- a/lib/file.c +++ b/lib/file.c @@ -152,14 +152,14 @@ static CURLcode file_range(struct connectdata *conn) if((-1 == to) && (from>=0)) { /* X - */ data->state.resume_from = from; - DEBUGF(infof(data, "RANGE %" FORMAT_OFF_T " to end of file\n", + DEBUGF(infof(data, "RANGE %" CURL_FORMAT_CURL_OFF_T " to end of file\n", from)); } else if(from < 0) { /* -Y */ data->req.maxdownload = -from; data->state.resume_from = from; - DEBUGF(infof(data, "RANGE the last %" FORMAT_OFF_T " bytes\n", + DEBUGF(infof(data, "RANGE the last %" CURL_FORMAT_CURL_OFF_T " bytes\n", -from)); } else { @@ -167,12 +167,13 @@ static CURLcode file_range(struct connectdata *conn) totalsize = to-from; data->req.maxdownload = totalsize+1; /* include last byte */ data->state.resume_from = from; - DEBUGF(infof(data, "RANGE from %" FORMAT_OFF_T - " getting %" FORMAT_OFF_T " bytes\n", + DEBUGF(infof(data, "RANGE from %" CURL_FORMAT_CURL_OFF_T + " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n", from, data->req.maxdownload)); } - DEBUGF(infof(data, "range-download from %" FORMAT_OFF_T - " to %" FORMAT_OFF_T ", totally %" FORMAT_OFF_T " bytes\n", + DEBUGF(infof(data, "range-download from %" CURL_FORMAT_CURL_OFF_T + " to %" CURL_FORMAT_CURL_OFF_T ", totally %" + CURL_FORMAT_CURL_OFF_T " bytes\n", from, to, data->req.maxdownload)); } else @@ -465,7 +466,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) if(data->set.opt_no_body && data->set.include_header && fstated) { CURLcode result; snprintf(buf, sizeof(data->state.buffer), - "Content-Length: %" FORMAT_OFF_T "\r\n", expected_size); + "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", expected_size); result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); if(result) return result; |