From ad638da2c29a61babb50fdced0333393416a199a Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 16 Aug 2008 01:33:59 +0000 Subject: 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 --- lib/transfer.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'lib/transfer.c') diff --git a/lib/transfer.c b/lib/transfer.c index 4b59f6d24..dae8599b9 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -567,9 +567,9 @@ static CURLcode readwrite_data(struct SessionHandle *data, if(excess > 0 && !k->ignorebody) { infof(data, "Rewinding stream by : %d" - " bytes on url %s (size = %" CURL_FORMAT_CURL_OFF_T - ", maxdownload = %" CURL_FORMAT_CURL_OFF_T - ", bytecount = %" CURL_FORMAT_CURL_OFF_T ", nread = %d)\n", + " bytes on url %s (size = %" FORMAT_OFF_T + ", maxdownload = %" FORMAT_OFF_T + ", bytecount = %" FORMAT_OFF_T ", nread = %d)\n", excess, data->state.path, k->size, k->maxdownload, k->bytecount, nread); read_rewind(conn, excess); @@ -1135,7 +1135,7 @@ static CURLcode readwrite_headers(struct SessionHandle *data, happens for example when older Apache servers send large files */ conn->bits.close = TRUE; - infof(data, "Negative content-length: %" CURL_FORMAT_CURL_OFF_T + infof(data, "Negative content-length: %" FORMAT_OFF_T ", closing after transfer\n", contentlength); } } @@ -1647,12 +1647,11 @@ CURLcode Curl_readwrite(struct connectdata *conn, (Curl_tvdiff(k->now, k->start) >= data->set.timeout)) { if(k->size != -1) { failf(data, "Operation timed out after %ld milliseconds with %" - CURL_FORMAT_CURL_OFF_T " out of %" - CURL_FORMAT_CURL_OFF_T " bytes received", + FORMAT_OFF_T " out of %" FORMAT_OFF_T " bytes received", data->set.timeout, k->bytecount, k->size); } else { failf(data, "Operation timed out after %ld milliseconds with %" - CURL_FORMAT_CURL_OFF_T " bytes received", + FORMAT_OFF_T " bytes received", data->set.timeout, k->bytecount); } return CURLE_OPERATION_TIMEDOUT; @@ -1674,7 +1673,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, (k->bytecount != (k->size + data->state.crlf_conversions)) && #endif /* CURL_DO_LINEEND_CONV */ !data->req.newurl) { - failf(data, "transfer closed with %" CURL_FORMAT_CURL_OFF_T + failf(data, "transfer closed with %" FORMAT_OFF_T " bytes remaining to read", k->size - k->bytecount); return CURLE_PARTIAL_FILE; -- cgit v1.2.3