The version of Perl included in git-bash does not translate line
endings or filter out the end-of-file marker when reading from files
in text mode. Adjust def-check.pl to work in this environment.
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:
$_ .= " ";
$len1 = length;
$_ .= $h->getline();
- chop if $len1 < length;
+ s/(\r)?\n$// if $len1 < length;
goto Cloop1 if /\/\*./;
}
# blank lines
$_ .= "\n";
$len1 = length;
$_ .= $h->getline();
- chop if $len1 < length;
+ s/(\r)?\n$// if $len1 < length;
goto Struct1;
}
Semi:
$_ .= "\n";
$len1 = length;
$_ .= $h->getline();
- chop if $len1 < length;
+ s/(\r)?\n$// if $len1 < length;
s/\n/ /g;
s/[ \t]+/ /g;
s/^[ \t]*//;
LINE2:
while (! $d->eof()) {
$_ = $d->getline();
- chop;
+ s/[\r\n]+$//;
#
if (/^;/) {
$printit = 0;