Allow "*" (optionally surrounded by a space on each side) to precede
authorIan Abbott <abbotti@mev.co.uk>
Mon, 14 Jun 2010 10:34:38 +0000 (10:34 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Mon, 14 Jun 2010 10:34:38 +0000 (10:34 +0000)
"Driver:" and strip this from all the lines in the comment block.

scripts/dump_doc

index 27af5429222d973f0bcb878141f99db994f9b340..711cbc666d3ef8e1c689d17556f24c5eee7fa555 100755 (executable)
@@ -14,9 +14,13 @@ if(!open(FILE,$ARGV)){
 
 my $nothing_found = 1;
 my $go=0;
+my $strip=0;
 while(<FILE>) {
-       if( m/^Driver: / ){
+       if( m/^( ?\* ?)?Driver: / ){
                $go=1;
+               if( m/^ ?\*/ ){
+                       $strip=1;
+               }
        }
        if( m/\*\// ){
                if($go){
@@ -26,6 +30,9 @@ while(<FILE>) {
        }
        if( $go ){
                #chomp;
+               if( $strip ){
+                       s/^ ?\* ?//;
+               }
                print $_;
                $nothing_found = 0;
        }