mirror of
https://github.com/curl/curl.git
synced 2026-01-18 17:21:26 +01:00
tidy-up: miscellaneous
- drop stray duplicate empty lines in docs, scripts, test data, include, examples, tests. - drop duplicate PP parenthesis. - curl-functions.m4: move literals to the right side in if expressions, to match rest of the source code. - FAQ.md: delete language designator from an URL. - packages: apply clang-format (OS400, VMS). - scripts/schemetable.c: apply clang-format. - data320: delete duplicate empty line that doesn't change the outcome. - spacecheck: extend to check for duplicate empty lines (with exceptions.) - fix whitespace nits Closes #19936
This commit is contained in:
@@ -54,7 +54,6 @@ while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
use POSIX qw(strftime);
|
||||
my @ts;
|
||||
if(defined($ENV{SOURCE_DATE_EPOCH})) {
|
||||
|
||||
@@ -1205,7 +1205,6 @@ sub scanfile {
|
||||
|
||||
}
|
||||
|
||||
|
||||
if($errors || $warnings || $verbose) {
|
||||
printf "checksrc: %d errors and %d warnings\n", $errors, $warnings;
|
||||
if($suppressed) {
|
||||
|
||||
@@ -108,7 +108,6 @@ my %defaulton = (
|
||||
|
||||
);
|
||||
|
||||
|
||||
sub configureopts {
|
||||
my ($opts)=@_;
|
||||
my %thisin;
|
||||
@@ -189,7 +188,6 @@ for my $w (sort keys %avail) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print "ENABLED configure options that are not available\n";
|
||||
for my $w (sort keys %with) {
|
||||
if(!$avail{$w}) {
|
||||
|
||||
@@ -95,7 +95,7 @@ my $deletes=`git diff-tree --diff-filter=A -r --summary origin/$branch $start 2>
|
||||
my $creates=`git diff-tree --diff-filter=D -r --summary origin/$branch $start 2>/dev/null | wc -l`;
|
||||
|
||||
# Time since that tag
|
||||
my $tagged=`git for-each-ref --format="%(refname:short) | %(taggerdate:unix)" refs/tags/* | grep ^$start | cut "-d|" -f2`; # Unix timestamp
|
||||
my $tagged=`git for-each-ref --format="%(refname:short) | %(taggerdate:unix)" refs/tags/* | grep ^$start | cut '-d|' -f2`; # Unix timestamp
|
||||
my $taggednice=`git for-each-ref --format="%(refname:short) | %(creatordate)" refs/tags/* | grep ^$start | cut '-d|' -f2`; # human readable time
|
||||
chomp $taggednice;
|
||||
my $now=POSIX::strftime("%s", localtime());
|
||||
|
||||
@@ -54,7 +54,6 @@ cat > "$out" <<EOF
|
||||
##
|
||||
EOF
|
||||
|
||||
|
||||
certutil -L -h 'Builtin Object Token' -d "$db" | \
|
||||
grep ' *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$' | \
|
||||
sed -e 's/ *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$//' -e 's/\(.*\)/"\1"/' | \
|
||||
|
||||
@@ -85,7 +85,6 @@ sub manpageify {
|
||||
return "--$k$trail";
|
||||
}
|
||||
|
||||
|
||||
my $colwidth=79; # max number of columns
|
||||
|
||||
sub prefixline {
|
||||
@@ -500,7 +499,6 @@ sub render {
|
||||
# convert single backslash to double-backslash
|
||||
$d =~ s/\\/\\\\/g if($manpage);
|
||||
|
||||
|
||||
if($manpage) {
|
||||
if(!$quote && $d =~ /--/) {
|
||||
$d =~ s/--([a-z0-9.-]+)/manpageify($1, 1)/ge;
|
||||
@@ -1047,7 +1045,6 @@ sub header {
|
||||
printdesc($manpage, 0, @d);
|
||||
}
|
||||
|
||||
|
||||
sub sourcecategories {
|
||||
my ($dir) = @_;
|
||||
my %cats;
|
||||
|
||||
@@ -255,7 +255,6 @@ sub sha256 {
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
sub oldhash {
|
||||
my $hash = "";
|
||||
open(C, "<$_[0]") || return 0;
|
||||
|
||||
@@ -35,45 +35,45 @@ struct detail {
|
||||
};
|
||||
|
||||
static const struct detail scheme[] = {
|
||||
{"dict", "#ifndef CURL_DISABLE_DICT" },
|
||||
{"file", "#ifndef CURL_DISABLE_FILE" },
|
||||
{"ftp", "#ifndef CURL_DISABLE_FTP" },
|
||||
{"ftps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP)" },
|
||||
{"gopher", "#ifndef CURL_DISABLE_GOPHER" },
|
||||
{"gophers", "#if defined(USE_SSL) && !defined(CURL_DISABLE_GOPHER)" },
|
||||
{"http", "#ifndef CURL_DISABLE_HTTP" },
|
||||
{"https", "#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" },
|
||||
{"imap", "#ifndef CURL_DISABLE_IMAP" },
|
||||
{"imaps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_IMAP)" },
|
||||
{"ldap", "#ifndef CURL_DISABLE_LDAP" },
|
||||
{"ldaps", "#if !defined(CURL_DISABLE_LDAP) && \\\n"
|
||||
" !defined(CURL_DISABLE_LDAPS) && \\\n"
|
||||
" ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \\\n"
|
||||
" (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))" },
|
||||
{"mqtt", "#ifndef CURL_DISABLE_MQTT" },
|
||||
{"pop3", "#ifndef CURL_DISABLE_POP3" },
|
||||
{"pop3s", "#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3)" },
|
||||
{"rtmp", "#ifdef USE_LIBRTMP" },
|
||||
{"rtmpt", "#ifdef USE_LIBRTMP" },
|
||||
{"rtmpe", "#ifdef USE_LIBRTMP" },
|
||||
{"rtmpte", "#ifdef USE_LIBRTMP" },
|
||||
{"rtmps", "#ifdef USE_LIBRTMP" },
|
||||
{"rtmpts", "#ifdef USE_LIBRTMP" },
|
||||
{"rtsp", "#ifndef CURL_DISABLE_RTSP" },
|
||||
{"scp", "#ifdef USE_SSH" },
|
||||
{"sftp", "#ifdef USE_SSH" },
|
||||
{"smb", "#if !defined(CURL_DISABLE_SMB) && \\\n"
|
||||
" defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" },
|
||||
{"smbs", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMB) && \\\n"
|
||||
" defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" },
|
||||
{"smtp", "#ifndef CURL_DISABLE_SMTP" },
|
||||
{"smtps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMTP)" },
|
||||
{"telnet", "#ifndef CURL_DISABLE_TELNET" },
|
||||
{"tftp", "#ifndef CURL_DISABLE_TFTP" },
|
||||
{"ws",
|
||||
"#if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)" },
|
||||
{"wss", "#if !defined(CURL_DISABLE_WEBSOCKETS) && \\\n"
|
||||
" defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" },
|
||||
{ "dict", "#ifndef CURL_DISABLE_DICT" },
|
||||
{ "file", "#ifndef CURL_DISABLE_FILE" },
|
||||
{ "ftp", "#ifndef CURL_DISABLE_FTP" },
|
||||
{ "ftps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_FTP)" },
|
||||
{ "gopher", "#ifndef CURL_DISABLE_GOPHER" },
|
||||
{ "gophers", "#if defined(USE_SSL) && !defined(CURL_DISABLE_GOPHER)" },
|
||||
{ "http", "#ifndef CURL_DISABLE_HTTP" },
|
||||
{ "https", "#if defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" },
|
||||
{ "imap", "#ifndef CURL_DISABLE_IMAP" },
|
||||
{ "imaps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_IMAP)" },
|
||||
{ "ldap", "#ifndef CURL_DISABLE_LDAP" },
|
||||
{ "ldaps", "#if !defined(CURL_DISABLE_LDAP) && \\\n"
|
||||
" !defined(CURL_DISABLE_LDAPS) && \\\n"
|
||||
" ((defined(USE_OPENLDAP) && defined(USE_SSL)) || \\\n"
|
||||
" (!defined(USE_OPENLDAP) && defined(HAVE_LDAP_SSL)))" },
|
||||
{ "mqtt", "#ifndef CURL_DISABLE_MQTT" },
|
||||
{ "pop3", "#ifndef CURL_DISABLE_POP3" },
|
||||
{ "pop3s", "#if defined(USE_SSL) && !defined(CURL_DISABLE_POP3)" },
|
||||
{ "rtmp", "#ifdef USE_LIBRTMP" },
|
||||
{ "rtmpt", "#ifdef USE_LIBRTMP" },
|
||||
{ "rtmpe", "#ifdef USE_LIBRTMP" },
|
||||
{ "rtmpte", "#ifdef USE_LIBRTMP" },
|
||||
{ "rtmps", "#ifdef USE_LIBRTMP" },
|
||||
{ "rtmpts", "#ifdef USE_LIBRTMP" },
|
||||
{ "rtsp", "#ifndef CURL_DISABLE_RTSP" },
|
||||
{ "scp", "#ifdef USE_SSH" },
|
||||
{ "sftp", "#ifdef USE_SSH" },
|
||||
{ "smb", "#if !defined(CURL_DISABLE_SMB) && \\\n"
|
||||
" defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" },
|
||||
{ "smbs", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMB) && \\\n"
|
||||
" defined(USE_CURL_NTLM_CORE) && (SIZEOF_CURL_OFF_T > 4)" },
|
||||
{ "smtp", "#ifndef CURL_DISABLE_SMTP" },
|
||||
{ "smtps", "#if defined(USE_SSL) && !defined(CURL_DISABLE_SMTP)" },
|
||||
{ "telnet", "#ifndef CURL_DISABLE_TELNET" },
|
||||
{ "tftp", "#ifndef CURL_DISABLE_TFTP" },
|
||||
{ "ws",
|
||||
"#if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)" },
|
||||
{ "wss", "#if !defined(CURL_DISABLE_WEBSOCKETS) && \\\n"
|
||||
" defined(USE_SSL) && !defined(CURL_DISABLE_HTTP)" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -108,7 +108,8 @@ static void showtable(int try, int init, int shift)
|
||||
" s++;\n"
|
||||
" l--;\n"
|
||||
" }\n"
|
||||
"*/\n", init, shift);
|
||||
"*/\n",
|
||||
init, shift);
|
||||
|
||||
printf(" static const struct Curl_handler * const protocols[%d] = {", try);
|
||||
|
||||
@@ -158,10 +159,10 @@ int main(void)
|
||||
for(j = 0; j < i; j++) {
|
||||
|
||||
if(num[j] == v) {
|
||||
/*
|
||||
#if 0
|
||||
printf("NOPE: %u is a dupe (%s and %s)\n",
|
||||
v, scheme[i], scheme[j]);
|
||||
*/
|
||||
#endif
|
||||
badcombo = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user