Browse Source

misc: Fix typos in docs and lib

This fixes miscellaneous typos and duplicated words in the docs, lib
and test comments and a few user facing errorstrings.

Author: RainRat on Github
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Dan Fandrich <dan@coneharvesters.com>
Closes: #13019
RainRat 1 month ago
parent
commit
2cd78f525c

+ 1 - 1
docs/CONNECTION-FILTERS.md

@@ -267,7 +267,7 @@ conn[curl.se] --> SETUP[TCP] --> HAPPY-EYEBALLS --> TCP[2a04:4e42:c00::347]:443
 
 The modular design of connection filters and that we can plug them into each other is used to control the parallel attempts. When a `TCP` filter does not connect (in time), it is torn down and another one is created for the next address. This keeps the `TCP` filter simple. 
 
-The `HAPPY-EYEBALLS` on the other hand stays focused on its side of the problem. We can use it also to make other type of connection by just giving it another filter type to try and have happy eyeballing for QUIC:
+The `HAPPY-EYEBALLS` on the other hand stays focused on its side of the problem. We can use it also to make other type of connection by just giving it another filter type to try to have happy eyeballing for QUIC:
 
 ```
 * create connection for --http3-only https://curl.se

+ 1 - 1
docs/cmdline-opts/MANPAGE.md

@@ -88,7 +88,7 @@ Angle brackets (`<>`) need to be escaped when used in text like `\<` and
 
 ### Headers
 
-The `#` header can be used by non-option files and it produces produces a
+The `#` header can be used by non-option files and it produces a
 `.SH` output.
 
 If the `#` header is used for a command line option file, that header is

+ 1 - 1
docs/cmdline-opts/_VARIABLES.md

@@ -41,4 +41,4 @@ as POST data:
     --expand-data "{{fix:trim:url}}"
     https://example.com/
 
-Command line variables and expansions were added in in 8.3.0.
+Command line variables and expansions were added in 8.3.0.

+ 1 - 1
docs/cmdline-opts/gen.pl

@@ -897,7 +897,7 @@ HEADER
         my $f = $_;
         chomp $f;
         if($f =~ /^#/) {
-            # stardard comment
+            # standard comment
             next;
         }
         if(/^%options/) {

+ 1 - 1
docs/cmdline-opts/resolve.md

@@ -43,4 +43,4 @@ Support for providing multiple IP addresses per entry was added in 7.59.0.
 
 Support for resolving with wildcard was added in 7.64.0.
 
-Support for the '+' prefix was was added in 7.75.0.
+Support for the '+' prefix was added in 7.75.0.

+ 1 - 1
docs/examples/ghiper.c

@@ -22,7 +22,7 @@
  *
  ***************************************************************************/
 /* <DESC>
- * multi socket API usage together with with glib2
+ * multi socket API usage together with glib2
  * </DESC>
  */
 /* Example application source code using the multi socket interface to

+ 1 - 1
docs/libcurl/libcurl.m4

@@ -169,7 +169,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
            LIBS="$LIBCURL $LIBS"
 
            AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
-/* Try and use a few common options to force a failure if we are
+/* Try to use a few common options to force a failure if we are
    missing symbols or cannot link. */
 int x;
 curl_easy_setopt(NULL,CURLOPT_URL,NULL);

+ 1 - 1
docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md

@@ -73,7 +73,7 @@ The data is header (or header-like) data sent to the peer.
 ## CURLINFO_DATA_IN
 
 The data is the unprocessed protocol data received from the peer. Even if the
-data is encoded or compressed, it is not not provided decoded nor decompressed
+data is encoded or compressed, it is not provided decoded nor decompressed
 to this callback. If you need the data in decoded and decompressed form, use
 CURLOPT_WRITEFUNCTION(3).
 

+ 1 - 1
docs/libcurl/opts/CURLSHOPT_SHARE.md

@@ -27,7 +27,7 @@ CURLSHcode curl_share_setopt(CURLSH *share, CURLSHOPT_SHARE, long type);
 
 The *type* parameter specifies what specific data that should be shared
 and kept in the share object that was created with curl_share_init(3).
-The given *type* must be be one of the values described below. You can set
+The given *type* must be one of the values described below. You can set
 CURLSHOPT_SHARE(3) multiple times with different data arguments to have
 the share object share multiple types of data. Unset a type again by setting
 CURLSHOPT_UNSHARE(3).

+ 1 - 1
docs/libcurl/opts/CURLSHOPT_UNSHARE.md

@@ -28,7 +28,7 @@ CURLSHcode curl_share_setopt(CURLSH *share, CURLSHOPT_UNSHARE, long type);
 The *type* parameter specifies what specific data that should no longer be
 shared and kept in the share object that was created with
 curl_share_init(3). In other words, stop sharing that data in this
-shared object. The given *type* must be be one of the values described
+shared object. The given *type* must be one of the values described
 below. You can set CURLSHOPT_UNSHARE(3) multiple times with different
 data arguments to remove multiple types from the shared object. Add data to
 share again with CURLSHOPT_SHARE(3).

+ 1 - 1
lib/asyn-ares.c

@@ -850,7 +850,7 @@ CURLcode Curl_set_dns_servers(struct Curl_easy *data,
   /* If server is NULL or empty, this would purge all DNS servers
    * from ares library, which will cause any and all queries to fail.
    * So, just return OK if none are configured and don't actually make
-   * any changes to c-ares.  This lets c-ares use it's defaults, which
+   * any changes to c-ares.  This lets c-ares use its defaults, which
    * it gets from the OS (for instance from /etc/resolv.conf on Linux).
    */
   if(!(servers && servers[0]))

+ 1 - 1
lib/cfilters.h

@@ -402,7 +402,7 @@ void Curl_conn_adjust_pollset(struct Curl_easy *data,
 /**
  * Receive data through the filter chain at `sockindex` for connection
  * `data->conn`. Copy at most `len` bytes into `buf`. Return the
- * actuel number of bytes copied or a negative value on error.
+ * actual number of bytes copied or a negative value on error.
  * The error code is placed into `*code`.
  */
 ssize_t Curl_cf_recv(struct Curl_easy *data, int sockindex, char *buf,

+ 1 - 1
lib/curl_des.c

@@ -36,7 +36,7 @@
  * Curl_des_set_odd_parity()
  *
  * This is used to apply odd parity to the given byte array. It is typically
- * used by when a cryptography engines doesn't have it's own version.
+ * used by when a cryptography engine doesn't have its own version.
  *
  * The function is a port of the Java based oddParity() function over at:
  *

+ 1 - 1
lib/hostip.c

@@ -288,7 +288,7 @@ static struct Curl_dns_entry *fetch_addr(struct Curl_easy *data,
   size_t entry_len = create_hostcache_id(hostname, 0, port,
                                          entry_id, sizeof(entry_id));
 
-  /* See if its already in our dns cache */
+  /* See if it's already in our dns cache */
   dns = Curl_hash_pick(data->dns.hostcache, entry_id, entry_len + 1);
 
   /* No entry found in cache, check if we might have a wildcard entry */

+ 1 - 1
lib/http.c

@@ -4125,7 +4125,7 @@ CURLcode Curl_http_write_resp(struct Curl_easy *data,
   blen -= consumed;
   buf += consumed;
   /* either all was consumed in header parsing, or we have data left
-   * and are done with heders, e.g. it is BODY data */
+   * and are done with headers, e.g. it is BODY data */
   DEBUGASSERT(!blen || !data->req.header);
   if(!data->req.header && (blen || is_eos)) {
     /* BODY data after header been parsed, write and consume */

+ 1 - 1
lib/mprintf.c

@@ -642,7 +642,7 @@ static int parsefmt(const char *format,
  * On success, the input array describes the type of all arguments and their
  * values.
  *
- * The function then iterates over the output sengments and outputs them one
+ * The function then iterates over the output segments and outputs them one
  * by one until done. Using the appropriate input arguments (if any).
  *
  * All output is sent to the 'stream()' callback, one byte at a time.

+ 1 - 1
lib/socks_gssapi.c

@@ -475,7 +475,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf,
                               gss_recv_token.length, &actualread);
 
   if(result || (actualread != us_length)) {
-    failf(data, "Failed to receive GSS-API encryptrion type.");
+    failf(data, "Failed to receive GSS-API encryption type.");
     gss_release_buffer(&gss_status, &gss_recv_token);
     gss_delete_sec_context(&gss_status, &gss_context, NULL);
     return CURLE_COULDNT_CONNECT;

+ 1 - 1
lib/vquic/curl_ngtcp2.c

@@ -1769,7 +1769,7 @@ static CURLcode cf_progress_egress(struct Curl_cfilter *cf,
   }
 
   /* In UDP, there is a maximum theoretical packet paload length and
-   * a minimum payload length that is "guarantueed" to work.
+   * a minimum payload length that is "guaranteed" to work.
    * To detect if this minimum payload can be increased, ngtcp2 sends
    * now and then a packet payload larger than the minimum. It that
    * is ACKed by the peer, both parties know that it works and

+ 1 - 1
lib/vquic/curl_osslq.c

@@ -426,7 +426,7 @@ static CURLcode cf_osslq_ssl_err(struct Curl_cfilter *cf,
 #endif
   else if((lib == ERR_LIB_SSL) && (reason == SSL_R_PROTOCOL_IS_SHUTDOWN)) {
     ctx->protocol_shutdown = TRUE;
-    err_descr = "QUIC connectin has been shut down";
+    err_descr = "QUIC connection has been shut down";
     result = def_result;
   }
   else {

+ 1 - 1
lib/vssh/libssh2.c

@@ -3272,7 +3272,7 @@ static CURLcode ssh_connect(struct Curl_easy *data, bool *done)
 #endif /* CURL_LIBSSH2_DEBUG */
 
   /* libcurl MUST to set custom memory functions so that the kbd_callback
-     funciton's memory allocations can be properled freed */
+     function's memory allocations can be properly freed */
   sshc->ssh_session = libssh2_session_init_ex(my_libssh2_malloc,
                                               my_libssh2_free,
                                               my_libssh2_realloc, data);

+ 1 - 1
scripts/cmp-config.pl

@@ -31,7 +31,7 @@ if(!$cmake) {
     exit;
 }
 
-# this lists complete lines that will be removed from the the output if
+# this lists complete lines that will be removed from the output if
 # matching
 my %remove = (
     '#define _FILE_OFFSET_BITS 64' => 1,

+ 1 - 1
tests/ftpserver.pl

@@ -672,7 +672,7 @@ sub protocolsetup {
 
 # Perform the disconnecgt handshake with sockfilt on the secondary connection
 # (the only connection we actively disconnect).
-# This involves waiting for the disconnect acknowledgmeent after the DISC
+# This involves waiting for the disconnect acknowledgment after the DISC
 # command, while throwing away anything else that might come in before
 # that.
 sub disc_handshake {

+ 1 - 1
tests/http/test_14_auth.py

@@ -133,7 +133,7 @@ class TestAuth:
         r = curl.http_upload(urls=[url], data=f'@{fdata}', alpn_proto=proto, extra_args=[
             '--basic', '--user', f'test:{password}'
         ])
-        # Depending on protocl, we might have an error sending or
+        # Depending on protocol, we might have an error sending or
         # the server might shutdown the connection and we see the error
         # on receiving
         assert r.exit_code in [55, 56], f'{self.dump_logs()}'

+ 1 - 1
tests/libtest/lib518.c

@@ -432,7 +432,7 @@ static int rlimit(int keep_open)
   }
 
   /* free the chunk of memory we were reserving so that it
-     becomes becomes available to the test */
+     becomes available to the test */
 
   free(memchunk);
 

+ 1 - 1
tests/libtest/lib537.c

@@ -436,7 +436,7 @@ static int rlimit(int keep_open)
   }
 
   /* free the chunk of memory we were reserving so that it
-     becomes becomes available to the test */
+     becomes available to the test */
 
   free(memchunk);
 

+ 1 - 1
tests/server/sockfilt.c

@@ -893,7 +893,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
 
 
 /* Perform the disconnect handshake with sockfilt
- * This involves waiting for the disconnect acknowledgmeent after the DISC
+ * This involves waiting for the disconnect acknowledgment after the DISC
  * command, while throwing away anything else that might come in before
  * that.
  */