Skip to content

Commit ce3dce9

Browse files
committed
tidy-up: mostly whitespace nits
- delete completed TODO from `./CMakeLists.txt`. - convert a C++ comment to C89 in `./CMake/CurlTests.c`. - delete duplicate EOLs from EOF. - add missing EOL at EOF. - delete whitespace at EOL (except from expected test results). - convert tabs to spaces. - convert CRLF EOLs to LF in GHA yaml. - text casing fixes in `./CMakeLists.txt`. - fix a codespell typo in `packages/OS400/initscript.sh`. Closes #11772
1 parent 63f23fa commit ce3dce9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+135
-173
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ body:
3131
id: expected-behaviour
3232
attributes:
3333
label: I expected the following
34-
validations:
34+
validations:
3535
required: false
36-
36+
3737
- type: textarea
3838
id: version
3939
attributes:

.github/scripts/cleanspell.pl

-1
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@
7777
}
7878
close(F);
7979
close(O);
80-

.github/workflows/appveyor-status.yml

+41-41
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
2-
#
3-
# SPDX-License-Identifier: curl
4-
5-
name: AppVeyor Status Report
6-
7-
on:
8-
status
9-
10-
concurrency:
11-
group: ${{ github.workflow }}-${{ github.event.sha }}-${{ github.event.target_url }}
12-
cancel-in-progress: true
13-
14-
permissions: {}
15-
16-
jobs:
17-
split:
18-
runs-on: ubuntu-latest
19-
if: ${{ github.event.sender.login == 'appveyor[bot]' }}
20-
permissions:
21-
statuses: write
22-
steps:
23-
- name: Create individual AppVeyor build statuses
24-
if: ${{ github.event.sha && github.event.target_url }}
25-
env:
26-
APPVEYOR_COMMIT_SHA: ${{ github.event.sha }}
27-
APPVEYOR_TARGET_URL: ${{ github.event.target_url }}
28-
APPVEYOR_REPOSITORY: ${{ github.event.repository.full_name }}
29-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
run: |
31-
echo ${APPVEYOR_TARGET_URL} | sed 's/\/project\//\/api\/projects\//' | xargs -t -n1 curl -s | \
32-
jq -c '.build.jobs[] | {target_url: ($target_url + "/job/" + .jobId),
33-
context: (.name | sub("^(Environment: )?"; "AppVeyor / ")),
34-
state: (.status | sub("queued"; "pending")
35-
| sub("starting"; "pending")
36-
| sub("running"; "pending")
37-
| sub("failed"; "failure")
38-
| sub("cancelled"; "error")),
39-
description: .status}' \
40-
--arg target_url ${APPVEYOR_TARGET_URL} | tee /dev/stderr | parallel --pipe -j 1 -N 1 \
41-
gh api --silent --input - repos/${APPVEYOR_REPOSITORY}/statuses/${APPVEYOR_COMMIT_SHA}
1+
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
2+
#
3+
# SPDX-License-Identifier: curl
4+
5+
name: AppVeyor Status Report
6+
7+
on:
8+
status
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.sha }}-${{ github.event.target_url }}
12+
cancel-in-progress: true
13+
14+
permissions: {}
15+
16+
jobs:
17+
split:
18+
runs-on: ubuntu-latest
19+
if: ${{ github.event.sender.login == 'appveyor[bot]' }}
20+
permissions:
21+
statuses: write
22+
steps:
23+
- name: Create individual AppVeyor build statuses
24+
if: ${{ github.event.sha && github.event.target_url }}
25+
env:
26+
APPVEYOR_COMMIT_SHA: ${{ github.event.sha }}
27+
APPVEYOR_TARGET_URL: ${{ github.event.target_url }}
28+
APPVEYOR_REPOSITORY: ${{ github.event.repository.full_name }}
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: |
31+
echo ${APPVEYOR_TARGET_URL} | sed 's/\/project\//\/api\/projects\//' | xargs -t -n1 curl -s | \
32+
jq -c '.build.jobs[] | {target_url: ($target_url + "/job/" + .jobId),
33+
context: (.name | sub("^(Environment: )?"; "AppVeyor / ")),
34+
state: (.status | sub("queued"; "pending")
35+
| sub("starting"; "pending")
36+
| sub("running"; "pending")
37+
| sub("failed"; "failure")
38+
| sub("cancelled"; "error")),
39+
description: .status}' \
40+
--arg target_url ${APPVEYOR_TARGET_URL} | tee /dev/stderr | parallel --pipe -j 1 -N 1 \
41+
gh api --silent --input - repos/${APPVEYOR_REPOSITORY}/statuses/${APPVEYOR_COMMIT_SHA}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,3 @@ curl_fuzzer_seed_corpus.zip
6565
libstandaloneengine.a
6666
tests/string
6767
tests/config
68-

