sanitize comments in helper.pl
This commit is contained in:
parent
2ea04fb782
commit
fe9a8189f8
@ -43,7 +43,7 @@ int mp_n_root_ex(const mp_int *a, mp_digit b, mp_int *c, int fast)
|
||||
ilog2 = mp_count_bits(a);
|
||||
|
||||
/*
|
||||
GCC and clang do not understand the sizeof(bla) tests and complain,
|
||||
GCC and clang do not understand the sizeof tests and complain,
|
||||
icc (the Intel compiler) seems to understand, at least it doesn't complain.
|
||||
2 of 3 say these macros are necessary, so there they are.
|
||||
*/
|
||||
|
@ -25,6 +25,12 @@ sub write_file {
|
||||
return;
|
||||
}
|
||||
|
||||
sub sanitize_comments {
|
||||
my($content) = @_;
|
||||
$content =~ s{/\*(.*?)\*/}{my $x=$1; $x =~ s/\w/x/g; "/*$x*/";}egs;
|
||||
return $content;
|
||||
}
|
||||
|
||||
sub check_source {
|
||||
my @all_files = (
|
||||
bsd_glob("makefile*"),
|
||||
@ -37,6 +43,7 @@ sub check_source {
|
||||
my $troubles = {};
|
||||
my $lineno = 1;
|
||||
my $content = read_file($file);
|
||||
$content = sanitize_comments $content;
|
||||
push @{$troubles->{crlf_line_end}}, '?' if $content =~ /\r/;
|
||||
for my $l (split /\n/, $content) {
|
||||
push @{$troubles->{merge_conflict}}, $lineno if $l =~ /^(<<<<<<<|=======|>>>>>>>)([^<=>]|$)/;
|
||||
|
Loading…
Reference in New Issue
Block a user