Mercurial > hg > GearsTemplate
changeset 195:bd96dffaa76a
generate_stub
author | mir3636 |
---|---|
date | Fri, 16 Dec 2016 22:04:05 +0900 |
parents | 081607dcf893 |
children | de7c0bbfc91f |
files | src/parallel_execution/generate_stub.pl |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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