diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-02-02 18:52:27 -0800 |
---|---|---|
committer | Larry Wall <lwall@sems.com> | 1996-02-02 18:52:27 -0800 |
commit | c07a80fdfe3926b5eb0585b674aa5d1f57b32ade (patch) | |
tree | 6d56135571eb9ea6635748469bdaf72ad481247a /vms/gen_shrfls.pl | |
parent | 91b7def858c29dac014df40946a128c06b3aa2ed (diff) | |
download | perl-c07a80fdfe3926b5eb0585b674aa5d1f57b32ade.tar.gz |
perl5.002beta3
[editor's note: no patch file was found for this release, so no
fine-grained changes]
I can't find the password for our ftp server, so I had to drop it into
ftp://ftp.sems.com/pub/incoming/perl5.002b3.tar.gz, which is a drop
directory you can't ls.
The current plan is that Andy is gonna whack on this a little more, and
then release a gamma in a few days when he's happy with it. So don't get
carried away. This is now *late* beta.
In other words, have less than the appropriate amount of fun. :-)
Larry
Diffstat (limited to 'vms/gen_shrfls.pl')
-rw-r--r-- | vms/gen_shrfls.pl | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index 286695feb3..e2f5b287e3 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -119,8 +119,8 @@ sub scan_enum { $line =~ s/,?\s*\n?$//; print "\tfiltered to \\$line\\\n" if $debug > 1; if ($line =~ /(\w+)$/) { - print "\tvar name is \\$1\\\n" if $debug > 1; - $vars{$1}++; + print "\tconstant name is \\$1\\\n" if $debug > 1; + $enums{$1}++; } } @@ -152,6 +152,7 @@ sub scan_func { } } +$used_expectation_enum = $used_opcode_enum = 0; # avoid warnings if ($docc) { open(CPP,"${cc_cmd}/NoObj/PreProc=Sys\$Output ${dir}perl.h|") or die "$0: Can't preprocess ${dir}perl.h: $!\n"; @@ -190,7 +191,19 @@ LINE: while (<CPP>) { last LINE unless $_ = <CPP>; } print $_ if $debug > 3; - if (/^EXT/) { &scan_var($_); } + if (($type) = /^EXT\s+(\w+)/) { + if ($isvaxc) { + if ($type eq 'expectation') { + $used_expectation_enum++; + print "\tsaw global use of enum \"expectation\"\n" if $debug > 1; + } + if ($type eq 'opcode') { + $used_opcode_enum++; + print "\tsaw global use of enum \"opcode\"\n" if $debug > 1; + } + } + &scan_var($_); + } } close CPP; while (<DATA>) { @@ -208,6 +221,22 @@ foreach (split /\s+/, $extnames) { print "Adding boot_$pkgname to \%fcns (for extension $_)\n" if $debug; } +# If we're using VAXC, fold in the names of the constants for enums +# we've seen as the type of global vars. +if ($isvaxc) { + foreach (keys %enums) { + if (/^OP/) { + $vars{$_}++ if $used_opcode_enum; + next; + } + if (/^X/) { + $vars{$_}++ if $used_expectation_enum; + next; + } + print STDERR "Unrecognized enum constant \"$_\" ignored\n"; + } +} + # Eventually, we'll check against existing copies here, so we can add new # symbols to an existing options file in an upwardly-compatible manner. |