# HG changeset patch # User mir3636 # Date 1481893445 -32400 # Node ID bd96dffaa76a90731783278fbec3cbcba4703a57 # Parent 081607dcf89327905886436158faa58b7158b457 generate_stub diff -r 081607dcf893 -r bd96dffaa76a src/parallel_execution/generate_stub.pl --- a/src/parallel_execution/generate_stub.pl Fri Dec 16 19:40:42 2016 +0900 +++ b/src/parallel_execution/generate_stub.pl Fri Dec 16 22:04:05 2016 +0900 @@ -33,6 +33,12 @@ next; } $dataGear{$name} .= $_; + if (/(\w+);$/ and !/^} (\w+)/) { + $var{$name} .= $1 . "\n"; + $tmp = $`; + $tmp =~ s/^\s*//; + $type{$name} .= $tmp . "\n"; + } if (/^}/) { $inTypedef = 0; } @@ -45,6 +51,15 @@ print $fd $dataGear{$name},"\n"; } print $fd "\n"; + + open my $fd,">","d/stub.h" or die("can't open d/stub.h $!"); + for my $name ( sort keys %dataGear ) { + print $fd $var{$name},"\n"; + } + for my $name ( sort keys %dataGear ) { + print $fd $type{$name},"\n"; + } + print $fd "\n"; } # end