diff --git a/src/util/def-check.pl b/src/util/def-check.pl index ccdf8ef16b3..2f48c02969a 100644 --- a/src/util/def-check.pl +++ b/src/util/def-check.pl @@ -40,12 +40,12 @@ sub open_always LINE: while (! $h->eof()) { $_ = $h->getline(); - chop; + s/(\r)?\n$//; # get calling convention info for function decls # what about function pointer typedefs? # need to verify unhandled syntax actually triggers a report, not ignored # blank lines - if (/^[ \t]*$/) { + if (/^[ \t\cZ]*$/) { next LINE; } Top: @@ -79,7 +79,7 @@ sub open_always $_ .= " "; $len1 = length; $_ .= $h->getline(); - chop if $len1 < length; + s/(\r)?\n$// if $len1 < length; goto Cloop1 if /\/\*./; } # blank lines @@ -101,7 +101,7 @@ sub open_always $_ .= "\n"; $len1 = length; $_ .= $h->getline(); - chop if $len1 < length; + s/(\r)?\n$// if $len1 < length; goto Struct1; } Semi: @@ -109,7 +109,7 @@ sub open_always $_ .= "\n"; $len1 = length; $_ .= $h->getline(); - chop if $len1 < length; + s/(\r)?\n$// if $len1 < length; s/\n/ /g; s/[ \t]+/ /g; s/^[ \t]*//; @@ -212,7 +212,7 @@ sub open_always LINE2: while (! $d->eof()) { $_ = $d->getline(); - chop; + s/[\r\n]+$//; # if (/^;/) { $printit = 0;