]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
badwords: check indented lines in source code, fix fallouts
authorViktor Szakats <commit@vsz.me>
Fri, 14 Nov 2025 16:55:33 +0000 (17:55 +0100)
committerViktor Szakats <commit@vsz.me>
Sat, 15 Nov 2025 12:25:02 +0000 (13:25 +0100)
- 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

73 files changed:
.github/scripts/badwords.pl
.github/scripts/badwords.txt
.github/workflows/checksrc.yml
docs/examples/anyauthput.c
docs/examples/connect-to.c
docs/examples/cookie_interface.c
docs/examples/debug.c
docs/examples/ephiperfifo.c
docs/examples/ftpupload.c
docs/examples/htmltidy.c
docs/examples/htmltitle.cpp
docs/examples/http2-download.c
docs/examples/http2-serverpush.c
docs/examples/http2-upload.c
docs/examples/http3.c
docs/examples/https.c
docs/examples/imap-ssl.c
docs/examples/log_failed_transfers.c
docs/examples/multi-debugcallback.c
docs/examples/multi-formadd.c
docs/examples/multithread.c
docs/examples/parseurl.c
docs/examples/pop3-ssl.c
docs/examples/rtsp-options.c
docs/examples/simple.c
docs/examples/simplepost.c
docs/examples/smooth-gtk-thread.c
docs/examples/smtp-ssl.c
docs/examples/threaded-ssl.c
docs/examples/urlapi.c
lib/altsvc.c
lib/cf-h2-proxy.c
lib/cf-socket.c
lib/cookie.c
lib/curl_gethostname.c
lib/curlx/fopen.c
lib/curlx/inet_ntop.c
lib/fake_addrinfo.c
lib/file.c
lib/ftp.c
lib/headers.c
lib/hostip.c
lib/hsts.c
lib/http.c
lib/http2.c
lib/multi.c
lib/multi_ev.c
lib/pop3.c
lib/progress.c
lib/socks.c
lib/speedcheck.c
lib/url.c
lib/urlapi.c
lib/vauth/digest.c
lib/vquic/curl_osslq.c
lib/vquic/curl_quiche.c
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vtls/apple.c
lib/vtls/openssl.c
lib/vtls/schannel.c
lib/vtls/vtls.c
lib/vtls/wolfssl.c
lib/ws.c
src/config2setopts.c
src/tool_cb_rea.c
src/tool_cb_see.c
src/tool_doswin.c
src/tool_getparam.c
src/tool_operate.c
src/tool_operhlp.c
src/tool_paramhlp.c
src/tool_parsecfg.c

index e119617d0a9a70120a502e6e1bef7c93001bf56a..014468c6f99c049ac4c461cd4d688b17a619b879 100755 (executable)
@@ -20,7 +20,12 @@ use warnings;
 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 @@ sub file {
         my $in = $_;
         $l++;
         chomp $in;
-        if($in =~ /^    /) {
+        if($skip_indented && $in =~ /^    /) {
             next;
         }
         # remove the link part
index 705c54fbac9136c2cbe10e537c3149739c7c083f..d24d97faac6a4ceb8db018c1c88f248aa4e09d8b 100644 (file)
@@ -10,59 +10,56 @@ tool chain:toolchain
 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
index 663811ef935d6072485f1f39d923ac669546a493..9ed049c13fd554431de000154d7a5e898b466149 100644 (file)
@@ -174,6 +174,7 @@ jobs:
       - 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
index c905b8b459771ac3b71e9b0e90e598658b7fb62e..b13593a0414b89a0e4623b9c589a47a8ee4b4843 100644 (file)
@@ -152,7 +152,7 @@ int main(int argc, char **argv)
        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! */
index 253c531c420d69f07897d40621d267a24bc69ccd..b2848772d81db5f382b30be4da34eece5573e8c8 100644 (file)
@@ -40,7 +40,7 @@ int main(void)
   /*
     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 @@ int main(void)
     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);
index cebbd3cdcff034606d626f60743a55678e864bf6..4eee1a605d83ea0bc994df5f1a155f1c57e12a92 100644 (file)
@@ -47,7 +47,7 @@ static int print_cookies(CURL *curl)
   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 @@ main(void)
     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 @@ main(void)
              "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 @@ main(void)
       "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 @@ main(void)
 
     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;
   }
 
index ff522b0ce1ecbb2f6b4264ddfcb916157f78eee1..5df7aae90f751cdf6c03fba9ed03dd5d29a13d30 100644 (file)
@@ -69,7 +69,7 @@ static void dump(const char *text, FILE *stream, unsigned char *ptr,
       }
       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);
index 026967f3eca589f3bc2c6db09ed185d9bf3afdc6..b47cbbedbfb1cde0b8d8bc1ec36ee1e0777809fb 100644 (file)
@@ -133,7 +133,7 @@ static void mcode_or_die(const char *where, CURLMcode code)
 
 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 @@ static void timer_cb(struct GlobalInfo *g, int revents)
   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. */
index 0df41005f5c3d4cb23f27958569017ef5cceea81..26db7f595301f7e2ebca08ed185c9054bef194cd 100644 (file)
@@ -90,7 +90,7 @@ int main(void)
   /* 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;
   }
 
index 0bf3155570ced06e8fc0ad724ea7c901e55a70e9..97eff2b45acc587f90332b12a538767b3e554843 100644 (file)
@@ -50,7 +50,7 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent)
   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 @@ void dumpNode(TidyDoc doc, TidyNode tnod, int indent)
       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);
index 2251a215e8a514cc5111851f725470af63d94a4e..cdbf0afa08eb2a1759780e7f62a71c9be5641caa 100644 (file)
@@ -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
index efc74721537185102b9d13863ecf8557cda9a2cd..ca61a92d916f03277ae17e78b7e1cbe5c6037328 100644 (file)
@@ -90,7 +90,7 @@ static void dump(const char *text, int num, unsigned char *ptr,
       }
       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);
index d501f2419940ba5bf365718ba21487f74e75e094..8c43075b937d767ee0d932e681ebf7e1846cd645 100644 (file)
@@ -78,7 +78,7 @@ static void dump(const char *text, unsigned char *ptr, size_t size, char nohex)
       }
       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);
index 2bff0d050602e8fc7dfac9ffc09d59eadbd30f60..7ba150e91af5a11a1cbffc93f76e83e5a9a60323 100644 (file)
@@ -128,7 +128,7 @@ static void dump(const char *text, int num, unsigned char *ptr,
       }
       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 @@ int main(int argc, char **argv)
       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
index 323f6d7d17b64f3eca76b620a4bba3a6877babf9..217974f93cac9b0859f5fc890cebe04360495790 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 /* <DESC>
- * Very simple HTTP/3 GET
+ * Simple HTTP/3 GET
  * </DESC>
  */
 #include <stdio.h>
index 23729afcaa02f1ae5dfe65b76a44f88d34a73109..1f7f5e1fbb31a603f358131861b38a8dd71848bb 100644 (file)
@@ -56,7 +56,7 @@ int main(void)
 
 #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.
index 59edd130e526a8490f866fb672da7b287ff35654..6eb49ae9780b2ce0cb5d6e1bfa42e06b9960ecee 100644 (file)
@@ -68,7 +68,7 @@ int main(void)
     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. */
index c9c0009763acc7c499202a1be8e21c508ae38eac..350d41affaa6944f82df0bd3bf6214f36302f94f 100644 (file)
@@ -140,8 +140,8 @@ static int mem_addf(struct mem *mem, const char *format, ...)
   /* 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;
index 758cfca1de9dce3794e99f3dc81c1f40d4f50382..d838feed407552b89882b41d007d70d814f59273 100644 (file)
@@ -71,7 +71,7 @@ static void dump(const char *text, FILE *stream, unsigned char *ptr,
       }
       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);
index 7a1b9eb95dec30447b299220655f9e357ec306f3..068412827ae7aee29f1682db536e7b56d09799ce 100644 (file)
@@ -51,7 +51,7 @@ int main(void)
 
   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",
index 3ecca259082053039936427e0925356935fc8e6e..535788e394bc64d37a78da8b83d7de551b5685d5 100644 (file)
@@ -97,7 +97,7 @@ int main(void)
                            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]);
   }
index 8675adc623837bd30a8815b4709364c9fa2d8b3f..1514a798237f83cd1f5704ad0ed478ff1823f0b1 100644 (file)
@@ -51,7 +51,7 @@ int main(void)
   /* 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);
   }
 
index 63a9edca70d6b5a3fb67d1bd526e4347ebc9f86b..1be48adc82923872c39d206134f0ce5fae192f6b 100644 (file)
@@ -67,7 +67,7 @@ int main(void)
     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. */
index 50d5e2f27ee074aeaf9c513256db88f107e0887d..8c160f6b76dc8770aea77df720298bf40f5169f1 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 /* <DESC>
- * Very simple RTSP request sending OPTIONS.
+ * Simple RTSP request sending OPTIONS.
  * </DESC>
  */
 #include <stdio.h>
index 29ed14313edaf378e84ceb0641f4ba2ecbf2de20..a427266fd40666a25fd7be1096cd020f0dcab96e 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 /* <DESC>
- * Very simple HTTP GET
+ * Simple HTTP GET
  * </DESC>
  */
 #include <stdio.h>
index b1175ba924a43598cf155cb8704546446c7c9189..824e073e2a120f503b54971f62d7eade1bc242cc 100644 (file)
@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 /* <DESC>
- * Very simple HTTP POST
+ * Simple HTTP POST
  * </DESC>
  */
 #include <stdio.h>
index 0fcffe250188568eaeefda04358b745d2a5359e1..0d1438e7d77346a99af80ccad8f8d99d68449ada 100644 (file)
@@ -133,7 +133,7 @@ void *create_thread(void *progress_bar)
                                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]);
   }
