File: dump_doc

package info (click to toggle)
comedi 0.7.76%2B20080817cvs-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,660 kB
  • ctags: 14,259
  • sloc: ansic: 104,304; sh: 1,417; makefile: 625; perl: 457
file content (37 lines) | stat: -rwxr-xr-x 468 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl
# vi: set ts=4:

use strict;
use warnings;

@ARGV = ('-') unless @ARGV;

$ARGV=shift @ARGV;
if(!open(FILE,$ARGV)){
	warn "Can't open $ARGV: $!\n";
	exit 1;
}

my $nothing_found = 1;
my $go=0;
while(<FILE>) {
	if( m/^Driver: / ){
		$go=1;
	}
	if( m/\*\// ){
		if($go){
			print "\n\n\n";
		}
		$go=0;
	}
	if( $go ){
		#chomp;
		print $_;
		$nothing_found = 0;
	}
}
if($nothing_found)
{
	warn "No Comedi documentation comment block found in $ARGV\n";
}