diff options
author | Larry Wall <lwall@scalpel.netlabs.com> | 1995-11-21 10:01:00 +1200 |
---|---|---|
committer | Larry <lwall@scalpel.netlabs.com> | 1995-11-21 10:01:00 +1200 |
commit | 4633a7c4bad06b471d9310620b7fe8ddd158cccd (patch) | |
tree | 37ebeb26a64f123784fd8fac6243b124767243b0 /vms/vms_yfix.pl | |
parent | 8e07c86ebc651fe92eb7e3b25f801f57cfb8dd6f (diff) | |
download | perl-4633a7c4bad06b471d9310620b7fe8ddd158cccd.tar.gz |
5.002 beta 1
If you're adventurous, have a look at
ftp://ftp.sems.com/pub/outgoing/perl5.0/perl5.002beta1.tar.gz
Many thanks to Andy for doing the integration.
Obviously, if you consult the bugs database, you'll note there are
still plenty of buglets that need fixing, and several enhancements that
I've intended to put in still haven't made it in (Hi, Tim and Ilya).
But I think it'll be pretty stable. And you can start to fiddle around
with prototypes (which are, of course, still totally undocumented).
Packrats, don't worry too much about readvertising this widely.
Nowadays we're on a T1 here, so our bandwidth is okay.
Have the appropriate amount of jollity.
Larry
Diffstat (limited to 'vms/vms_yfix.pl')
-rw-r--r-- | vms/vms_yfix.pl | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/vms/vms_yfix.pl b/vms/vms_yfix.pl new file mode 100644 index 0000000000..323a40d792 --- /dev/null +++ b/vms/vms_yfix.pl @@ -0,0 +1,47 @@ +# This script takes the output produced from perly.y by byacc and +# the perly.fixer shell script (i.e. the perly.c and perly.h built +# for Unix systems) and patches them to produce copies containing +# appropriate declarations for VMS handling of global symbols. +# +# If it finds that the input files are already patches for VMS, +# it just copies the input to the output. +# +# Revised 26-May-1995 by Charles Bailey bailey@genetics.upenn.edu + +($cinfile,$hinfile,$coutfile,$houtfile) = @ARGV; + +open C,$cinfile or die "Can't read $cinfile: $!\n"; +open COUT, ">$coutfile" or die "Can't create $coutfile: $!\n"; +while (<C>) { + if (/^dEXT/) { # we've already got a fixed copy + print COUT $_,<C>; + last; + } + # add the dEXT tag to definitions of global vars, so we'll insert + # a globaldef when perly.c is compiled + s/^(short|int|YYSTYPE|char \*)\s*yy/dEXT $1 yy/; + print COUT; +} +close C; +close COUT; + +open H,$hinfile or die "Can't read $hinfile: $!\n"; +open HOUT, ">$houtfile" or die "Can't create $houtfile: $!\n"; +$hfixed = 0; # keep -w happy +while (<H>) { + $hfixed = /globalref/ unless $hfixed; # we've already got a fixed copy + next if /^extern YYSTYPE yylval/; # we've got a Unix version, and this + # is what we want to replace + print HOUT; +} +close H; + +print HOUT <<'EODECL' unless $hfixed; +#ifndef vax11c + extern YYSTYPE yylval; +#else + globalref YYSTYPE yylval; +#endif +EODECL + +close HOUT; |