X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=vms%2Fgen_shrfls.pl;h=e451e1826b6d86e3713b1e624e47a16377976f61;hb=3e3baf6d63945cb64e829d6e5c70a7d00f3d3d03;hp=cb4f7dd1f1f463bbb5fba4bf5ad6828d39c73a87;hpb=3458556dd685b1767b760a72bd2e9007b5c4575e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index cb4f7dd..e451e18 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -145,7 +145,8 @@ sub scan_var { my($const) = $line =~ /^EXTCONST/; print "\tchecking for global variable\n" if $debug > 1; - $line =~ s/INIT\(.*\)//; + $line =~ s/\s*EXT/EXT/; + $line =~ s/INIT\s*\(.*\)//; $line =~ s/\[.*//; $line =~ s/=.*//; $line =~ s/\W*;?\s*$//; @@ -156,7 +157,7 @@ sub scan_var { else { $vars{$1}++; } } if ($isvaxc) { - my($type) = $line =~ /^EXT\w*\s+(\w+)/; + my($type) = $line =~ /^\s*EXT\w*\s+(\w+)/; print "\tchecking for use of enum (type is \"$type\")\n" if $debug > 2; if ($type eq 'expectation') { $used_expectation_enum++; @@ -194,18 +195,18 @@ LINE: while () { while (/^#.*vmsish\.h/i .. /^#.*perl\.h/i) { while (/__VMS_PROTOTYPES__/i .. /__VMS_SEPYTOTORP__/i) { print "vms_proto>> $_" if $debug > 2; - if (/^EXT/) { &scan_var($_); } + if (/^\s*EXT/) { &scan_var($_); } else { &scan_func($_); } last LINE unless $_ = ; } print "vmsish.h>> $_" if $debug > 2; - if (/^EXT/) { &scan_var($_); } + if (/^\s*EXT/) { &scan_var($_); } last LINE unless $_ = ; } while (/^#.*opcode\.h/i .. /^#.*perl\.h/i) { print "opcode.h>> $_" if $debug > 2; if (/^OP \*\s/) { &scan_func($_); } - if (/^EXT/) { &scan_var($_); } + if (/^\s*EXT/) { &scan_var($_); } if (/^\s+OP_/) { &scan_enum($_); } last LINE unless $_ = ; } @@ -216,12 +217,12 @@ LINE: while () { } while (/^#.*proto\.h/i .. /^#.*perl\.h/i) { print "proto.h>> $_" if $debug > 2; - if (/^EXT/) { &scan_var($_); } + if (/\s*^EXT/) { &scan_var($_); } else { &scan_func($_); } last LINE unless $_ = ; } print $_ if $debug > 3 && ($debug > 5 || length($_)); - if (/^EXT/) { &scan_var($_); } + if (/^\s*EXT/) { &scan_var($_); } } close CPP;