tidy-up: miscellaneous

- tool_bname: scope an include.
- `endif` comments.
- Markdown fixes.
- comment tidy-ups.
- whitespace, newlines, indent.

Closes #20309
This commit is contained in:
Viktor Szakats 2026-01-02 01:34:05 +01:00
parent 62ba3604dc
commit ac6264366f
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
98 changed files with 829 additions and 863 deletions

View file

@ -12,13 +12,13 @@ use Cwd 'abs_path';
my @files;
if(system('git rev-parse --is-inside-work-tree >/dev/null 2>&1') == 0) {
@files = `git ls-files '*.[ch]'`;
@files = `git ls-files '*.[ch]'`;
}
else {
find(sub { if(/\.[ch]$/) { push(@files, $File::Find::name) } }, ('.'));
find(sub { if(/\.[ch]$/) { push(@files, $File::Find::name) } }, ('.'));
}
if(@ARGV) {
find(sub { if(/\.[ch]$/) { push(@files, $File::Find::name) } }, @ARGV);
find(sub { if(/\.[ch]$/) { push(@files, $File::Find::name) } }, @ARGV);
}
@files = grep !/\/CMakeFiles\//, @files;

View file

@ -80,16 +80,16 @@ sed -f ./docs/THANKS-filter | \
sort -fu | \
awk '
{
if(length($0)) {
num++;
n = sprintf("%s%s%s,", n, length(n)?" ":"", $0);
#print n;
if(length(n) > 77) {
printf(" %s\n", p);
n=sprintf("%s,", $0);
}
p=n;
}
if(length($0)) {
num++;
n = sprintf("%s%s%s,", n, length(n)?" ":"", $0);
#print n;
if(length(n) > 77) {
printf(" %s\n", p);
n=sprintf("%s,", $0);
}
p=n;
}
}
END {

View file

@ -1338,7 +1338,8 @@ my $dir = ".";
my $include = "../../include";
my $cmd = shift @ARGV || '';
check:
check:
if($cmd eq "-d") {
# specifies source directory
$dir = shift @ARGV;

View file

@ -51,8 +51,8 @@ eval "require LWP::UserAgent";
my %urls = (
'autoland' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/autoland/security/nss/lib/ckfw/builtins/certdata.txt',
'beta' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/beta/security/nss/lib/ckfw/builtins/certdata.txt',
'release' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/release/security/nss/lib/ckfw/builtins/certdata.txt',
'beta' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/beta/security/nss/lib/ckfw/builtins/certdata.txt',
'release' => 'https://raw.githubusercontent.com/mozilla-firefox/firefox/refs/heads/release/security/nss/lib/ckfw/builtins/certdata.txt',
);
$opt_d = 'release';
@ -150,12 +150,12 @@ sub warning_message() {
if($opt_d =~ m/^risk$/i) { # Long Form Warning and Exit
print "Warning: Use of this script may pose some risk:\n";
print "\n";
print " 1) If you use HTTP URLs they are subject to a man in the middle attack\n";
print " 2) Default to 'release', but more recent updates may be found in other trees\n";
print " 3) certdata.txt file format may change, lag time to update this script\n";
print " 4) Generally unwise to blindly trust CAs without manual review & verification\n";
print " 5) Mozilla apps use additional security checks are not represented in certdata\n";
print " 6) Use of this script will make a security engineer grind his teeth and\n";
print " 1. If you use HTTP URLs they are subject to a man in the middle attack\n";
print " 2. Default to 'release', but more recent updates may be found in other trees\n";
print " 3. certdata.txt file format may change, lag time to update this script\n";
print " 4. Generally unwise to blindly trust CAs without manual review & verification\n";
print " 5. Mozilla apps use additional security checks are not represented in certdata\n";
print " 6. Use of this script will make a security engineer grind his teeth and\n";
print " swear at you. ;)\n";
exit;
} else { # Short Form Warning