index 5391f3e2229786ee19c6136cef5f61bb5713e54d..36ecd18d74491d4b344af1226b63da9cbc4f468e 100644 (file)
@@ -116,7 +116,7 @@ int main(void)
     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. */
index 5d984a670ab98dbfc4503831e030aa96bac755b1..8119113695ea374d8fb2f2cf2d5fcd3f2c080b14 100644 (file)
@@ -91,7 +91,7 @@ int main(int argc, char **argv)
                                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]);
   }
index 82ef3e19aab93376bfc77947027c3c0db2352ee4..7afc759fa1e4a4998e83afaa426bd7a47ef89d1b 100644 (file)
@@ -42,7 +42,7 @@ int main(void)
   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);
index d9933f2298020f6b190f3462a855700987618bd8..357d3bc2090a78b8277bc70f1a342e64bc2f0a7f 100644 (file)
@@ -559,7 +559,7 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data,
             }
           }
           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.");
index d38bd4695254db25a3f2385b95af7f08adb6fdbf..9a8312a04268c8d8621560c8ea70a344bee63f1b 100644 (file)
@@ -311,7 +311,7 @@ static CURLcode cf_h2_proxy_ctx_init(struct Curl_cfilter *cf,
 
   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 @@ static CURLcode cf_h2_proxy_ctx_init(struct Curl_cfilter *cf,
   /* 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;
   }
 
index 555bb77903ca979c0a6096a293b8726c99de6c2c..a8fa997de025a0cd475bb8581f596004ef0436a9 100644 (file)
@@ -664,7 +664,7 @@ static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
           /* 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 @@ static CURLcode bindlocal(struct Curl_easy *data, struct connectdata *conn,
       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;
     }
index fce628cb9754e15291cb582a10d11b6cc05fb9da..3155c4b3e42bd205a0fbbbd177f2727dc74ed99e 100644 (file)
@@ -458,7 +458,7 @@ parse_cookie_header(struct Curl_easy *data,
        */
 
       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;
index c3fa864effca9fddf2addc61318141aa266eaf4c..9f2624ff051d261c8bd7332f2ed6e9863f0acffb 100644 (file)
@@ -62,7 +62,7 @@ int Curl_gethostname(char * const name, GETHOSTNAME_TYPE_ARG2 namelen)
     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 {
index cc164c8c29b4dd62a8fe0bf292af791a0ec825cc..9509e83148807f9729f18b7744e8674d9ea404f8 100644 (file)
@@ -142,7 +142,7 @@ static bool fix_excessive_path(const TCHAR *in, TCHAR **out)
   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 {
index 884cfb79c2d8e00598c440a0a8dce5cef9f0fdd2..a9595d0c2f25edaa1715d881468588419fed8b49 100644 (file)
@@ -160,7 +160,7 @@ static char *inet_ntop6(const unsigned char *src, char *dst, size_t size)
       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";
 
index 80edf78648577de3d00fe7b7b6b6047e42bbbcfe..9789d1ef62bd2a1483d87ec6aabfa472b00772de 100644 (file)
@@ -180,7 +180,7 @@ int r_getaddrinfo(const char *node,
         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 */
       }
     }
   }
index f45a487c90f334fc0f36e26f440757bae2b4f77e..565620283403f55bcec22f969281085582495f4d 100644 (file)
@@ -275,7 +275,7 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done)
 
   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;
   }
index ca6b9497b23a57aa17482fa4fe9c9eada84bf37c..108310bf301bd21937f5604b5bde4e98fc61896f 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1867,7 +1867,7 @@ static CURLcode ftp_state_pasv_resp(struct Curl_easy *data,
     }
 
     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 @@ static CURLcode ftp_state_type_resp(struct Curl_easy *data,
     /* "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 @@ static CURLcode ftp_state_rest_resp(struct Curl_easy *data,
 
   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 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data,
   }
   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 @@ static CURLcode ftp_pp_statemachine(struct Curl_easy *data,
 
   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 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status,
       }
     }
     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 @@ CURLcode ftp_parse_url_path(struct Curl_easy *data,
 
         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 @@ CURLcode ftp_parse_url_path(struct Curl_easy *data,
       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) {
index 5a5725711317c3fb6d549f3bc6a5338ea5915e8d..feb52e087de8b574c34256412805b97967ad3e44 100644 (file)
@@ -51,7 +51,7 @@ static void copy_header_external(struct Curl_header_store *hs,
   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;
index ef000aab69303bf8c7df01c8415337f3053140fb..ce79e5fc4b4ea44e5e11e7a89e5bf312d4580096 100644 (file)
@@ -956,7 +956,7 @@ out:
     /* 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 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data)
       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;
index 4e41155f300632615a9c6b9893ce106779552567..437851b8baeebeba3b88c09a207d00f4a920cedb 100644 (file)
@@ -277,7 +277,7 @@ struct stsentry *Curl_hsts(struct hsts *h, const char *hostname,
           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;
     }
index f3444d46a91f34ac63c132d06898166f70b0f038..7458d8b6400b5a653b32be936152a747545a5b68 100644 (file)
@@ -504,7 +504,7 @@ static CURLcode http_perhapsrewind(struct Curl_easy *data,
     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 @@ CURLcode Curl_add_custom_headers(struct Curl_easy *data,
           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 @@ static CURLcode http_add_content_hds(struct Curl_easy *data,
        (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 @@ static CURLcode http_on_response(struct Curl_easy *data,
        *
        * 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 @@ static CURLcode http_rw_hd(struct Curl_easy *data,
                 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;
               }
             }
index 68446d5177afa6b01a7b2ba1de9c8b99f0ae756b..2e1e5bd07e560b303b682ed2ef1b471f82037867 100644 (file)
@@ -506,7 +506,7 @@ static CURLcode cf_h2_ctx_open(struct Curl_cfilter *cf,
 
   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 @@ static CURLcode cf_h2_ctx_open(struct Curl_cfilter *cf,
   /* 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 @@ static int push_promise(struct Curl_cfilter *cf,
 
     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;
index a47336457b80d086456185064e5cadd9509fd818..c52ee54c77232b330c462dec6a08e5764d426d3d 100644 (file)
@@ -1038,7 +1038,7 @@ CURLMcode Curl_multi_pollset(struct Curl_easy *data,
 
   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;
index ff755caa6aa383f2a49c5e01810a7d83edc3cfbd..f5000a4562450ade7c0fde7ecd7a91624b235ea3 100644 (file)
@@ -340,7 +340,7 @@ static CURLMcode mev_pollset_diff(struct Curl_multi *multi,
     /* 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) {
index affd64276cd8697860add6321b548c675f60c40a..d469dc07660d7641e63393afa0898521be756640 100644 (file)
@@ -1742,9 +1742,8 @@ static CURLcode pop3_write(struct Curl_easy *data, const char *str,
 
     /* 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--;
index 02841544dd7a427dd5f4ed1a4aa4531c287d8868..228f5dc197379442f5550b904e80dc99ff257c4b 100644 (file)
@@ -280,7 +280,7 @@ timediff_t Curl_pgrsLimitWaitTime(struct pgrs_dir *d,
     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)
index 5185913a2458cb6006032f25fe07b8fe8efda7da..3434030c839fcda9785ab926b1b917db651def24 100644 (file)
@@ -308,7 +308,7 @@ static CURLproxycode socks4_req_add_user(struct socks_state *sx,
       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))
index 3b128655f5e725fef113e399bf5153193d4cb914..aede060019200af8122f098a5db9f13e279f982a 100644 (file)
@@ -49,7 +49,7 @@ CURLcode Curl_speedcheck(struct Curl_easy *data,
   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 */
index 0a0b6ff3a205430fef8d928d0650f2766a3b406d..cf34514b1a9b6008f73666d3736dc5e0d4cf1ebe 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1283,7 +1283,7 @@ static bool url_match_result(bool result, void *userdata)
     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 @@ static CURLcode override_login(struct Curl_easy *data,
                                       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 @@ static CURLcode override_login(struct Curl_easy *data,
       }
       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");
index 73f476ed3f6255ea17408d1fbd645293c625acdd..a3d9efdb919fb389bc32ab96e646dada6c4e5700 100644 (file)
@@ -1940,7 +1940,7 @@ nomem:
         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;
index a8d4ffe5b774bdaf28a4a34b61b3f9705d80b83d..c1c0ab2ab2195095d45ee88ef4287244a5c82a3c 100644 (file)
@@ -216,7 +216,7 @@ static bool auth_digest_get_key_value(const char *chlg, const char *key,
       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;
index 145a2831db0204b21853462ce26d3a9098d3b486..75dc5cc6947316509bfcf5bdbc748c4e32d01639 100644 (file)
@@ -781,7 +781,7 @@ static CURLcode write_resp_raw(struct Curl_cfilter *cf,
 
   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;
   }
index d8d063b2eca2e6ea0dd0ad880131fbdde83ead92..ff3e76b06342462921689c8db2651895dfb0045f 100644 (file)
@@ -342,7 +342,7 @@ static CURLcode write_resp_raw(struct Curl_cfilter *cf,
 
   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;
   }
index 74a1da5a3e7af987bcf195d194d070b5bc334685..8653c4901d39f03b052f0d00128678d09a30be14 100644 (file)
@@ -1574,8 +1574,8 @@ static int myssh_in_SFTP_QUOTE(struct Curl_easy *data,
     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 @@ static int myssh_in_SFTP_QUOTE_STAT(struct Curl_easy *data,
       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;
index 49044669fc066e79cf12d8475d62f8ad61724fda..f5cb5f9a1d5d612aa2484aa8c2488df77b678679 100644 (file)
@@ -878,8 +878,8 @@ static CURLcode sftp_quote(struct Curl_easy *data,
     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);
index 87d5208d735a3c4b30c51945f84cfc53a3776dae..297ebc39f3930a0f68388dc76f022c928dcb1a76 100644 (file)
@@ -148,7 +148,7 @@ CURLcode Curl_vtls_apple_verify(struct Curl_cfilter *cf,
          * 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. */
index 533597ed417611d3e3f5cdca673d09fd1bffe449..f7a5727a11ca8a26008a0cab2753a90f803d959b 100644 (file)
@@ -1688,7 +1688,7 @@ static CURLcode client_cert(struct Curl_easy *data,
         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 @@ static CURLcode client_cert(struct Curl_easy *data,
         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 @@ CURLcode Curl_ossl_check_peer_cert(struct Curl_cfilter *cf,
 #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 @@ static CURLcode ossl_get_channel_binding(struct Curl_easy *data, int sockindex,
 
   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)) {
index 137e525722cd26c3623dddfc095b604fa4bfc2a5..f2a907cb09cb7673935911a34f19296e74cb713f 100644 (file)
@@ -1286,7 +1286,7 @@ schannel_connect_step2(struct Curl_cfilter *cf, struct Curl_easy *data)
 
     /* 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 @@ schannel_recv_renegotiate(struct Curl_cfilter *cf, struct Curl_easy *data,
      * 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).
index 918a4686fcbc414e855d76493f92ea1d003da36e..ed0af3d53b912379dd8cf9811d7afa9504f4cdd0 100644 (file)
@@ -1423,7 +1423,7 @@ static CURLcode ssl_cf_connect_deferred(struct Curl_cfilter *cf,
     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);
index a7883fe08a2f0542b86ea5a747d89bd1afc43673..7b567fd892506cbe4e4c00315ba1a60baf2f86db 100644 (file)
@@ -1725,7 +1725,7 @@ static CURLcode wssl_handshake(struct Curl_cfilter *cf,
   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");
index 96a0d61378f0e694c4eedaecb845013e84a0871b..5a61c65aa80d0c0ce09cbdcce62fb0a22f2bac97 100644 (file)
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -1037,7 +1037,7 @@ static CURLcode ws_enc_send(struct Curl_easy *data,
      * 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);
index 7d099602d30b486d883ab52415822b2bbc09af03..154319231f11cf5a1a4b9f611a2e5661181ec2ee 100644 (file)
@@ -212,11 +212,11 @@ static CURLcode ssh_setopts(struct OperationConfig *config, CURL *curl)
       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 */
 }
index a4c475be8e7afbc45b1f6868aba06504b6d50370..6c119047ce562aa7dc2ff3264a57dea3247ebff3 100644 (file)
@@ -60,7 +60,7 @@ static bool waitfd(int waitms, int fd)
   struct timeval timeout;
 
   if(fd >= FD_SETSIZE)
-    /* can't wait! */
+    /* cannot wait! */
     return FALSE;
 
   /* wait this long at the most */
index 68899c582950d0e894e9f87f14a67be6765e5977..292da1c251765bf4dc071a5519499c9c99065023 100644 (file)
@@ -55,8 +55,8 @@ int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
 
   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)
index 8e9e5f023d39310139f779bd09185bab9c8f47a8..2b19a163ce8bb2ecf26294a30872378e660c27bc 100644 (file)
@@ -874,7 +874,7 @@ curl_socket_t win32_stdin_read_thread(void)
       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. */
index b74b73806d2c19cc32ab7ee2542a3285c6d7feb2..bd90da1ec754b1da9175a171112665b51e5870b4 100644 (file)
@@ -1213,7 +1213,7 @@ static ParameterError parse_ech(struct OperationConfig *config,
         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 @@ static ParameterError opt_bool(struct OperationConfig *config,
     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 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
     /* 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;
index 1317e735510d1047fbc2093814e45a1cf9f63ae9..b7c8805b3a4cc6bf59e1152a72cdf19837f99fbd 100644 (file)
@@ -2252,7 +2252,7 @@ CURLcode operate(int argc, argv_item_t argv[])
       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;
index d25fccf46c6d02eb5b20061a1a988f3a075fe82d..e17955bec306cc9d4c6a6567dfbc25b37cf9fd20 100644 (file)
@@ -211,7 +211,7 @@ CURLcode get_url_file_name(char **filename, const char *url)
       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);
index 008f0fc388c12a507e8db83285928fa45c66ffbd..2e7b98f26eb064be9121cfb72c9c7f4faf9bce0b 100644 (file)
@@ -135,7 +135,7 @@ ParameterError file2memory_range(char **bufp, size_t *size, FILE *file,
         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;
     }
 
index 03f9930c5d8c07763b33714f909d9e5ad44ba663..46096d5b5abed9ca99bb21904d368f7df5c98518 100644 (file)
@@ -103,7 +103,7 @@ ParameterError parseconfig(const char *filename, int max_recursive)
 #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);