mirror of
https://github.com/curl/curl.git
synced 2026-07-23 11:57:18 +03:00
tidy-up: miscellaneous
- vms/curlmsg_vms.h: delete unused/commented code. - vtls/schannel_verify: sort includes. - typecheck-gcc.h: fix indent and alignment. - lib/config-win32.h: drop idle `#undef`. - spacecheck: check for stray empty lines before after curly braces. - make literals more readable: 1048576 -> 1024 * 1024 - scope variables. - use ISO date in a comment. - drop redundant parentheses. - drop empty comments. - unfold lines. - duplicate/stray spaces in comments. - fix indent, whitespace, minor typos. Closes #20690
This commit is contained in:
parent
ac46392f44
commit
af78b199b2
89 changed files with 424 additions and 448 deletions
|
|
@ -172,7 +172,7 @@ int main(int argc, const char *argv[])
|
|||
/* specify URL to get */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
|
||||
/* send all data to this function */
|
||||
/* send all data to this function */
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
|
||||
/* some servers do not like requests that are made without a user-agent
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ int main(void)
|
|||
{
|
||||
CURL *curl;
|
||||
CURLcode result;
|
||||
struct sockaddr_in servaddr; /* socket address structure */
|
||||
struct sockaddr_in servaddr; /* socket address structure */
|
||||
curl_socket_t sockfd;
|
||||
|
||||
result = curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
|
@ -141,7 +141,7 @@ int main(void)
|
|||
/* no progress meter please */
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
|
||||
|
||||
/* send all data to this function */
|
||||
/* send all data to this function */
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
|
||||
/* call this function to get a socket */
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ int main(void)
|
|||
/* specify URL to get */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
|
||||
|
||||
/* send all data to this function */
|
||||
/* send all data to this function */
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
|
||||
/* we pass our 'chunk' struct to the callback function */
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include <curl/curl.h>
|
||||
|
||||
/* curl write callback, to fill tidy's input buffer... */
|
||||
/* curl write callback, to fill tidy's input buffer... */
|
||||
static uint write_cb(char *in, uint size, uint nmemb, TidyBuffer *out)
|
||||
{
|
||||
uint r;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ static void setup(CURL *curl)
|
|||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
|
||||
/* write data to a struct */
|
||||
/* write data to a struct */
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
init_memory(&files[0]);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &files[0]);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ int main(void)
|
|||
* this can contain a message sequence set and a number of search criteria
|
||||
* keywords including flags such as ANSWERED, DELETED, DRAFT, FLAGGED, NEW,
|
||||
* RECENT and SEEN. For more information about the search criteria please
|
||||
* see RFC-3501 section 6.4.4. */
|
||||
* see RFC-3501 section 6.4.4. */
|
||||
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "SEARCH NEW");
|
||||
|
||||
/* Perform the custom request */
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ int main(void)
|
|||
};
|
||||
int i = 0;
|
||||
|
||||
/* Change the maximum number of persistent connection */
|
||||
/* Change the maximum number of persistent connection */
|
||||
curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 1L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ int main(void)
|
|||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.org/");
|
||||
|
||||
/* send all data to this function */
|
||||
/* send all data to this function */
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
|
||||
/* we pass our 'chunk' struct to the callback function */
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ int main(void)
|
|||
/* no progress meter please */
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
|
||||
|
||||
/* send all data to this function */
|
||||
/* send all data to this function */
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
|
||||
/* open the header file */
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ int main(void)
|
|||
/* This is the URL for your mailserver */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
|
||||
|
||||
/* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
|
||||
/* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
|
||||
recipients = curl_slist_append(recipients, "Friends");
|
||||
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ int main(void)
|
|||
/* This is the URL for your mailserver */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
|
||||
|
||||
/* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
|
||||
/* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
|
||||
recipients = curl_slist_append(recipients, "<recipient@example.com>");
|
||||
curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ int main(int argc, const char *argv[])
|
|||
/* disable progress meter, set to 0L to enable it */
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
|
||||
|
||||
/* send all data to this function */
|
||||
/* send all data to this function */
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
|
||||
|
||||
/* open the file */
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ while(<S>) {
|
|||
$rem{$sym}=$a[2];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(S);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue