Lines Matching +full:0 +full:- +full:9 +full:a +full:- +full:z
12 # top-level directory.
14 # Usage: scripts/clean-header-guards.pl [OPTION]... [FILE]...
15 # -c CC Use a compiler other than cc
16 # -n Suppress actual cleanup
17 # -v Show which files are cleaned up, and which are skipped
20 # - Header files without a recognizable header guard are skipped.
21 # - Clean up any untidy header guards in-place. Warn if the cleanup
24 # - Warn about duplicate header guard symbols. To make full use of
26 # - Warn when preprocessing a header with its guard symbol defined
28 # "cc -E -DGUARD_H -c -P -", and fed the test program on stdin.
35 my $exclude = qr,^(include/standard-headers/|linux-headers/
36 |pc-bios/|tests/tcg/|tests/multiboot/),x;
44 our $opt_n = 0;
45 our $opt_v = 0;
83 $fname =~ tr/a-z/A-Z/;
84 $fname =~ tr/A-Z0-9/_/cs;
91 open(my $pipe, "-|", "$opt_c -E -D$guard -c -P - <$fname")
106 $text =~ m,\A(\s*\n|\s*//\N*\n|\s*/\*.*?\*/\s*\n)*|,sg;
123 ([A-Za-z0-9_]+)/x) {
128 unless ($line2 =~ /^\s*\#\s*define\s+([A-Za-z0-9_]+)/) {
139 unless ($body =~ m,\A((.*\n)*)
142 \Z,x) {
155 $guard =~ tr/a-z/A-Z/
158 and push @issues, "is a reserved identifier";
161 unless ($guard =~ /^[A-Z][A-Z0-9_]*_H/) {
168 unless ($guard =~ /\Q$exp\E\Z/) {
191 $newl3 =~ s,\Z, /* $guard */, if $endif_comment;
193 $pre =~ s/\n*\Z/\n\n/ if $pre =~ /\N/;
194 $body =~ s/\A\n*/\n/;
211 print STDERR " $old_guard{$guard} -> $guard\n";
214 print STDERR " git grep -Ew '", join("|", sort values %old_guard),