mirror of
https://github.com/curl/curl.git
synced 2026-07-26 09:27:21 +03:00
tidy-up: miscellaneous
- examples: sync debug output printf masks. - INSTALL-CMAKE.md: tidy up section for some options. - curl_sha512_256: delete comment suggesting an optimization. - vtls/keylog: scope a variable. - vtls/openssl: make a source code URL a permalink. - vtls/schannel: drop redundant parentheses. - test1119.pl: robustify `$1` -> `$s`. - sync arg names in comments to match the code. - tidy up and minor fixes to comments. - fix formatting/indenting/comment/newline/include nits. - move `UNITTEST` protos next to definitions, sync their argument names. - make variables static. - add parentheses to Perl `open()` calls. - drop unnecessary double quotes in Perl. - clang-format. Closes #21000
This commit is contained in:
parent
3512b673dd
commit
e0dd6eb4a4
148 changed files with 612 additions and 684 deletions
|
|
@ -21,9 +21,10 @@
|
|||
* SPDX-License-Identifier: curl
|
||||
*
|
||||
***************************************************************************/
|
||||
#include <stddef.h>
|
||||
#include "tool_setup.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "tool_cfgable.h"
|
||||
#include "tool_formparse.h"
|
||||
#include "tool_libinfo.h"
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ static const struct finder conf_list[] = {
|
|||
|
||||
static char *checkhome(const char *home, const char *fname, bool dotscore)
|
||||
{
|
||||
const char pref[2] = { '.', '_' };
|
||||
static const char pref[2] = { '.', '_' };
|
||||
int i;
|
||||
for(i = 0; i < (dotscore ? 2 : 1); i++) {
|
||||
char *c;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ static const struct LongShort aliases[]= {
|
|||
{"dns-servers", ARG_STRG, ' ', C_DNS_SERVERS},
|
||||
{"doh-cert-status", ARG_BOOL|ARG_TLS, ' ', C_DOH_CERT_STATUS},
|
||||
{"doh-insecure", ARG_BOOL|ARG_TLS, ' ', C_DOH_INSECURE},
|
||||
{"doh-url" , ARG_STRG, ' ', C_DOH_URL},
|
||||
{"doh-url", ARG_STRG, ' ', C_DOH_URL},
|
||||
{"dump-ca-embed", ARG_NONE|ARG_TLS, ' ', C_DUMP_CA_EMBED},
|
||||
{"dump-header", ARG_FILE, 'D', C_DUMP_HEADER},
|
||||
{"ech", ARG_STRG|ARG_TLS, ' ', C_ECH},
|
||||
|
|
@ -246,7 +246,8 @@ static const struct LongShort aliases[]= {
|
|||
{"proxy-ca-native", ARG_BOOL|ARG_TLS, ' ', C_PROXY_CA_NATIVE},
|
||||
{"proxy-cacert", ARG_FILE|ARG_TLS, ' ', C_PROXY_CACERT},
|
||||
{"proxy-capath", ARG_FILE|ARG_TLS, ' ', C_PROXY_CAPATH},
|
||||
{"proxy-cert", ARG_FILE|ARG_TLS|ARG_CLEAR, ' ', C_PROXY_CERT},
|
||||
{"proxy-cert", ARG_FILE|ARG_TLS|ARG_CLEAR, ' ',
|
||||
C_PROXY_CERT},
|
||||
{"proxy-cert-type", ARG_STRG|ARG_TLS, ' ', C_PROXY_CERT_TYPE},
|
||||
{"proxy-ciphers", ARG_STRG|ARG_TLS, ' ', C_PROXY_CIPHERS},
|
||||
{"proxy-crlfile", ARG_FILE|ARG_TLS, ' ', C_PROXY_CRLFILE},
|
||||
|
|
|
|||
|
|
@ -132,7 +132,6 @@ size_t feature_count;
|
|||
* the latter is not returned by curl_version_info(), it is built from
|
||||
* the returned features bit mask.
|
||||
*/
|
||||
|
||||
CURLcode get_libcurl_info(void)
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
|
|
@ -197,7 +196,6 @@ CURLcode get_libcurl_info(void)
|
|||
* a given protocol and thus allows comparing pointers rather than strings.
|
||||
* In addition, the returned pointer is not deallocated until the program ends.
|
||||
*/
|
||||
|
||||
const char *proto_token(const char *proto)
|
||||
{
|
||||
const char * const *builtin;
|
||||
|
|
|
|||
|
|
@ -576,8 +576,8 @@ static CURLcode retrycheck(struct OperationConfig *config,
|
|||
/* We have written data to an output file, we truncate file */
|
||||
fflush(outs->stream);
|
||||
notef("Throwing away %" CURL_FORMAT_CURL_OFF_T " bytes", outs->bytes);
|
||||
/* truncate file at the position where we started appending */
|
||||
|
||||
/* truncate file at the position where we started appending */
|
||||
if(toolx_ftruncate(fileno(outs->stream), outs->init)) {
|
||||
/* when truncate fails, we cannot append as then we
|
||||
create something strange, bail out */
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ int toolx_ftruncate_win32(int fd, curl_off_t where)
|
|||
}
|
||||
#elif defined(__DJGPP__)
|
||||
/*
|
||||
* Only supports 'off_t' (signed 32 bit) as file size.
|
||||
* Only supports 'off_t' (signed 32-bit) as file size.
|
||||
*/
|
||||
int toolx_ftruncate_djgpp(int fd, curl_off_t where)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue