better usage of find()

This commit is contained in:
Steffen Jaeckel 2017-06-20 10:01:47 +02:00
parent 5246c7de64
commit 18c00ddcd6

View File

@ -135,9 +135,7 @@ MARKER
/* commit time: $Format:%ai$ */
MARKER
my @all_files;
find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'src');
find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'demos');
find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'tests');
find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'demos', 'src', 'tests');
for my $f (@all_files) {
my $txt = read_file($f);
if ($txt !~ /^\Q$first_comment\E/s) {