(file) Return to clean-nroff.pl CVS log (file) (dir) Up to [RizwankCVS] / testProject / docs

 1 rizwank 1.1 #!/usr/local/bin/perl -w
 2             
 3             sub skip_lines {
 4                 ($count) = @_;
 5             
 6                 while ($count > 0) {
 7             	if (!<>) {
 8             	    last;
 9             	}
10             	$count--;
11                }
12                 if ($count > 0) {
13             	return 0;
14                 }
15                 return 1;
16             }
17             
18             sub print_lines {
19                 ($count) = @_;
20             
21                 while ($count > 0)  {
22 rizwank 1.1 	$line = <>;
23             	if (!$line) {
24             	    last;
25             	}
26             	print $line;
27             	$count--;
28                 }
29             
30                 if ($count > 0) {
31             	return 0;
32                 }
33                 return 1;
34             }
35             
36             # Header.
37             print_lines(7);
38             
39             # Process file.
40             while (1) {
41                 if (!print_lines(52) || !skip_lines(14)) {
42             	last;
43 rizwank 1.1     }
44             }

Rizwan Kassim
Powered by
ViewCVS 0.9.2