From 2cd78f525c714e59c54650f5182db65bdfaf6fe4 Mon Sep 17 00:00:00 2001 From: RainRat Date: Thu, 29 Feb 2024 11:55:28 -0800 Subject: [PATCH] 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 Reviewed-by: Dan Fandrich Closes: #13019 --- docs/CONNECTION-FILTERS.md | 2 +- docs/cmdline-opts/MANPAGE.md | 2 +- docs/cmdline-opts/_VARIABLES.md | 2 +- docs/cmdline-opts/gen.pl | 2 +- docs/cmdline-opts/resolve.md | 2 +- docs/examples/ghiper.c | 2 +- docs/libcurl/libcurl.m4 | 2 +- docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md | 2 +- docs/libcurl/opts/CURLSHOPT_SHARE.md | 2 +- docs/libcurl/opts/CURLSHOPT_UNSHARE.md | 2 +- lib/asyn-ares.c | 2 +- lib/cfilters.h | 2 +- lib/curl_des.c | 2 +- lib/hostip.c | 2 +- lib/http.c | 2 +- lib/mprintf.c | 2 +- lib/socks_gssapi.c | 2 +- lib/vquic/curl_ngtcp2.c | 2 +- lib/vquic/curl_osslq.c | 2 +- lib/vssh/libssh2.c | 2 +- scripts/cmp-config.pl | 2 +- tests/ftpserver.pl | 2 +- tests/http/test_14_auth.py | 2 +- tests/libtest/lib518.c | 2 +- tests/libtest/lib537.c | 2 +- tests/server/sockfilt.c | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/CONNECTION-FILTERS.md b/docs/CONNECTION-FILTERS.md index 6c0ed2bc76..06ec0293f7 100644 --- a/docs/CONNECTION-FILTERS.md +++ b/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 diff --git a/docs/cmdline-opts/MANPAGE.md b/docs/cmdline-opts/MANPAGE.md index 51310564fe..16c203608d 100644 --- a/docs/cmdline-opts/MANPAGE.md +++ b/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 diff --git a/docs/cmdline-opts/_VARIABLES.md b/docs/cmdline-opts/_VARIABLES.md index 60ee6d00d1..77e9523b9a 100644 --- a/docs/cmdline-opts/_VARIABLES.md +++ b/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. diff --git a/docs/cmdline-opts/gen.pl b/docs/cmdline-opts/gen.pl index 17beab5b8b..9105529998 100755 --- a/docs/cmdline-opts/gen.pl +++ b/docs/cmdline-opts/gen.pl @@ -897,7 +897,7 @@ HEADER my $f = $_; chomp $f; if($f =~ /^#/) { - # stardard comment + # standard comment next; } if(/^%options/) { diff --git a/docs/cmdline-opts/resolve.md b/docs/cmdline-opts/resolve.md index c5c5eddd5d..70d039aa8c 100644 --- a/docs/cmdline-opts/resolve.md +++ b/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. diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c index 4510edae50..ec7174ff7f 100644 --- a/docs/examples/ghiper.c +++ b/docs/examples/ghiper.c @@ -22,7 +22,7 @@ * ***************************************************************************/ /* - * multi socket API usage together with with glib2 + * multi socket API usage together with glib2 * */ /* Example application source code using the multi socket interface to diff --git a/docs/libcurl/libcurl.m4 b/docs/libcurl/libcurl.m4 index e4a518b5ce..044d7afbd9 100644 --- a/docs/libcurl/libcurl.m4 +++ b/docs/libcurl/libcurl.m4 @@ -169,7 +169,7 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG], LIBS="$LIBCURL $LIBS" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]],[[ -/* 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); diff --git a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md b/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md index a199648c13..58eba18d52 100644 --- a/docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.md +++ b/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). diff --git a/docs/libcurl/opts/CURLSHOPT_SHARE.md b/docs/libcurl/opts/CURLSHOPT_SHARE.md index 8f742a4021..7866640ccc 100644 --- a/docs/libcurl/opts/CURLSHOPT_SHARE.md +++ b/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). diff --git a/docs/libcurl/opts/CURLSHOPT_UNSHARE.md b/docs/libcurl/opts/CURLSHOPT_UNSHARE.md index 4a11bfa55d..e6c2340135 100644 --- a/docs/libcurl/opts/CURLSHOPT_UNSHARE.md +++ b/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). diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 76efba78ad..2290a71ef4 100644 --- a/lib/asyn-ares.c +++ b/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])) diff --git a/lib/cfilters.h b/lib/cfilters.h index 92a2132fe0..c90b1f4bc2 100644 --- a/lib/cfilters.h +++ b/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, diff --git a/lib/curl_des.c b/lib/curl_des.c index b77763f268..f8d2b2cc69 100644 --- a/lib/curl_des.c +++ b/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: * diff --git a/lib/hostip.c b/lib/hostip.c index 4f44d348f6..442817d119 100644 --- a/lib/hostip.c +++ b/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 */ diff --git a/lib/http.c b/lib/http.c index 870de3830c..3f17f7cd92 100644 --- a/lib/http.c +++ b/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 */ diff --git a/lib/mprintf.c b/lib/mprintf.c index 5695253eb3..4c60d13305 100644 --- a/lib/mprintf.c +++ b/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. diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c index 243715055c..c0b42b871a 100644 --- a/lib/socks_gssapi.c +++ b/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; diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c index a26b3e429d..7ef1b5e840 100644 --- a/lib/vquic/curl_ngtcp2.c +++ b/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 diff --git a/lib/vquic/curl_osslq.c b/lib/vquic/curl_osslq.c index ede60e29d8..1d78bd7171 100644 --- a/lib/vquic/curl_osslq.c +++ b/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 { diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c index 36975420bc..073c6873db 100644 --- a/lib/vssh/libssh2.c +++ b/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); diff --git a/scripts/cmp-config.pl b/scripts/cmp-config.pl index e36fcdd3c4..ebd7c2fb23 100755 --- a/scripts/cmp-config.pl +++ b/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, diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index e250aa1cb6..10abe418c2 100755 --- a/tests/ftpserver.pl +++ b/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 { diff --git a/tests/http/test_14_auth.py b/tests/http/test_14_auth.py index 9fd120584a..b90817b62d 100644 --- a/tests/http/test_14_auth.py +++ b/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()}' diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c index 2000412392..28a50b22a3 100644 --- a/tests/libtest/lib518.c +++ b/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); diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c index b83e3ce311..c35aea1b46 100644 --- a/tests/libtest/lib537.c +++ b/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); diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index 0900f6564f..dcfad55544 100644 --- a/tests/server/sockfilt.c +++ b/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. */