Added warning output if script failed to extract a comment block from
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 30 Jul 2007 03:48:41 +0000 (03:48 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 30 Jul 2007 03:48:41 +0000 (03:48 +0000)
driver.

scripts/dump_doc

index f790a901467a4066d58141ec274ccbe1d91287b5..27af5429222d973f0bcb878141f99db994f9b340 100755 (executable)
@@ -1,6 +1,9 @@
 #!/usr/bin/perl
 # vi: set ts=4:
 
+use strict;
+use warnings;
+
 @ARGV = ('-') unless @ARGV;
 
 $ARGV=shift @ARGV;
@@ -9,7 +12,8 @@ if(!open(FILE,$ARGV)){
        exit 1;
 }
 
-$go=0;
+my $nothing_found = 1;
+my $go=0;
 while(<FILE>) {
        if( m/^Driver: / ){
                $go=1;
@@ -23,6 +27,11 @@ while(<FILE>) {
        if( $go ){
                #chomp;
                print $_;
+               $nothing_found = 0;
        }
 }
+if($nothing_found)
+{
+       warn "No Comedi documentation comment block found in $ARGV\n";
+}