Mercurial > hg > CbC > CbC_xv6
changeset 359:87a28b02c88f
bump generate_stub.pl
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 23 Jun 2020 12:17:25 +0900 |
parents | d2389a757323 |
children | 3d7e1c9a852e |
files | src/gearsTools/generate_stub.pl |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gearsTools/generate_stub.pl Mon Jun 15 18:54:23 2020 +0900 +++ b/src/gearsTools/generate_stub.pl Tue Jun 23 12:17:25 2020 +0900 @@ -203,10 +203,10 @@ open my $fd,"<",$filename or die("can't open $filename $!"); my ($name,$impln); while (<$fd>) { - if (/^(\w+)(\*)+ create(\w+)\(/) { + if (/^(\w+)\s*(\*)+ create(\w+)\(/) { $name = $1; $impln = $3; - } elsif(/^typedef struct (.*)<.*>\s*{/) { + } elsif(/^typedef struct (\w+)\s*<.*>\s*{/) { $name = $1; } if (defined $name) { @@ -402,7 +402,7 @@ while (<$in>) { if (! $inTypedef && ! $inStub && ! $inMain) { - if (/^typedef struct (\w+) \{/) { + if (/^typedef struct (\w+)\s*\{/) { $inTypedef = 1; } elsif (/^int main\((.*)\) \{/) { $inMain = 1;