summaryrefslogtreecommitdiff
path: root/vms/vms_yfix.pl
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1996-02-02 18:52:27 -0800
committerLarry Wall <lwall@sems.com>1996-02-02 18:52:27 -0800
commitc07a80fdfe3926b5eb0585b674aa5d1f57b32ade (patch)
tree6d56135571eb9ea6635748469bdaf72ad481247a /vms/vms_yfix.pl
parent91b7def858c29dac014df40946a128c06b3aa2ed (diff)
downloadperl-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/vms_yfix.pl')
-rw-r--r--vms/vms_yfix.pl23
1 files changed, 16 insertions, 7 deletions
diff --git a/vms/vms_yfix.pl b/vms/vms_yfix.pl
index 323a40d792..33af914b25 100644
--- a/vms/vms_yfix.pl
+++ b/vms/vms_yfix.pl
@@ -6,20 +6,26 @@
# 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
+# Revised 29-Jan-1996 by Charles Bailey bailey@genetics.upenn.edu
+
+$VERSION = '1.1';
($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";
+print COUT <<EOH;
+/* Postprocessed by vms_yfix.pl $VERSION to add VMS declarations of globals */
+EOH
while (<C>) {
- if (/^dEXT/) { # we've already got a fixed copy
- print COUT $_,<C>;
- last;
+ # "y.tab.c" is illegal as a VMS filename; DECC 5.2/VAX preprocessor
+ # doesn't like this.
+ if ( s/^#line\s+(\d+)\s+"y.tab.c"/#line $1 "y_tab.c"/ ) { 1; }
+ else {
+ # 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/;
}
- # 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;
@@ -27,6 +33,9 @@ close COUT;
open H,$hinfile or die "Can't read $hinfile: $!\n";
open HOUT, ">$houtfile" or die "Can't create $houtfile: $!\n";
+print HOUT <<EOH;
+/* Postprocessed by vms_yfix.pl $VERSION to add VMS declarations of globals */
+EOH
$hfixed = 0; # keep -w happy
while (<H>) {
$hfixed = /globalref/ unless $hfixed; # we've already got a fixed copy