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:
Viktor Szakats 2026-02-13 01:47:10 +01:00
parent ac46392f44
commit af78b199b2
No known key found for this signature in database
89 changed files with 424 additions and 448 deletions

View file

@ -34,7 +34,7 @@ We remove support for CMake <3.18 in April 2026.
CMake 3.18 was released on 2020-07-15.
## TLS SRP Authentication
## TLS-SRP Authentication
Transport Layer Security Secure Remote Password is a TLS feature that does not
work with TLS 1.3 or QUIC and is virtually unused by curl users and in

View file

@ -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

View file

@ -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 */

View file

@ -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 */

View file

@ -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;

View file

@ -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]);

View file

@ -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 */

View file

@ -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);

View file

@ -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 */

View file

@ -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 */

View 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);

View file

@ -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);

View file

@ -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 */

View file

@ -58,7 +58,6 @@ while(<S>) {
$rem{$sym}=$a[2];
}
}
}
close(S);

View file

@ -68,7 +68,7 @@ int main(void)
/* add a part */
part = curl_mime_addpart(mime);
/* add data to the part */
/* add data to the part */
curl_mime_data(part, "raw contents to send", CURL_ZERO_TERMINATED);
}
}

View file

@ -63,7 +63,7 @@ int main(void)
if(curl) {
struct progress data;
/* pass struct to callback */
/* pass struct to callback */
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data);
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);

View file

@ -109,7 +109,7 @@ int main(void)
CURL *curl = curl_easy_init();
if(curl) {
/* pass struct to callback */
/* pass struct to callback */
curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data);
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);

View file

@ -41,7 +41,7 @@ option.
Using this option multiple times makes the last set string override the
previous ones. Set it to NULL to disable its use again.
This feature relies on TLS SRP which does not work with TLS 1.3.
This feature relies on TLS-SRP which does not work with TLS 1.3.
# DEFAULT

View file

@ -45,7 +45,7 @@ defined in RFC 5054 and provides mutual authentication if both sides have a
shared secret. To use TLS-SRP, you must also set the
CURLOPT_TLSAUTH_USERNAME(3) and CURLOPT_TLSAUTH_PASSWORD(3) options.
TLS SRP does not work with TLS 1.3.
TLS-SRP does not work with TLS 1.3.
# DEFAULT

View file

@ -40,7 +40,7 @@ option.
Using this option multiple times makes the last set string override the
previous ones. Set it to NULL to disable its use again.
This feature relies on TLS SRP which does not work with TLS 1.3.
This feature relies on TLS-SRP which does not work with TLS 1.3.
# DEFAULT

View file

@ -110,7 +110,7 @@ int main(void)
CURLcode result;
CURL *curl = curl_easy_init();
if(curl) {
/* send all data to this function */
/* send all data to this function */
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cb);
/* we pass our 'chunk' struct to the callback function */

View file

@ -65,7 +65,7 @@ int main(void)
if(curl) {
struct progress data;
/* pass struct to callback */
/* pass struct to callback */
curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &data);
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_cb);
}

View file

@ -105,7 +105,7 @@ int main(void)
if(curl) {
struct progress data;
/* pass struct to callback */
/* pass struct to callback */
curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &data);
/* enable progress callback getting called */

View file

@ -100,6 +100,5 @@ EOS
EOS
;
}
}
}