X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=vms%2Fvms_yfix.pl;h=33af914b25c8443cb722122819a944302172b1d0;hb=7aa5c81fb93ce6741dd5751e93d46dc87d2c1c61;hp=323a40d79296876247d15d0216265d135bcee285;hpb=4633a7c4bad06b471d9310620b7fe8ddd158cccd;p=p5sagit%2Fp5-mst-13.2.git diff --git a/vms/vms_yfix.pl b/vms/vms_yfix.pl index 323a40d..33af914 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 <) { - if (/^dEXT/) { # we've already got a fixed copy - print COUT $_,; - 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 <) { $hfixed = /globalref/ unless $hfixed; # we've already got a fixed copy