mirror of
https://github.com/curl/curl.git
synced 2026-08-24 16:33:33 +03:00
example: fix formatting nits
Also: - drop non-portable `__STRING()` macro use where still used. Closes #19746
This commit is contained in:
parent
c10dda9ebb
commit
aad3c2e8e1
50 changed files with 225 additions and 227 deletions
|
|
@ -65,9 +65,9 @@
|
|||
/* seek callback function */
|
||||
static int my_seek(void *userp, curl_off_t offset, int origin)
|
||||
{
|
||||
FILE *fp = (FILE *) userp;
|
||||
FILE *fp = (FILE *)userp;
|
||||
|
||||
if(fseek(fp, (long) offset, origin) == -1)
|
||||
if(fseek(fp, (long)offset, origin) == -1)
|
||||
/* could not seek */
|
||||
return CURL_SEEKFUNC_CANTSEEK;
|
||||
|
||||
|
|
@ -128,13 +128,13 @@ int main(int argc, char **argv)
|
|||
curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_cb);
|
||||
|
||||
/* which file to upload */
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, (void *) fp);
|
||||
curl_easy_setopt(curl, CURLOPT_READDATA, (void *)fp);
|
||||
|
||||
/* set the seek function */
|
||||
curl_easy_setopt(curl, CURLOPT_SEEKFUNCTION, my_seek);
|
||||
|
||||
/* pass the file descriptor to the seek callback as well */
|
||||
curl_easy_setopt(curl, CURLOPT_SEEKDATA, (void *) fp);
|
||||
curl_easy_setopt(curl, CURLOPT_SEEKDATA, (void *)fp);
|
||||
|
||||
/* enable "uploading" (which means PUT when doing HTTP) */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue