Loading docs/examples/10-at-a-time.c +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ static const char *urls[] = { #define MAX 10 /* number of simultaneous transfers */ #define CNT sizeof(urls)/sizeof(char*) /* total number of transfers to do */ static int cb(char *d, size_t n, size_t l, void *p) static size_t cb(char *d, size_t n, size_t l, void *p) { /* take care of the data here, ignored in this example */ (void)d; Loading docs/examples/anyauthput.c +5 −5 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ /* ioctl callback function */ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp) { int fd = (int)userp; intptr_t fd = (intptr_t)userp; (void)handle; /* not used in here */ Loading @@ -61,7 +61,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) { size_t retcode; int fd = (int)stream; intptr_t fd = (intptr_t)stream; retcode = read(fd, ptr, size * nmemb); Loading @@ -74,7 +74,7 @@ int main(int argc, char **argv) { CURL *curl; CURLcode res; int hd ; intptr_t hd ; struct stat file_info; char *file; Loading @@ -100,13 +100,13 @@ int main(int argc, char **argv) curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); /* which file to upload */ curl_easy_setopt(curl, CURLOPT_READDATA, hd); curl_easy_setopt(curl, CURLOPT_READDATA, (void*)hd); /* set the ioctl function */ curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, my_ioctl); /* pass the file descriptor to the ioctl callback as well */ curl_easy_setopt(curl, CURLOPT_IOCTLDATA, hd); curl_easy_setopt(curl, CURLOPT_IOCTLDATA, (void*)hd); /* enable "uploading" (which means PUT when doing HTTP) */ curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; Loading docs/examples/debug.c +2 −2 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ void dump(const char *text, static int my_trace(CURL *handle, curl_infotype type, unsigned char *data, size_t size, char *data, size_t size, void *userp) { struct data *config = (struct data *)userp; Loading Loading @@ -98,7 +98,7 @@ int my_trace(CURL *handle, curl_infotype type, break; } dump(text, stderr, data, size, config->trace_ascii); dump(text, stderr, (unsigned char *)data, size, config->trace_ascii); return 0; } Loading docs/examples/ftpget.c +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ struct FtpFile { FILE *stream; }; static int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { struct FtpFile *out=(struct FtpFile *)stream; if(out && !out->stream) { Loading docs/examples/multi-debugcallback.c +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ void dump(const char *text, static int my_trace(CURL *handle, curl_infotype type, unsigned char *data, size_t size, char *data, size_t size, void *userp) { const char *text; Loading Loading
docs/examples/10-at-a-time.c +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ static const char *urls[] = { #define MAX 10 /* number of simultaneous transfers */ #define CNT sizeof(urls)/sizeof(char*) /* total number of transfers to do */ static int cb(char *d, size_t n, size_t l, void *p) static size_t cb(char *d, size_t n, size_t l, void *p) { /* take care of the data here, ignored in this example */ (void)d; Loading
docs/examples/anyauthput.c +5 −5 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ /* ioctl callback function */ static curlioerr my_ioctl(CURL *handle, curliocmd cmd, void *userp) { int fd = (int)userp; intptr_t fd = (intptr_t)userp; (void)handle; /* not used in here */ Loading @@ -61,7 +61,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) { size_t retcode; int fd = (int)stream; intptr_t fd = (intptr_t)stream; retcode = read(fd, ptr, size * nmemb); Loading @@ -74,7 +74,7 @@ int main(int argc, char **argv) { CURL *curl; CURLcode res; int hd ; intptr_t hd ; struct stat file_info; char *file; Loading @@ -100,13 +100,13 @@ int main(int argc, char **argv) curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); /* which file to upload */ curl_easy_setopt(curl, CURLOPT_READDATA, hd); curl_easy_setopt(curl, CURLOPT_READDATA, (void*)hd); /* set the ioctl function */ curl_easy_setopt(curl, CURLOPT_IOCTLFUNCTION, my_ioctl); /* pass the file descriptor to the ioctl callback as well */ curl_easy_setopt(curl, CURLOPT_IOCTLDATA, hd); curl_easy_setopt(curl, CURLOPT_IOCTLDATA, (void*)hd); /* enable "uploading" (which means PUT when doing HTTP) */ curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; Loading
docs/examples/debug.c +2 −2 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ void dump(const char *text, static int my_trace(CURL *handle, curl_infotype type, unsigned char *data, size_t size, char *data, size_t size, void *userp) { struct data *config = (struct data *)userp; Loading Loading @@ -98,7 +98,7 @@ int my_trace(CURL *handle, curl_infotype type, break; } dump(text, stderr, data, size, config->trace_ascii); dump(text, stderr, (unsigned char *)data, size, config->trace_ascii); return 0; } Loading
docs/examples/ftpget.c +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ struct FtpFile { FILE *stream; }; static int my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) static size_t my_fwrite(void *buffer, size_t size, size_t nmemb, void *stream) { struct FtpFile *out=(struct FtpFile *)stream; if(out && !out->stream) { Loading
docs/examples/multi-debugcallback.c +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ void dump(const char *text, static int my_trace(CURL *handle, curl_infotype type, unsigned char *data, size_t size, char *data, size_t size, void *userp) { const char *text; Loading