The R Project SVN R

Rev

Rev 22954 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22954 Rev 22991
Line 35... Line 35...
35
use Text::Wrap;
35
use Text::Wrap;
36
 
36
 
37
## don't buffer output
37
## don't buffer output
38
$| = 1;
38
$| = 1;
39
 
39
 
40
my $revision = ' $Revision: 1.126 $ ';
40
my $revision = ' $Revision: 1.127 $ ';
41
my $version;
41
my $version;
42
my $name;
42
my $name;
43
$revision =~ / ([\d\.]*) /;
43
$revision =~ / ([\d\.]*) /;
44
$version = $1;
44
$version = $1;
45
($name = $0) =~ s|.*/||;
45
($name = $0) =~ s|.*/||;
Line 1109... Line 1109...
1109
	}
1109
	}
1110
    }
1110
    }
1111
 
1111
 
1112
    ## Check C sources/headers for CRLF line endings.
1112
    ## Check C sources/headers for CRLF line endings.
1113
 
1113
 
-
 
1114
    ## <FIXME>
-
 
1115
    ## Does ISO C really require LF line endings?  (Reference?)
-
 
1116
    ## We definitely know that Solaris cc will not accept CRLF or CR
-
 
1117
    ## line endings.
-
 
1118
    ## Note that we currently only check the CRLF part.
-
 
1119
    ## </FIXME>
-
 
1120
 
1114
    if(-d "src") {
1121
    if(-d "src") {
1115
	$log->checking("for CRLF line endings in C sources/headers");
1122
	$log->checking("for CRLF line endings in C sources/headers");
1116
	my @src_files = &list_files_with_exts("src", "[ch]");
1123
	my @src_files = &list_files_with_exts("src", "[ch]");
1117
	my @bad_files = ();
1124
	my @bad_files = ();
1118
	foreach my $file (@src_files) {
1125
	foreach my $file (@src_files) {
Line 1131... Line 1138...
1131
	if($#bad_files >= 0) {
1138
	if($#bad_files >= 0) {
1132
	    $log->warning();
1139
	    $log->warning();
1133
	    $log->print("Found the following C sources/headers with " .
1140
	    $log->print("Found the following C sources/headers with " .
1134
			"CRLF line endings:\n");
1141
			"CRLF line endings:\n");
1135
	    $log->print("  " . join("\n  ", @bad_files) . "\n");
1142
	    $log->print("  " . join("\n  ", @bad_files) . "\n");
1136
	    $log->print("ISO C requires CR line endings.\n");
1143
	    $log->print("ISO C requires LF line endings.\n");
1137
	}
1144
	}
1138
	else {
1145
	else {
1139
	    $log->result("OK");
1146
	    $log->result("OK");
1140
	}
1147
	}
1141
    }
1148
    }