CMake/CurlTests.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ main() {
510510
int
511511
main() {
512512
_Atomic int i = 1;
513-
i = 0; // Force an atomic-write operation.
513+
i = 0; /* Force an atomic-write operation. */
514514
return i;
515515
}
516516
#endif

CMakeLists.txt

+5-6
Original file line numberDiff line numberDiff line change
@@ -391,21 +391,20 @@ if(WIN32)
391391
endif()
392392

393393
# check SSL libraries
394-
# TODO support GnuTLS
395394
option(CURL_ENABLE_SSL "Enable SSL support" ON)
396395

397396
if(APPLE)
398-
cmake_dependent_option(CURL_USE_SECTRANSP "enable Apple OS native SSL/TLS" OFF CURL_ENABLE_SSL OFF)
397+
cmake_dependent_option(CURL_USE_SECTRANSP "Enable Apple OS native SSL/TLS" OFF CURL_ENABLE_SSL OFF)
399398
endif()
400399
if(WIN32)
401-
cmake_dependent_option(CURL_USE_SCHANNEL "enable Windows native SSL/TLS" OFF CURL_ENABLE_SSL OFF)
400+
cmake_dependent_option(CURL_USE_SCHANNEL "Enable Windows native SSL/TLS" OFF CURL_ENABLE_SSL OFF)
402401
cmake_dependent_option(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without OpenSSL" ON
403402
CURL_USE_SCHANNEL OFF)
404403
endif()
405404
cmake_dependent_option(CURL_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
406405
cmake_dependent_option(CURL_USE_BEARSSL "Enable BearSSL for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
407-
cmake_dependent_option(CURL_USE_WOLFSSL "enable wolfSSL for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
408-
cmake_dependent_option(CURL_USE_GNUTLS "Enable GNUTLS for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
406+
cmake_dependent_option(CURL_USE_WOLFSSL "Enable wolfSSL for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
407+
cmake_dependent_option(CURL_USE_GNUTLS "Enable GNUTLS for SSL/TLS" OFF CURL_ENABLE_SSL OFF)
409408

410409
set(openssl_default ON)
411410
if(WIN32 OR CURL_USE_SECTRANSP OR CURL_USE_SCHANNEL OR CURL_USE_MBEDTLS OR CURL_USE_WOLFSSL)
@@ -607,7 +606,7 @@ if(USE_OPENSSL OR USE_WOLFSSL)
607606
endif()
608607
endif()
609608

610-
option(USE_NGHTTP2 "Use Nghttp2 library" OFF)
609+
option(USE_NGHTTP2 "Use nghttp2 library" OFF)
611610
if(USE_NGHTTP2)
612611
find_package(NGHTTP2 REQUIRED)
613612
include_directories(${NGHTTP2_INCLUDE_DIRS})

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,3 @@ Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/
6666
## Sponsors
6767

6868
Support this project by becoming a [sponsor](https://curl.se/sponsors.html).
69-

docs/BUFQ.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ To pass data into a `bufq` without an extra copy, read callbacks can be used.
2828
typedef ssize_t Curl_bufq_reader(void *reader_ctx, unsigned char *buf, size_t len,
2929
CURLcode *err);
3030
31-
ssize_t Curl_bufq_slurp(struct bufq *q, Curl_bufq_reader *reader, void *reader_ctx,
31+
ssize_t Curl_bufq_slurp(struct bufq *q, Curl_bufq_reader *reader, void *reader_ctx,
3232
CURLcode *err);
33-
3433
```
3534

3635
`Curl_bufq_slurp()` will invoke the given `reader` callback, passing it its own internal
@@ -44,7 +43,7 @@ The analog mechanism for write out buffer data is:
4443
typedef ssize_t Curl_bufq_writer(void *writer_ctx, const unsigned char *buf, size_t len,
4544
CURLcode *err);
4645
47-
ssize_t Curl_bufq_pass(struct bufq *q, Curl_bufq_writer *writer, void *writer_ctx,
46+
ssize_t Curl_bufq_pass(struct bufq *q, Curl_bufq_writer *writer, void *writer_ctx,
4847
CURLcode *err);
4948
```
5049

@@ -106,10 +105,10 @@ If a `bufq` is created with a `bufc_pool`, the no longer used chunks are returne
106105

107106
## empty, full and overflow
108107

109-
One can ask about the state of a `bufq` with methods such as `Curl_bufq_is_empty(q)`,
108+
One can ask about the state of a `bufq` with methods such as `Curl_bufq_is_empty(q)`,
110109
`Curl_bufq_is_full(q)`, etc. The amount of data held by a `bufq` is the sum of the data in all its chunks. This is what is reported by `Curl_bufq_len(q)`.
111110

112-
Note that a `bufq` length and it being "full" are only loosely related. A simple example:
111+
Note that a `bufq` length and it being "full" are only loosely related. A simple example:
113112

114113
* create a `bufq` with chunk_size=1000 and max_chunks=4.
115114
* write 4000 bytes to it, it will report "full"
@@ -140,5 +139,3 @@ A pool can be shared between many `bufq`s, as long as all of them operate in the
140139

141140
* when all `bufq`s are empty, only memory for `max_spare` chunks in the pool is used. Empty `bufq`s will hold no memory.
142141
* the latest spare chunk is the first to be handed out again, no matter which `bufq` needs it. This keeps the footprint of "recently used" memory smaller.
143-
144-

docs/BUGS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199

200200
## Not reproducible
201201

202-
We may require further work from you who actually see or experience the
202+
We may require further work from you who actually see or experience the
203203
problem if we cannot reproduce it and cannot understand it even after having
204204
gotten all the info we need and having studied the source code over again.
205205

docs/CONNECTION-FILTERS.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# curl connection filters
22

3-
Connection filters is a design in the internals of curl, not visible in its public API. They were added
3+
Connection filters is a design in the internals of curl, not visible in its public API. They were added
44
in curl v7.xx.x. This document describes the concepts, its high level implementation and the motivations.
55

66
## Filters
@@ -34,13 +34,13 @@ Direct:
3434
http://localhost/ conn -> cf-socket
3535
https://curl.se/ conn -> cf-ssl -> cf-socket
3636
Via http proxy tunnel:
37-
http://localhost/ conn -> cf-http-proxy -> cf-socket
37+
http://localhost/ conn -> cf-http-proxy -> cf-socket
3838
https://curl.se/ conn -> cf-ssl -> cf-http-proxy -> cf-socket
3939
Via https proxy tunnel:
40-
http://localhost/ conn -> cf-http-proxy -> cf-ssl -> cf-socket
40+
http://localhost/ conn -> cf-http-proxy -> cf-ssl -> cf-socket
4141
https://curl.se/ conn -> cf-ssl -> cf-http-proxy -> cf-ssl -> cf-socket
4242
Via http proxy tunnel via SOCKS proxy:
43-
http://localhost/ conn -> cf-http-proxy -> cf-socks -> cf-socket
43+
http://localhost/ conn -> cf-http-proxy -> cf-socks -> cf-socket
4444
```
4545

4646
### Connecting/Closing
@@ -50,7 +50,7 @@ Before `Curl_easy` can send the request, the connection needs to be established.
5050
Each filter does in principle the following:
5151

5252
```
53-
static CURLcode
53+
static CURLcode
5454
myfilter_cf_connect(struct Curl_cfilter *cf,
5555
struct Curl_easy *data,
5656
bool *done)
@@ -63,7 +63,7 @@ myfilter_cf_connect(struct Curl_cfilter *cf,
6363
}
6464
/* Let the filters below connect */
6565
result = cf->next->cft->connect(cf->next, data, blocking, done);
66-
if(result || !*done)
66+
if(result || !*done)
6767
return result; /* below errored/not finished yet */
6868
6969
/* MYFILTER CONNECT THINGS */ /* below connected, do out thing */

docs/DEPRECATE.md

-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ curl will remove the support for space-separated names in July 2024.
4646
- Support for systems without 64 bit data types
4747
- NSS
4848
- gskit
49-

docs/HTTP3.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ should be either in your PATH or your current directory.
340340
Create a `Caddyfile` with the following content:
341341
~~~
342342
localhost:7443 {
343-
respond "Hello, world! you are using {http.request.proto}"
343+
respond "Hello, world! you are using {http.request.proto}"
344344
}
345345
~~~
346346

docs/HYPER.md

-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,3 @@ still need attention and verification include:
6767
- h2 Upgrade:
6868
- receiving HTTP/1 trailers
6969
- sending HTTP/1 trailers
70-

docs/cmdline-opts/max-filesize.d

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
2020

2121
**NOTE**: The file size is not always known prior to download, and for such
2222
files this option has no effect even if the file transfer ends up being larger
23-
than this given limit.
23+
than this given limit.

docs/cmdline-opts/variable.d

-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ shows the content URL (percent) encoded.
5454
expands the variable base64 encoded
5555
.RE
5656
.IP
57-

docs/examples/ipv6.c

-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ int main(void)
6060
#endif
6161
return 0;
6262
}
63-

docs/libcurl/libcurl-ws.3

-1
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,3 @@ change API, ABI and behavior before this "goes live".
112112
.BR curl_ws_meta "(3), " curl_ws_recv "(3), " curl_ws_send "(3), "
113113
.BR curl_easy_init "(3), " CURLOPT_CONNECT_ONLY "(3), "
114114
.BR CURLOPT_WRITEFUNCTION "(3)" CURLOPT_WS_OPTIONS "(3), "
115-

docs/libcurl/opts/CURLOPT_HSTSREADFUNCTION.3

-1
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,3 @@ This returns CURLE_OK.
8686
.SH "SEE ALSO"
8787
.BR CURLOPT_HSTSREADDATA "(3), " CURLOPT_HSTSWRITEFUNCTION "(3), "
8888
.BR CURLOPT_HSTS "(3), " CURLOPT_HSTS_CTRL "(3), "
89-

docs/libcurl/opts/CURLOPT_UPKEEP_INTERVAL_MS.3

-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,3 @@ Added in 7.62.0
8080
Returns CURLE_OK
8181
.SH SEE ALSO
8282
.BR CURLOPT_TCP_KEEPALIVE "(3), "
83-

docs/libcurl/opts/Makefile.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ man_MANS = \
348348
CURLOPT_SSL_CIPHER_LIST.3 \
349349
CURLOPT_SSL_CTX_DATA.3 \
350350
CURLOPT_SSL_CTX_FUNCTION.3 \
351-
CURLOPT_SSL_EC_CURVES.3 \
351+
CURLOPT_SSL_EC_CURVES.3 \
352352
CURLOPT_SSL_ENABLE_ALPN.3 \
353353
CURLOPT_SSL_ENABLE_NPN.3 \
354354
CURLOPT_SSL_FALSESTART.3 \

lib/amigaos.h

-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,3 @@ void Curl_amiga_cleanup(void);
3939
#endif
4040

4141
#endif /* HEADER_CURL_AMIGAOS_H */
42-

lib/cfilters.c

-1
Original file line numberDiff line numberDiff line change
@@ -646,4 +646,3 @@ size_t Curl_conn_get_max_concurrent(struct Curl_easy *data,
646646
&n, NULL) : CURLE_UNKNOWN_OPTION;
647647
return (result || n <= 0)? 1 : (size_t)n;
648648
}
649-

lib/connect.c

-1
Original file line numberDiff line numberDiff line change
@@ -1446,4 +1446,3 @@ CURLcode Curl_conn_setup(struct Curl_easy *data,
14461446
out:
14471447
return result;
14481448
}
1449-

lib/sendf.c

-1
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,3 @@ CURLcode Curl_read(struct Curl_easy *data, /* transfer */
421421
out:
422422
return result;
423423
}
424-

m4/curl-bearssl.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if test "x$OPT_BEARSSL" != xno; then
4949
BEARSSL_ENABLED=1
5050
USE_BEARSSL="yes"
5151
ssl_msg="BearSSL"
52-
test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
52+
test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
5353
], [], -lbearssl)
5454
fi
5555

m4/curl-mbedtls.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if test "x$OPT_MBEDTLS" != xno; then
4949
MBEDTLS_ENABLED=1
5050
USE_MBEDTLS="yes"
5151
ssl_msg="mbedTLS"
52-
test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
52+
test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
5353
], [], -lmbedx509 -lmbedcrypto)
5454
fi
5555

m4/curl-openssl.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ if test "x$OPT_OPENSSL" != xno; then
226226
AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \
227227
openssl/pem.h openssl/ssl.h openssl/err.h,
228228
ssl_msg="OpenSSL"
229-
test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
229+
test openssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
230230
OPENSSL_ENABLED=1
231231
AC_DEFINE(USE_OPENSSL, 1, [if OpenSSL is in use]))
232232

m4/curl-rustls.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if test "x$OPT_RUSTLS" != xno; then
5757
RUSTLS_ENABLED=1
5858
USE_RUSTLS="yes"
5959
ssl_msg="rustls"
60-
test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
60+
test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
6161
], [], -lpthread -ldl -lm)
6262
fi
6363

m4/curl-wolfssl.m4

+5-5
Original file line numberDiff line numberDiff line change
@@ -90,24 +90,24 @@ if test "x$OPT_WOLFSSL" != xno; then
9090
9191
AC_MSG_CHECKING([for wolfSSL_Init in -lwolfssl])
9292
AC_LINK_IFELSE([
93-
AC_LANG_PROGRAM([[
93+
AC_LANG_PROGRAM([[
9494
/* These aren't needed for detection and confuse WolfSSL.
9595
They are set up properly later if it is detected. */
9696
#undef SIZEOF_LONG
9797
#undef SIZEOF_LONG_LONG
9898
#include <wolfssl/options.h>
9999
#include <wolfssl/ssl.h>
100-
]],[[
101-
return wolfSSL_Init();
102-
]])
100+
]],[[
101+
return wolfSSL_Init();
102+
]])
103103
],[
104104
AC_MSG_RESULT(yes)
105105
AC_DEFINE(USE_WOLFSSL, 1, [if wolfSSL is enabled])
106106
AC_SUBST(USE_WOLFSSL, [1])
107107
WOLFSSL_ENABLED=1
108108
USE_WOLFSSL="yes"
109109
ssl_msg="WolfSSL"
110-
test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
110+
test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
111111
],
112112
[
113113
AC_MSG_RESULT(no)

packages/OS400/initscript.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ versioned_copy()
266266
# The `sed' statement works as follows:
267267
# - Join \nl-separated lines.
268268
# - Retain only lines that begins with "identifier =".
269-
# - Replace @...@ sustitutions by shell variable references.
269+
# - Replace @...@ substitutions by shell variable references.
270270
# - Turn these lines into shell variable assignments.
271271

272272
get_make_vars()

0 commit comments

Comments
 (0)