badwords: check indented lines in source code, fix fallouts
- badwords.pl: add `-a` option to check all lines in source code files.
Before this patch indented lines were skipped (to avoid Markdown code
fences.)
- GHA/checksrc: use `-a` when verifying the source code.
- GHA/checksrc: disable `So` and `But` rules for source code.
- GHA/checksrc: add docs/examples to the verified sources.
- badwords.txt: delete 4 duplicates.
- badwords.txt: group and sort contractions.
- badwords.txt: allow ` url = `, `DIR`, `<file name`.
Closes #19536
diff --git a/.github/scripts/badwords.pl b/.github/scripts/badwords.pl
index e119617..014468c 100755
--- a/.github/scripts/badwords.pl
+++ b/.github/scripts/badwords.pl
@@ -20,7 +20,12 @@
my @whitelist;
my %alt;
my %exactcase;
+my $skip_indented = 1;
+if($ARGV[0] eq "-a") {
+ shift @ARGV;
+ $skip_indented = 0;
+}
my %wl;
if($ARGV[0] eq "-w") {
shift @ARGV;
@@ -68,7 +73,7 @@
my $in = $_;
$l++;
chomp $in;
- if($in =~ /^ /) {
+ if($skip_indented && $in =~ /^ /) {
next;
}
# remove the link part
diff --git a/.github/scripts/badwords.txt b/.github/scripts/badwords.txt
index 705c54f..d24d97f 100644
--- a/.github/scripts/badwords.txt
+++ b/.github/scripts/badwords.txt
@@ -10,59 +10,56 @@
tool-chain:toolchain
wild-card:wildcard
wild card:wildcard
+\bit's:it is
+aren't:are not
+can't:cannot
+could've:could have
+couldn't:could not
+didn't:did not
+doesn't:does not
+don't=do not
i'm:I am
-you've:You have
-we've:we have
-we're:we are
-we'll:we will
-we'd:we would
-they've:They have
-they're:They are
-they'll:They will
+isn't:is not
+it'd:it would
+should've:should have
+that's:that is
+there's:there is
they'd:They would
-you've:you have
+they'll:They will
+they're:They are
+they've:They have
+we'd:we would
+we'll:we will
+we're:we are
+we've:we have
+won't:will not
you'd:you would
you'll:you will
you're:you are
-should've:should have
-don't=do not
-could've:could have
-doesn't:does not
-isn't:is not
-aren't:are not
+you've:you have
a html: an html
a http: an http
a ftp: an ftp
a IPv4: an IPv4
a IPv6: an IPv6
- url =URL
+ url [^=]=URL
[^/]internet\b=Internet
isation:ization
-\bit's:it is
-it'd:it would
-there's:there is
[^.]\. And: Rewrite it somehow?
^(And|So|But) = Rewrite it somehow?
\. But: Rewrite it somehow?
\. So : Rewrite without "so" ?
- dir [^=]:directory
+ dir [^=]=directory
+ Dir [^=]=Directory
sub-director:subdirector
-you'd:you would
-you'll:you will
-can't:cannot
-that's:that is
web page:webpage
host name\b:hostname
host names\b:hostnames
-[^;]file name\b:filename
+[^;<]file name\b:filename
file names\b:filenames
\buser name\b:username
\buser names\b:usernames
\bpass phrase:passphrase
-didn't:did not
-doesn't:does not
-won't:will not
-couldn't:could not
\bwill\b:rewrite to present tense
\b32bit=32-bit
\b64bit=64-bit
diff --git a/.github/workflows/checksrc.yml b/.github/workflows/checksrc.yml
index 663811e..9ed049c 100644
--- a/.github/workflows/checksrc.yml
+++ b/.github/workflows/checksrc.yml
@@ -174,6 +174,7 @@
- name: 'yamlcheck'
run: .github/scripts/yamlcheck.sh
- # we allow some extra in source code
- name: 'badwords'
- run: grep -Ev '(\\bwill)' .github/scripts/badwords.txt | .github/scripts/badwords.pl src lib include
+ run: |
+ # we allow some extra in source code
+ grep -Ev '(\\bwill| But: | So : )' .github/scripts/badwords.txt | .github/scripts/badwords.pl -a src lib include docs/examples
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index c905b8b..b13593a 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -152,7 +152,7 @@
data twice!!! */
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
- /* set user name and password for the authentication */
+ /* set username and password for the authentication */
curl_easy_setopt(curl, CURLOPT_USERPWD, "user:password");
/* Now run off and do what you have been told! */
diff --git a/docs/examples/connect-to.c b/docs/examples/connect-to.c
index 253c531..b284877 100644
--- a/docs/examples/connect-to.c
+++ b/docs/examples/connect-to.c
@@ -40,7 +40,7 @@
/*
Each single string should be written using the format
HOST:PORT:CONNECT-TO-HOST:CONNECT-TO-PORT where HOST is the host of the
- request, PORT is the port of the request, CONNECT-TO-HOST is the host name
+ request, PORT is the port of the request, CONNECT-TO-HOST is the hostname
to connect to, and CONNECT-TO-PORT is the port to connect to.
*/
/* instead of curl.se:443, it resolves and uses example.com:443 but in other
@@ -53,12 +53,12 @@
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_URL, "https://curl.se/");
- /* since this connects to the wrong host, checking the host name in the
+ /* since this connects to the wrong host, checking the hostname in the
server certificate fails, so unless we disable the check libcurl
returns CURLE_PEER_FAILED_VERIFICATION */
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
- /* Letting the wrong host name in the certificate be okay, the transfer
+ /* Letting the wrong hostname in the certificate be okay, the transfer
goes through but (most likely) causes a 404 or similar because it sends
an unknown name in the Host: header field */
res = curl_easy_perform(curl);
diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c
index cebbd3c..4eee1a6 100644
--- a/docs/examples/cookie_interface.c
+++ b/docs/examples/cookie_interface.c
@@ -47,7 +47,7 @@
printf("Cookies, curl knows:\n");
res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
if(res != CURLE_OK) {
- fprintf(stderr, "Curl curl_easy_getinfo failed: %s\n",
+ fprintf(stderr, "curl curl_easy_getinfo failed: %s\n",
curl_easy_strerror(res));
return 1;
}
@@ -85,7 +85,7 @@
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); /* start cookie engine */
res = curl_easy_perform(curl);
if(res != CURLE_OK) {
- fprintf(stderr, "Curl perform failed: %s\n", curl_easy_strerror(res));
+ fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(res));
return 1;
}
@@ -105,7 +105,7 @@
"PREF", "hello example, I like you!");
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
if(res != CURLE_OK) {
- fprintf(stderr, "Curl curl_easy_setopt failed: %s\n",
+ fprintf(stderr, "curl curl_easy_setopt failed: %s\n",
curl_easy_strerror(res));
return 1;
}
@@ -120,7 +120,7 @@
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.example.com");
res = curl_easy_setopt(curl, CURLOPT_COOKIELIST, nline);
if(res != CURLE_OK) {
- fprintf(stderr, "Curl curl_easy_setopt failed: %s\n",
+ fprintf(stderr, "curl curl_easy_setopt failed: %s\n",
curl_easy_strerror(res));
return 1;
}
@@ -129,14 +129,14 @@
res = curl_easy_perform(curl);
if(res != CURLE_OK) {
- fprintf(stderr, "Curl perform failed: %s\n", curl_easy_strerror(res));
+ fprintf(stderr, "curl perform failed: %s\n", curl_easy_strerror(res));
return 1;
}
curl_easy_cleanup(curl);
}
else {
- fprintf(stderr, "Curl init failed!\n");
+ fprintf(stderr, "curl init failed!\n");
return 1;
}
diff --git a/docs/examples/debug.c b/docs/examples/debug.c
index ff522b0..5df7aae 100644
--- a/docs/examples/debug.c
+++ b/docs/examples/debug.c
@@ -69,7 +69,7 @@
}
fprintf(stream, "%c",
(ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.');
- /* check again for 0D0A, to avoid an extra \n if it's at width */
+ /* check again for 0D0A, to avoid an extra \n if it is at width */
if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
ptr[i + c + 2] == 0x0A) {
i += (c + 3 - width);
diff --git a/docs/examples/ephiperfifo.c b/docs/examples/ephiperfifo.c
index 026967f..b47cbbe 100644
--- a/docs/examples/ephiperfifo.c
+++ b/docs/examples/ephiperfifo.c
@@ -133,7 +133,7 @@
static void timer_cb(struct GlobalInfo *g, int revents);
-/* Update the timer after curl_multi library does its thing. Curl informs the
+/* Update the timer after curl_multi library does its thing. curl informs the
* application through this callback what it wants the new timeout to be,
* after it does some work. */
static int multi_timer_cb(CURLM *multi, long timeout_ms, struct GlobalInfo *g)
@@ -219,7 +219,7 @@
err = read(g->tfd, &count, sizeof(uint64_t));
if(err == -1) {
/* Note that we may call the timer callback even if the timerfd is not
- * readable. It's possible that there are multiple events stored in the
+ * readable. It is possible that there are multiple events stored in the
* epoll buffer (i.e. the timer may have fired multiple times). The event
* count is cleared after the first call so future events in the epoll
* buffer fails to read from the timer. */
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index 0df4100..26db7f5 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -90,7 +90,7 @@
/* get a FILE * of the file */
hd_src = fopen(LOCAL_FILE, "rb");
if(!hd_src) {
- printf("Couldn't open '%s': %s\n", LOCAL_FILE, strerror(errno));
+ printf("Could not open '%s': %s\n", LOCAL_FILE, strerror(errno));
return 2;
}
diff --git a/docs/examples/htmltidy.c b/docs/examples/htmltidy.c
index 0bf3155..97eff2b 100644
--- a/docs/examples/htmltidy.c
+++ b/docs/examples/htmltidy.c
@@ -50,7 +50,7 @@
for(child = tidyGetChild(tnod); child; child = tidyGetNext(child) ) {
ctmbstr name = tidyNodeGetName(child);
if(name) {
- /* if it has a name, then it's an HTML tag ... */
+ /* if it has a name, then it is an HTML tag ... */
TidyAttr attr;
printf("%*.*s%s ", indent, indent, "<", name);
/* walk the attribute list */
@@ -62,7 +62,7 @@
printf(">\n");
}
else {
- /* if it does not have a name, then it's probably text, cdata, etc... */
+ /* if it does not have a name, then it is probably text, cdata, etc... */
TidyBuffer buf;
tidyBufInit(&buf);
tidyNodeGetText(doc, child, &buf);
diff --git a/docs/examples/htmltitle.cpp b/docs/examples/htmltitle.cpp
index 2251a21..cdbf0af 100644
--- a/docs/examples/htmltitle.cpp
+++ b/docs/examples/htmltitle.cpp
@@ -22,7 +22,7 @@
*
***************************************************************************/
/* <DESC>
- * Get a web page, extract the title with libxml.
+ * Get a webpage, extract the title with libxml.
* </DESC>
Written by Lars Nilsson
diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c
index efc7472..ca61a92 100644
--- a/docs/examples/http2-download.c
+++ b/docs/examples/http2-download.c
@@ -90,7 +90,7 @@
}
fprintf(stderr, "%c",
(ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.');
- /* check again for 0D0A, to avoid an extra \n if it's at width */
+ /* check again for 0D0A, to avoid an extra \n if it is at width */
if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
ptr[i + c + 2] == 0x0A) {
i += (c + 3 - width);
diff --git a/docs/examples/http2-serverpush.c b/docs/examples/http2-serverpush.c
index d501f24..8c43075 100644
--- a/docs/examples/http2-serverpush.c
+++ b/docs/examples/http2-serverpush.c
@@ -78,7 +78,7 @@
}
fprintf(stderr, "%c",
(ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.');
- /* check again for 0D0A, to avoid an extra \n if it's at width */
+ /* check again for 0D0A, to avoid an extra \n if it is at width */
if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
ptr[i + c + 2] == 0x0A) {
i += (c + 3 - width);
diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c
index 2bff0d0..7ba150e 100644
--- a/docs/examples/http2-upload.c
+++ b/docs/examples/http2-upload.c
@@ -128,7 +128,7 @@
}
fprintf(stderr, "%c",
(ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.');
- /* check again for 0D0A, to avoid an extra \n if it's at width */
+ /* check again for 0D0A, to avoid an extra \n if it is at width */
if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
ptr[i + c + 2] == 0x0A) {
i += (c + 3 - width);
@@ -305,7 +305,7 @@
num_transfers = 3; /* a suitable low default */
if(argc > 2)
- /* if given a file name, upload this! */
+ /* if given a filename, upload this! */
filename = argv[2];
}
else
diff --git a/docs/examples/http3.c b/docs/examples/http3.c
index 323f6d7..217974f 100644
--- a/docs/examples/http3.c
+++ b/docs/examples/http3.c
@@ -22,7 +22,7 @@
*
***************************************************************************/
/* <DESC>
- * Very simple HTTP/3 GET
+ * Simple HTTP/3 GET
* </DESC>
*/
#include <stdio.h>
diff --git a/docs/examples/https.c b/docs/examples/https.c
index 23729af..1f7f5e1 100644
--- a/docs/examples/https.c
+++ b/docs/examples/https.c
@@ -56,7 +56,7 @@
#ifdef SKIP_HOSTNAME_VERIFICATION
/*
- * If the site you are connecting to uses a different host name that what
+ * If the site you are connecting to uses a different hostname that what
* they have mentioned in their server certificate's commonName (or
* subjectAltName) fields, libcurl refuses to connect. You can skip this
* check, but it makes the connection insecure.
diff --git a/docs/examples/imap-ssl.c b/docs/examples/imap-ssl.c
index 59edd13..6eb49ae 100644
--- a/docs/examples/imap-ssl.c
+++ b/docs/examples/imap-ssl.c
@@ -68,7 +68,7 @@
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
#endif
- /* If the site you are connecting to uses a different host name that what
+ /* If the site you are connecting to uses a different hostname that what
* they have mentioned in their server certificate's commonName (or
* subjectAltName) fields, libcurl refuses to connect. You can skip this
* check, but it makes the connection insecure. */
diff --git a/docs/examples/log_failed_transfers.c b/docs/examples/log_failed_transfers.c
index c9c0009..350d41a 100644
--- a/docs/examples/log_failed_transfers.c
+++ b/docs/examples/log_failed_transfers.c
@@ -140,8 +140,8 @@
/* we need about 100 chars or less to write 95% of lines */
x = 128;
- /* first try: there's probably enough memory to write everything.
- second try: there's definitely enough memory to write everything. */
+ /* first try: there is probably enough memory to write everything.
+ second try: there is definitely enough memory to write everything. */
for(i = 0; i < 2; ++i) {
if(x < 0 || mem_need(mem, (size_t)x + 1) < 0)
break;
diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c
index 758cfca..d838fee 100644
--- a/docs/examples/multi-debugcallback.c
+++ b/docs/examples/multi-debugcallback.c
@@ -71,7 +71,7 @@
}
fprintf(stream, "%c",
(ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.');
- /* check again for 0D0A, to avoid an extra \n if it's at width */
+ /* check again for 0D0A, to avoid an extra \n if it is at width */
if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
ptr[i + c + 2] == 0x0A) {
i += (c + 3 - width);
diff --git a/docs/examples/multi-formadd.c b/docs/examples/multi-formadd.c
index 7a1b9eb..068412827 100644
--- a/docs/examples/multi-formadd.c
+++ b/docs/examples/multi-formadd.c
@@ -51,7 +51,7 @@
CURL_IGNORE_DEPRECATION(
/* Fill in the file upload field. This makes libcurl load data from
- the given file name when curl_easy_perform() is called. */
+ the given filename when curl_easy_perform() is called. */
curl_formadd(&formpost,
&lastptr,
CURLFORM_COPYNAME, "sendfile",
diff --git a/docs/examples/multithread.c b/docs/examples/multithread.c
index 3ecca25..535788e 100644
--- a/docs/examples/multithread.c
+++ b/docs/examples/multithread.c
@@ -97,7 +97,7 @@
pull_one_url,
(void *)&targs[i]);
if(error)
- fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
+ fprintf(stderr, "Could not run thread number %d, errno %d\n", i, error);
else
fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
}
diff --git a/docs/examples/parseurl.c b/docs/examples/parseurl.c
index 8675adc..1514a79 100644
--- a/docs/examples/parseurl.c
+++ b/docs/examples/parseurl.c
@@ -51,7 +51,7 @@
/* extract hostname from the parsed URL */
uc = curl_url_get(h, CURLUPART_HOST, &host, 0);
if(!uc) {
- printf("Host name: %s\n", host);
+ printf("Hostname: %s\n", host);
curl_free(host);
}
diff --git a/docs/examples/pop3-ssl.c b/docs/examples/pop3-ssl.c
index 63a9edc..1be48ad 100644
--- a/docs/examples/pop3-ssl.c
+++ b/docs/examples/pop3-ssl.c
@@ -67,7 +67,7 @@
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
#endif
- /* If the site you are connecting to uses a different host name that what
+ /* If the site you are connecting to uses a different hostname that what
* they have mentioned in their server certificate's commonName (or
* subjectAltName) fields, libcurl refuses to connect. You can skip this
* check, but it makes the connection insecure. */
diff --git a/docs/examples/rtsp-options.c b/docs/examples/rtsp-options.c
index 50d5e2f..8c160f6 100644
--- a/docs/examples/rtsp-options.c
+++ b/docs/examples/rtsp-options.c
@@ -22,7 +22,7 @@
*
***************************************************************************/
/* <DESC>
- * Very simple RTSP request sending OPTIONS.
+ * Simple RTSP request sending OPTIONS.
* </DESC>
*/
#include <stdio.h>
diff --git a/docs/examples/simple.c b/docs/examples/simple.c
index 29ed143..a427266 100644
--- a/docs/examples/simple.c
+++ b/docs/examples/simple.c
@@ -22,7 +22,7 @@
*
***************************************************************************/
/* <DESC>
- * Very simple HTTP GET
+ * Simple HTTP GET
* </DESC>
*/
#include <stdio.h>
diff --git a/docs/examples/simplepost.c b/docs/examples/simplepost.c
index b1175ba..824e073 100644
--- a/docs/examples/simplepost.c
+++ b/docs/examples/simplepost.c
@@ -22,7 +22,7 @@
*
***************************************************************************/
/* <DESC>
- * Very simple HTTP POST
+ * Simple HTTP POST
* </DESC>
*/
#include <stdio.h>
diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c
index 0fcffe2..0d1438e 100644
--- a/docs/examples/smooth-gtk-thread.c
+++ b/docs/examples/smooth-gtk-thread.c
@@ -133,7 +133,7 @@
pull_one_url,
NULL);
if(error)
- fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
+ fprintf(stderr, "Could not run thread number %d, errno %d\n", i, error);
else
fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
}
diff --git a/docs/examples/smtp-ssl.c b/docs/examples/smtp-ssl.c
index 5391f3e..36ecd18 100644
--- a/docs/examples/smtp-ssl.c
+++ b/docs/examples/smtp-ssl.c
@@ -116,7 +116,7 @@
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
#endif
- /* If the site you are connecting to uses a different host name that what
+ /* If the site you are connecting to uses a different hostname that what
* they have mentioned in their server certificate's commonName (or
* subjectAltName) fields, libcurl refuses to connect. You can skip this
* check, but it makes the connection insecure. */
diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c
index 5d984a6..8119113 100644
--- a/docs/examples/threaded-ssl.c
+++ b/docs/examples/threaded-ssl.c
@@ -91,7 +91,7 @@
pull_one_url,
(void *)&i);
if(error)
- fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
+ fprintf(stderr, "Could not run thread number %d, errno %d\n", i, error);
else
fprintf(stderr, "Thread %d, gets %s\n", i, urls[i]);
}
diff --git a/docs/examples/urlapi.c b/docs/examples/urlapi.c
index 82ef3e1..7afc759 100644
--- a/docs/examples/urlapi.c
+++ b/docs/examples/urlapi.c
@@ -42,7 +42,7 @@
if(res)
return (int)res;
- /* init Curl URL */
+ /* init curl URL */
urlp = curl_url();
uc = curl_url_set(urlp, CURLUPART_URL,
"http://example.com/path/index.html", 0);
diff --git a/lib/altsvc.c b/lib/altsvc.c
index d9933f2..357d3bc 100644
--- a/lib/altsvc.c
+++ b/lib/altsvc.c
@@ -559,7 +559,7 @@
}
}
else {
- /* IPv6 host name */
+ /* IPv6 hostname */
if(curlx_str_until(&p, &dsthost, MAX_IPADR_LEN, ']') ||
curlx_str_single(&p, ']')) {
infof(data, "Bad alt-svc IPv6 hostname, ignoring.");
diff --git a/lib/cf-h2-proxy.c b/lib/cf-h2-proxy.c
index d38bd46..9a8312a 100644
--- a/lib/cf-h2-proxy.c
+++ b/lib/cf-h2-proxy.c
@@ -311,7 +311,7 @@
rc = nghttp2_session_callbacks_new(&cbs);
if(rc) {
- failf(data, "Couldn't initialize nghttp2 callbacks");
+ failf(data, "Could not initialize nghttp2 callbacks");
goto out;
}
@@ -331,7 +331,7 @@
/* The nghttp2 session is not yet setup, do it */
rc = proxy_h2_client_new(cf, cbs);
if(rc) {
- failf(data, "Couldn't initialize nghttp2");
+ failf(data, "Could not initialize nghttp2");
goto out;
}
diff --git a/lib/cf-socket.c b/lib/cf-socket.c
index 555bb77..a8fa997 100644
--- a/lib/cf-socket.c
+++ b/lib/cf-socket.c
@@ -664,7 +664,7 @@
/* Do not fall back to treating it as a hostname */
char buffer[STRERROR_LEN];
data->state.os_errno = error = SOCKERRNO;
- failf(data, "Couldn't bind to interface '%s' with errno %d: %s",
+ failf(data, "Could not bind to interface '%s' with errno %d: %s",
iface, error, curlx_strerror(error, buffer, sizeof(buffer)));
return CURLE_INTERFACE_FAILED;
}
@@ -768,7 +768,7 @@
char buffer[STRERROR_LEN];
data->state.errorbuf = FALSE;
data->state.os_errno = error = SOCKERRNO;
- failf(data, "Couldn't bind to '%s' with errno %d: %s", host,
+ failf(data, "Could not bind to '%s' with errno %d: %s", host,
error, curlx_strerror(error, buffer, sizeof(buffer)));
return CURLE_INTERFACE_FAILED;
}
diff --git a/lib/cookie.c b/lib/cookie.c
index fce628c..3155c4b 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -458,7 +458,7 @@
*/
if(!co->name) {
- /* The very first name/value pair is the actual cookie name */
+ /* The first name/value pair is the actual cookie name */
if(!sep)
/* Bad name/value pair. */
return CURLE_OK;
diff --git a/lib/curl_gethostname.c b/lib/curl_gethostname.c
index c3fa864..9f2624f 100644
--- a/lib/curl_gethostname.c
+++ b/lib/curl_gethostname.c
@@ -62,7 +62,7 @@
if(strlen(force_hostname) < (size_t)namelen)
strcpy(name, force_hostname);
else
- return 1; /* can't do it */
+ return 1; /* cannot do it */
err = 0;
}
else {
diff --git a/lib/curlx/fopen.c b/lib/curlx/fopen.c
index cc164c8..9509e83 100644
--- a/lib/curlx/fopen.c
+++ b/lib/curlx/fopen.c
@@ -142,7 +142,7 @@
else if(!wcsncmp(fbuf, L"\\\\.\\", 4))
fbuf[2] = '?';
else if(!wcsncmp(fbuf, L"\\\\.", 3) || !wcsncmp(fbuf, L"\\\\?", 3)) {
- /* Unexpected, not UNC. The formatting doc doesn't allow this AFAICT. */
+ /* Unexpected, not UNC. The formatting doc does not allow this AFAICT. */
goto cleanup;
}
else {
diff --git a/lib/curlx/inet_ntop.c b/lib/curlx/inet_ntop.c
index 884cfb7..a9595d0 100644
--- a/lib/curlx/inet_ntop.c
+++ b/lib/curlx/inet_ntop.c
@@ -160,7 +160,7 @@
break;
}
else {
- /* Lower-case digits. Can't use the set from mprintf.c since this
+ /* Lower-case digits. Cannot use the set from mprintf.c since this
needs to work as a curlx function */
static const unsigned char ldigits[] = "0123456789abcdef";
diff --git a/lib/fake_addrinfo.c b/lib/fake_addrinfo.c
index 80edf78..9789d1e 100644
--- a/lib/fake_addrinfo.c
+++ b/lib/fake_addrinfo.c
@@ -180,7 +180,7 @@
curl_mfprintf(stderr, "ares_set_servers_ports_csv failed: %d", rc);
/* Cleanup */
ares_destroy(channel);
- return EAI_MEMORY; /* we can't run */
+ return EAI_MEMORY; /* we cannot run */
}
}
}
diff --git a/lib/file.c b/lib/file.c
index f45a487..5656202 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -275,7 +275,7 @@
file->fd = fd;
if(!data->state.upload && (fd == -1)) {
- failf(data, "Couldn't open file %s", data->state.up.path);
+ failf(data, "Could not open file %s", data->state.up.path);
file_done(data, CURLE_FILE_COULDNT_READ_FILE, FALSE);
return CURLE_FILE_COULDNT_READ_FILE;
}
diff --git a/lib/ftp.c b/lib/ftp.c
index ca6b949..108310b 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1867,7 +1867,7 @@
}
if(!*str) {
- failf(data, "Couldn't interpret the 227-response");
+ failf(data, "Could not interpret the 227-response");
return CURLE_FTP_WEIRD_227_FORMAT;
}
@@ -2202,7 +2202,7 @@
/* "sasserftpd" and "(u)r(x)bot ftpd" both responds with 226 after a
successful 'TYPE I'. While that is not as RFC959 says, it is still a
positive response code and we allow that. */
- failf(data, "Couldn't set desired mode");
+ failf(data, "Could not set desired mode");
return CURLE_FTP_COULDNT_SET_TYPE;
}
if(ftpcode != 200)
@@ -2392,7 +2392,7 @@
case FTP_RETR_REST:
if(ftpcode != 350) {
- failf(data, "Couldn't use REST");
+ failf(data, "Could not use REST");
result = CURLE_FTP_COULDNT_USE_REST;
}
else {
@@ -2537,7 +2537,7 @@
}
else {
if((instate == FTP_LIST) && (ftpcode == 450)) {
- /* simply no matching files in the dir listing */
+ /* simply no matching files in the directory listing */
ftp->transfer = PPTRANSFER_NONE; /* do not download anything */
ftp_state(data, ftpc, FTP_STOP); /* this phase is over */
}
@@ -3052,7 +3052,7 @@
case FTP_MKD:
if((ftpcode/100 != 2) && !ftpc->count3--) {
- /* failure to MKD the dir */
+ /* failure to MKD the directory */
failf(data, "Failed to MKD dir: %03d", ftpcode);
result = CURLE_REMOTE_ACCESS_DENIED;
}
@@ -3306,7 +3306,7 @@
}
}
if(ftpc->prevpath)
- infof(data, "Remembering we are in dir \"%s\"", ftpc->prevpath);
+ infof(data, "Remembering we are in directory \"%s\"", ftpc->prevpath);
}
/* shut down the socket to inform the server we are done */
@@ -4192,7 +4192,7 @@
ftpc->dirs[0].start = 0;
ftpc->dirs[0].len = (int)dirlen;
- ftpc->dirdepth = 1; /* we consider it to be a single dir */
+ ftpc->dirdepth = 1; /* we consider it to be a single directory */
fileName = slashPos + 1; /* rest is filename */
}
else
@@ -4208,7 +4208,7 @@
size_t dirAlloc = numof_slashes(rawPath);
if(dirAlloc >= FTP_MAX_DIR_DEPTH)
- /* suspiciously deep dir hierarchy */
+ /* suspiciously deep directory hierarchy */
return CURLE_URL_MALFORMAT;
if(dirAlloc) {
diff --git a/lib/headers.c b/lib/headers.c
index 5a57257..feb52e0 100644
--- a/lib/headers.c
+++ b/lib/headers.c
@@ -51,7 +51,7 @@
h->index = index;
/* this will randomly OR a reserved bit for the sole purpose of making it
impossible for applications to do == comparisons, as that would otherwise
- be very tempting and then lead to the reserved bits not being reserved
+ be tempting and then lead to the reserved bits not being reserved
anymore. */
h->origin = (unsigned int)(hs->type | (1 << 27));
h->anchor = e;
diff --git a/lib/hostip.c b/lib/hostip.c
index ef000aa..ce79e5f 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -956,7 +956,7 @@
/* we got a response, create a dns entry, add to cache, return */
dns = Curl_dnscache_mk_entry(data, addr, hostname, 0, port, FALSE);
if(!dns || Curl_dnscache_add(data, dns)) {
- /* this is OOM or similar, don't store such negative resolves */
+ /* this is OOM or similar, do not store such negative resolves */
keep_negative = FALSE;
goto error;
}
@@ -1393,7 +1393,7 @@
error = FALSE;
err:
if(error) {
- failf(data, "Couldn't parse CURLOPT_RESOLVE entry '%s'",
+ failf(data, "Could not parse CURLOPT_RESOLVE entry '%s'",
hostp->data);
Curl_freeaddrinfo(head);
return CURLE_SETOPT_OPTION_SYNTAX;
diff --git a/lib/hsts.c b/lib/hsts.c
index 4e41155..437851b 100644
--- a/lib/hsts.c
+++ b/lib/hsts.c
@@ -277,7 +277,7 @@
blen = ntail;
}
}
- /* avoid curl_strequal because the host name is not null-terminated */
+ /* avoid curl_strequal because the hostname is not null-terminated */
if((hlen == ntail) && curl_strnequal(hostname, sts->host, hlen))
return sts;
}
diff --git a/lib/http.c b/lib/http.c
index f3444d4..7458d8b 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -504,7 +504,7 @@
return CURLE_OK;
if(abort_upload) {
- /* We'd like to abort the upload - but should we? */
+ /* We would like to abort the upload - but should we? */
#ifdef USE_NTLM
if((data->state.authproxy.picked == CURLAUTH_NTLM) ||
(data->state.authhost.picked == CURLAUTH_NTLM)) {
@@ -1716,7 +1716,7 @@
curlx_str_untilnl(&p, &val, MAX_HTTP_RESP_HEADER_SIZE);
curlx_str_trimblanks(&val);
if(!curlx_strlen(&val))
- /* no content, don't send this */
+ /* no content, do not send this */
continue;
}
else
@@ -2404,7 +2404,7 @@
(data->req.authneg ||
!Curl_checkheaders(data, STRCONST("Content-Length")))) {
/* we allow replacing this header if not during auth negotiation,
- although it is not very wise to actually set your own */
+ although it is not wise to actually set your own */
result = curlx_dyn_addf(r, "Content-Length: %" FMT_OFF_T "\r\n",
req_clen);
}
@@ -4018,7 +4018,7 @@
*
* The check for close above is done simply because of something
* else has already deemed the connection to get closed then
- * something else should've considered the big picture and we
+ * something else should have considered the big picture and we
* avoid this check.
*
*/
@@ -4187,7 +4187,7 @@
k->httpcode = (p[0] - '0') * 100 + (p[1] - '0') * 10 +
(p[2] - '0');
/* RFC 9112 requires a single space following the status code,
- but the browsers don't so let's not insist */
+ but the browsers do not so let's not insist */
fine_statusline = TRUE;
}
}
diff --git a/lib/http2.c b/lib/http2.c
index 68446d5..2e1e5bd 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -506,7 +506,7 @@
rc = nghttp2_session_callbacks_new(&cbs);
if(rc) {
- failf(data, "Couldn't initialize nghttp2 callbacks");
+ failf(data, "Could not initialize nghttp2 callbacks");
goto out;
}
@@ -530,7 +530,7 @@
/* The nghttp2 session is not yet setup, do it */
rc = h2_client_new(cf, cbs);
if(rc) {
- failf(data, "Couldn't initialize nghttp2");
+ failf(data, "Could not initialize nghttp2");
goto out;
}
ctx->max_concurrent_streams = DEFAULT_MAX_CONCURRENT_STREAMS;
@@ -972,7 +972,7 @@
rv = set_transfer_url(newhandle, &heads);
if(rv) {
- CURL_TRC_CF(data, cf, "[%d] PUSH_PROMISE, failed to set url -> %d",
+ CURL_TRC_CF(data, cf, "[%d] PUSH_PROMISE, failed to set URL -> %d",
frame->promised_stream_id, rv);
discard_newhandle(cf, newhandle);
rv = CURL_PUSH_DENY;
diff --git a/lib/multi.c b/lib/multi.c
index a473364..c52ee54 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -1038,7 +1038,7 @@
case MSTATE_RESOLVING:
result = Curl_resolv_pollset(data, ps);
- /* connection filters are not involved in this phase. It's ok if we get no
+ /* connection filters are not involved in this phase. It is OK if we get no
* sockets to wait for. Resolving can wake up from other sources. */
expect_sockets = FALSE;
break;
diff --git a/lib/multi_ev.c b/lib/multi_ev.c
index ff755ca..f5000a4 100644
--- a/lib/multi_ev.c
+++ b/lib/multi_ev.c
@@ -340,7 +340,7 @@
/* What was the previous action the transfer had regarding this socket?
* If the transfer is new to the socket, disregard the information
* in `last_poll`, because the socket might have been destroyed and
- * reopened. We'd have cleared the sh_entry for that, but the socket
+ * reopened. We would have cleared the sh_entry for that, but the socket
* might still be mentioned in the hashed pollsets. */
last_action = 0;
if(first_time) {
diff --git a/lib/pop3.c b/lib/pop3.c
index affd642..d469dc0 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -1742,9 +1742,8 @@
/* Did we have a partial match which has subsequently failed? */
if(prev && prev >= pop3c->eob) {
- /* Strip can only be non-zero for the very first mismatch after CRLF
- and then both prev and strip are equal and nothing will be output
- below */
+ /* Strip can only be non-zero for the first mismatch after CRLF and
+ then both prev and strip are equal and nothing will be output below */
while(prev && pop3c->strip) {
prev--;
pop3c->strip--;
diff --git a/lib/progress.c b/lib/progress.c
index 0284154..228f5dc 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -280,7 +280,7 @@
should_ms = (timediff_t) (1000 * bytes / bytes_per_sec);
}
else {
- /* very large `bytes`, first calc the seconds it should have taken.
+ /* large `bytes`, first calc the seconds it should have taken.
* if that is small enough, convert to milliseconds. */
should_ms = (timediff_t) (bytes / bytes_per_sec);
if(should_ms < TIMEDIFF_T_MAX/1000)
diff --git a/lib/socks.c b/lib/socks.c
index 5185913..3434030 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -308,7 +308,7 @@
return CURLPX_SEND_REQUEST;
}
else {
- /* empty user name */
+ /* empty username */
unsigned char b = 0;
result = Curl_bufq_write(&sx->iobuf, &b, 1, &nwritten);
if(result || (nwritten != 1))
diff --git a/lib/speedcheck.c b/lib/speedcheck.c
index 3b12865..aede060 100644
--- a/lib/speedcheck.c
+++ b/lib/speedcheck.c
@@ -49,7 +49,7 @@
if((data->progress.current_speed >= 0) && data->set.low_speed_time) {
if(data->progress.current_speed < data->set.low_speed_limit) {
if(!data->state.keeps_speed.tv_sec)
- /* under the limit at this very moment */
+ /* under the limit at this moment */
data->state.keeps_speed = now;
else {
/* how long has it been under the limit */
diff --git a/lib/url.c b/lib/url.c
index 0a0b6ff..cf34514 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1283,7 +1283,7 @@
return TRUE;
}
else if(match->seen_single_use_conn && !match->seen_multiplex_conn) {
- /* We've seen a single-use, existing connection to the destination and
+ /* We have seen a single-use, existing connection to the destination and
* no multiplexed one. It seems safe to assume that the server does
* not support multiplexing. */
match->wait_pipe = FALSE;
@@ -2740,7 +2740,7 @@
data->set.str[STRING_NETRC_FILE]);
if(ret && ((ret == NETRC_NO_MATCH) ||
(data->set.use_netrc == CURL_NETRC_OPTIONAL))) {
- infof(data, "Couldn't find host %s in the %s file; using defaults",
+ infof(data, "Could not find host %s in the %s file; using defaults",
conn->host.name,
(data->set.str[STRING_NETRC_FILE] ?
data->set.str[STRING_NETRC_FILE] : ".netrc"));
@@ -2752,7 +2752,7 @@
}
else {
if(!(conn->handler->flags&PROTOPT_USERPWDCTRL)) {
- /* if the protocol can't handle control codes in credentials, make
+ /* if the protocol cannot handle control codes in credentials, make
sure there are none */
if(str_has_ctrl(*userp) || str_has_ctrl(*passwdp)) {
failf(data, "control code detected in .netrc credentials");
diff --git a/lib/urlapi.c b/lib/urlapi.c
index 73f476e..a3d9efd 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -1940,7 +1940,7 @@
if(!n)
bad = TRUE; /* empty hostname is not okay */
else if(!urlencode) {
- /* if the host name part was not URL encoded here, it was set ready
+ /* if the hostname part was not URL encoded here, it was set ready
URL encoded so we need to decode it to check */
size_t dlen;
char *decoded = NULL;
diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c
index a8d4ffe..c1c0ab2 100644
--- a/lib/vauth/digest.c
+++ b/lib/vauth/digest.c
@@ -216,7 +216,7 @@
if(curlx_str_cmp(&name, key)) {
/* if this is our key, return the value */
if(curlx_strlen(&data) >= buflen)
- /* doesn't fit */
+ /* does not fit */
return FALSE;
memcpy(buf, curlx_str(&data), curlx_strlen(&data));
buf[curlx_strlen(&data)] = 0;
diff --git a/lib/vquic/curl_osslq.c b/lib/vquic/curl_osslq.c
index 145a283..75dc5cc 100644
--- a/lib/vquic/curl_osslq.c
+++ b/lib/vquic/curl_osslq.c
@@ -781,7 +781,7 @@
if(nwritten < memlen) {
/* This MUST not happen. Our recbuf is dimensioned to hold the
- * full max_stream_window and then some for this very reason. */
+ * full max_stream_window and then some for this reason. */
DEBUGASSERT(0);
return CURLE_RECV_ERROR;
}
diff --git a/lib/vquic/curl_quiche.c b/lib/vquic/curl_quiche.c
index d8d063b..ff3e76b 100644
--- a/lib/vquic/curl_quiche.c
+++ b/lib/vquic/curl_quiche.c
@@ -342,7 +342,7 @@
if(nwritten < memlen) {
/* This MUST not happen. Our recbuf is dimensioned to hold the
- * full max_stream_window and then some for this very reason. */
+ * full max_stream_window and then some for this reason. */
DEBUGASSERT(0);
return CURLE_RECV_ERROR;
}
diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c
index 74a1da5..8653c49 100644
--- a/lib/vssh/libssh.c
+++ b/lib/vssh/libssh.c
@@ -1574,8 +1574,8 @@
Curl_debug(data, CURLINFO_HEADER_OUT, "PWD\n", 4);
Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp));
- /* this sends an FTP-like "header" to the header callback so that the
- current directory can be read very similar to how it is read when
+ /* this sends an FTP-like "header" to the header callback so that
+ the current directory can be read similar to how it is read when
using ordinary FTP. */
result = Curl_client_write(data, CLIENTWRITE_HEADER, tmp, strlen(tmp));
free(tmp);
@@ -1860,7 +1860,7 @@
return SSH_NO_ERROR;
}
if(date > UINT_MAX)
- /* because the liubssh API can't deal with a larger value */
+ /* because the liubssh API cannot deal with a larger value */
date = UINT_MAX;
if(!strncmp(cmd, "atime", 5))
sshc->quote_attrs->atime = (uint32_t)date;
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
index 4904466..f5cb5f9 100644
--- a/lib/vssh/libssh2.c
+++ b/lib/vssh/libssh2.c
@@ -878,8 +878,8 @@
Curl_debug(data, CURLINFO_HEADER_OUT, "PWD\n", 4);
Curl_debug(data, CURLINFO_HEADER_IN, tmp, strlen(tmp));
- /* this sends an FTP-like "header" to the header callback so that the
- current directory can be read very similar to how it is read when
+ /* this sends an FTP-like "header" to the header callback so that
+ the current directory can be read similar to how it is read when
using ordinary FTP. */
result = Curl_client_write(data, CLIENTWRITE_HEADER, tmp, strlen(tmp));
free(tmp);
diff --git a/lib/vtls/apple.c b/lib/vtls/apple.c
index 87d5208..297ebc3 100644
--- a/lib/vtls/apple.c
+++ b/lib/vtls/apple.c
@@ -148,7 +148,7 @@
* add `kSecRevocationRequirePositiveResponse` to the Apple
* Trust policies, it interprets this as it NEEDs a confirmation
* of a cert being NOT REVOKED. Which not in general available for
- * certificates on the internet.
+ * certificates on the Internet.
* It seems that applications using this policy are expected to PIN
* their certificate public keys or verification will fail.
* This does not seem to be what we want here. */
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 533597e..f7a5727 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -1688,7 +1688,7 @@
failf(data,
"could not load PEM client certificate from %s, " OSSL_PACKAGE
" error %s, "
- "(no key found, wrong pass phrase, or wrong file format?)",
+ "(no key found, wrong passphrase, or wrong file format?)",
(cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
ossl_strerror(ERR_get_error(), error_buffer,
sizeof(error_buffer)) );
@@ -1708,7 +1708,7 @@
failf(data,
"could not load ASN1 client certificate from %s, " OSSL_PACKAGE
" error %s, "
- "(no key found, wrong pass phrase, or wrong file format?)",
+ "(no key found, wrong passphrase, or wrong file format?)",
(cert_blob ? "CURLOPT_SSLCERT_BLOB" : cert_file),
ossl_strerror(ERR_get_error(), error_buffer,
sizeof(error_buffer)) );
@@ -5154,7 +5154,7 @@
#endif
if(data->set.ssl.certinfo && !octx->reused_session) {
- /* asked to gather certificate info. Reused sessions don't have cert
+ /* asked to gather certificate info. Reused sessions do not have cert
chains */
result = ossl_certchain(data, octx->ssl);
if(result)
@@ -5684,7 +5684,7 @@
cert = SSL_get1_peer_certificate(octx->ssl);
if(!cert)
- /* No server certificate, don't do channel binding */
+ /* No server certificate, do not do channel binding */
return CURLE_OK;
if(!OBJ_find_sigid_algs(X509_get_signature_nid(cert), &algo_nid, NULL)) {
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index 137e525..f2a907c 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -1286,7 +1286,7 @@
/* The socket must be writeable (or a poll error occurred) before we call
InitializeSecurityContext to continue processing the received TLS
- records. This is because that function is not idempotent and we don't
+ records. This is because that function is not idempotent and we do not
support partial save/resume sending replies of handshake tokens. */
if(!SOCKET_WRITABLE(Curl_conn_cf_get_socket(cf, data), 0)) {
SCH_DEV(infof(data, "schannel: handshake waiting for writeable socket"));
@@ -1809,7 +1809,7 @@
* data needs to be sent then we block for a writeable socket that should
* be writeable immediately except for OS resource constraints. For caller
* send if handshake data needs to be received then we block for a readable
- * socket, which could take some time, but it's more likely the user has
+ * socket, which could take some time, but it is more likely the user has
* called recv since they had called it prior (only recv can start
* renegotiation and probably the user is going to call it again to get
* more of their data before calling send).
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index 918a468..ed0af3d 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -1423,7 +1423,7 @@
result = ssl_cf_set_earlydata(cf, data, buf, blen);
if(result)
return result;
- /* we buffered any early data we'd like to send. Actually
+ /* we buffered any early data we would like to send. Actually
* do the connect now which sends it and performs the handshake. */
connssl->earlydata_state = ssl_earlydata_sending;
connssl->earlydata_skip = Curl_bufq_len(&connssl->earlydata);
diff --git a/lib/vtls/wolfssl.c b/lib/vtls/wolfssl.c
index a7883fe..7b567fd 100644
--- a/lib/vtls/wolfssl.c
+++ b/lib/vtls/wolfssl.c
@@ -1725,7 +1725,7 @@
if(ret == WOLFSSL_SUCCESS &&
conn_config->verifyhost &&
!connssl->peer.sni) {
- /* we have an IP address as host name. */
+ /* we have an IP address as hostname. */
WOLFSSL_X509* cert = wolfSSL_get_peer_certificate(wssl->ssl);
if(!cert) {
failf(data, "unable to get peer certificate");
diff --git a/lib/ws.c b/lib/ws.c
index 96a0d61..5a61c65 100644
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -1037,7 +1037,7 @@
* that needs to be encoded into the buffer */
if(buflen < ws->sendbuf_payload) {
/* We have been called with LESS buffer data than before. This
- * is not how it's supposed too work. */
+ * is not how it is supposed too work. */
failf(data, "[WS] curl_ws_send() called with smaller 'buflen' than "
"bytes already buffered in previous call, %zu vs %zu",
buflen, ws->sendbuf_payload);
diff --git a/src/config2setopts.c b/src/config2setopts.c
index 7d09960..1543192 100644
--- a/src/config2setopts.c
+++ b/src/config2setopts.c
@@ -212,11 +212,11 @@
config->knownhosts = known;
}
else if(!config->hostpubmd5 && !config->hostpubsha256) {
- errorf("Couldn't find a known_hosts file");
+ errorf("Could not find a known_hosts file");
return CURLE_FAILED_INIT;
}
else
- warnf("Couldn't find a known_hosts file");
+ warnf("Could not find a known_hosts file");
}
return CURLE_OK; /* ignore if SHA256 did not work */
}
diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c
index a4c475b..6c11904 100644
--- a/src/tool_cb_rea.c
+++ b/src/tool_cb_rea.c
@@ -60,7 +60,7 @@
struct timeval timeout;
if(fd >= FD_SETSIZE)
- /* can't wait! */
+ /* cannot wait! */
return FALSE;
/* wait this long at the most */
diff --git a/src/tool_cb_see.c b/src/tool_cb_see.c
index 68899c5..292da1c 100644
--- a/src/tool_cb_see.c
+++ b/src/tool_cb_see.c
@@ -55,8 +55,8 @@
if(offset > OUR_MAX_SEEK_O) {
/* Some precaution code to work around problems with different data sizes
- to allow seeking >32-bit even if off_t is 32-bit. Should be very rare
- and is really valid on weirdo-systems. */
+ to allow seeking >32-bit even if off_t is 32-bit. Should be rare and
+ is really valid on weirdo-systems. */
curl_off_t left = offset;
if(whence != SEEK_SET)
diff --git a/src/tool_doswin.c b/src/tool_doswin.c
index 8e9e5f0..2b19a16 100644
--- a/src/tool_doswin.c
+++ b/src/tool_doswin.c
@@ -874,7 +874,7 @@
break;
}
- /* Start up the thread. We don't bother keeping a reference to it
+ /* Start up the thread. We do not bother keeping a reference to it
because it runs until program termination. From here on out all reads
from the stdin handle or file descriptor 0 will be reading from the
socket that is fed by the thread. */
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index b74b738..bd90da1 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -1213,7 +1213,7 @@
file = curlx_fopen(nextarg, FOPEN_READTEXT);
}
if(!file) {
- warnf("Couldn't read file \"%s\" "
+ warnf("Could not read file \"%s\" "
"specified for \"--ech ecl:\" option",
nextarg);
return PARAM_BAD_USE; /* */
@@ -2084,7 +2084,7 @@
config->doh_insecure_ok = toggle;
break;
case C_LIST_ONLY: /* --list-only */
- config->dirlistonly = toggle; /* only list the names of the FTP dir */
+ config->dirlistonly = toggle; /* only list names of the FTP directory */
break;
case C_MANUAL: /* --manual */
if(toggle) /* --no-manual shows no manual... */
@@ -2876,7 +2876,7 @@
/* is there an '=' ? */
if(!curlx_str_until(&p, &out, MAX_OPTION_LEN, '=') &&
!curlx_str_single(&p, '=') ) {
- /* there's an equal sign */
+ /* there is an equal sign */
char tempword[MAX_OPTION_LEN + 1];
memcpy(tempword, curlx_str(&out), curlx_strlen(&out));
tempword[curlx_strlen(&out)] = 0;
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 1317e73..b7c8805 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -2252,7 +2252,7 @@
strcmp(first_arg, "--disable"))) {
parseconfig(NULL, CONFIG_MAX_LEVELS); /* ignore possible failure */
- /* If we had no arguments then make sure a url was specified in .curlrc */
+ /* If we had no arguments then make sure a URL was specified in .curlrc */
if((argc < 2) && (!global->first->url_list)) {
helpf(NULL);
result = CURLE_FAILED_INIT;
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c
index d25fccf..e17955b 100644
--- a/src/tool_operhlp.c
+++ b/src/tool_operhlp.c
@@ -211,7 +211,7 @@
else {
/* no slash => empty string, use default */
*filename = strdup("curl_response");
- warnf("No remote file name, uses \"%s\"", *filename);
+ warnf("No remote filename, uses \"%s\"", *filename);
}
curl_free(path);
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 008f0fc..2e7b98f 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -135,7 +135,7 @@
offset = starto;
}
else
- /* we can't seek stdin, read 'starto' bytes and throw them away */
+ /* we cannot seek stdin, read 'starto' bytes and throw them away */
throwaway = starto;
}
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index 03f9930..46096d5 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -103,7 +103,7 @@
#if defined(_WIN32) && !defined(UNDER_CE)
else {
char *fullp;
- /* check for .curlrc then _curlrc in the dir of the executable */
+ /* check for .curlrc then _curlrc in the directory of the executable */
file = tool_execpath(".curlrc", &fullp);
if(!file)
file = tool_execpath("_curlrc", &fullp);