aboutsummaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-08-16 01:33:59 +0000
committerYang Tse <yangsita@gmail.com>2008-08-16 01:33:59 +0000
commitad638da2c29a61babb50fdced0333393416a199a (patch)
tree5956d0f5515251212742ec9ff0c9d01088a295d7 /lib/file.c
parenta923d8541c938aedd36d1c39a9bacf3e2a9eec10 (diff)
Library internal only C preprocessor macros FORMAT_OFF_T and FORMAT_OFF_TU
remain in use as internal curl_off_t print formatting strings for the internal *printf functions which still cannot handle print formatting string directives such as "I64d", "I64u", and others available on MSVC, MinGW, Intel's ICC, and other DOS/Windows compilers. This reverts previous commit part which did: FORMAT_OFF_T -> CURL_FORMAT_CURL_OFF_T FORMAT_OFF_TU -> CURL_FORMAT_CURL_OFF_TU
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/file.c b/lib/file.c
index ced1a6ca8..08d26c54a 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -149,7 +149,7 @@ static CURLcode file_range(struct connectdata *conn)
if((-1 == to) && (from>=0)) {
/* X - */
data->state.resume_from = from;
- DEBUGF(infof(data, "RANGE %" CURL_FORMAT_CURL_OFF_T " to end of file\n",
+ DEBUGF(infof(data, "RANGE %" FORMAT_OFF_T " to end of file\n",
from));
}
else if(from < 0) {
@@ -157,7 +157,7 @@ static CURLcode file_range(struct connectdata *conn)
totalsize = -from;
data->req.maxdownload = -from;
data->state.resume_from = from;
- DEBUGF(infof(data, "RANGE the last %" CURL_FORMAT_CURL_OFF_T " bytes\n",
+ DEBUGF(infof(data, "RANGE the last %" FORMAT_OFF_T " bytes\n",
totalsize));
}
else {
@@ -165,13 +165,12 @@ 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 %" CURL_FORMAT_CURL_OFF_T
- " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n",
+ DEBUGF(infof(data, "RANGE from %" FORMAT_OFF_T
+ " getting %" FORMAT_OFF_T " bytes\n",
from, data->req.maxdownload));
}
- 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",
+ DEBUGF(infof(data, "range-download from %" FORMAT_OFF_T
+ " to %" FORMAT_OFF_T ", totally %" FORMAT_OFF_T " bytes\n",
from, to, data->req.maxdownload));
}
else
@@ -461,7 +460,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: %" CURL_FORMAT_CURL_OFF_T "\r\n", expected_size);
+ "Content-Length: %" FORMAT_OFF_T "\r\n", expected_size);
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
if(result)
return result;