File: count_80_col.pl

package info (click to toggle)
samba 2%3A3.2.5-4lenny15
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 124,704 kB
  • ctags: 69,181
  • sloc: ansic: 564,153; xml: 219,271; sh: 11,039; perl: 4,458; makefile: 4,301; python: 1,975; cpp: 1,224; exp: 1,147; yacc: 881; awk: 557; csh: 58; sed: 45
file content (16 lines) | stat: -rwxr-xr-x 253 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl -w

open( INFILE, "$ARGV[0]" ) || die $@;

$count = 0;
while ( <INFILE> ) {
	next if ($_ =~ /^#define/);
	$count++ if (length($_) > 80);
}

close( INFILE );
print "$ARGV[0]: $count lines > 80 characters\n" if ($count > 0);

exit( 0 );