summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
Diffstat (limited to 'vms')
-rw-r--r--vms/Makefile129
-rw-r--r--vms/config.vms29
-rw-r--r--vms/descrip.mms154
-rw-r--r--vms/ext/MM_VMS.pm1249
-rw-r--r--vms/gen_shrfls.pl97
-rw-r--r--vms/perlshr.c13
-rw-r--r--vms/perlvms.pod6
-rw-r--r--vms/perly_c.vms2224
-rw-r--r--vms/perly_h.vms68
-rw-r--r--vms/sockadapt.c40
-rw-r--r--vms/sockadapt.h83
-rw-r--r--vms/test.com10
-rw-r--r--vms/vms.c202
-rw-r--r--vms/vms_yfix.pl47
-rw-r--r--vms/vmsish.h17
15 files changed, 3388 insertions, 980 deletions
diff --git a/vms/Makefile b/vms/Makefile
index 9a953106a6..5c6deb13e8 100644
--- a/vms/Makefile
+++ b/vms/Makefile
@@ -3,7 +3,7 @@
#> conversion process. For more information, see mms2make.pl
#>
# Makefile. for perl5 on VMS
-# Last revised 10-Mar-1995 by Charles Bailey bailey@genetics.upenn.edu
+# Last revised 5-Jun-1995 by Charles Bailey bailey@genetics.upenn.edu
#
#
# tidy -- purge files generated by executing this file
@@ -26,8 +26,10 @@ OLB = .olb
# File type to use for executable images
E = .exe
-ARCHCORE = [.lib.VMS_VAX.CORE]
-ARCHAUTO = [.lib.auto.VMS_VAX]
+ARCH = VMS_VAX
+ARCHDIR = [.lib.$(ARCH)]
+ARCHCORE = [.lib.$(ARCH).CORE]
+ARCHAUTO = [.lib.$(ARCH).auto]
# -fno-builtin avoids bug in gcc up to version 2.6.2 which can destroy
@@ -38,6 +40,11 @@ ARCHAUTO = [.lib.auto.VMS_VAX]
XTRAOBJS =
LIBS1 = $(XTRAOBJS)
DBGSPECFLAGS = /Show=(Source,Include,Expansion)
+# Some versions of DECCRTL on AXP have a bug in chdir() which causes the change
+# to persist after the image exits, even when this was not requested, iff
+# SYSNAM is enabled. This is fixed in CSC Patch # AXPACRT04_061, but turning
+# off SYSNAM for the MM[SK] subprocess doesn't hurt anything, so we do it
+# just in case.
XTRACCFLAGS = /Include=[]/Object=$(O)
XTRADEF =
LIBS2 = sys$$Share:VAXCRTL.Exe/Shareable
@@ -57,6 +64,7 @@ SOCKH =
SOCKCLIS =
SOCKHLIS =
SOCKOBJ =
+SOCKPM =
# C preprocessor manifest "DEBUGGING" ==> perl -D, not the VMS debugger
CFLAGS = /Define=(DEBUGGING$(SOCKDEF)$(XTRADEF))$(XTRACCFLAGS)$(DBGCCFLAGS)
@@ -69,15 +77,23 @@ NOOP = continue
# Macros to invoke a copy of miniperl during the build. Targets which
# are built using these macros should depend on $(MINIPERL_EXE)
MINIPERL_EXE = sys$$Disk:[]miniperl$(E)
-MINIPERL = MCR $(MINIPERL_EXE)
+MINIPERL = MCR $(MINIPERL_EXE) "-Ilib"
XSUBPP = $(MINIPERL) [.lib.extutils]xsubpp
+# Macro to invoke a preexisting copy of Perl. This is used to regenerate
+# some header files when rebuilding Perl, but premade versions are provided
+# in the distribution, so it's OK if this doesn't work; it's here to make
+# life easier for those who modify Perl and rebuild it.
+INSTPERL = perl
# Space-separated list of "static" extensions to build into perlshr (case counts).
-EXT = DynaLoader
+MYEXT = DynaLoader
# object files for these extensions; the trailing comma is required if
# there are any object files specified
# These must be built separately, or you must add rules below to build them
-extobj = [.ext.dynaloader]dl_vms$(O),
+myextobj = [.ext.dynaloader]dl_vms$(O),
+EXT = $(MYEXT)
+extobj = $(myextobj)
+
#### End of system configuration section. ####
@@ -130,7 +146,7 @@ CRTLOPTS =,$(CRTL)/Options
all : base extras archcorefiles preplibrary
@ $(NOOP)
-base : miniperl$(E) perl$(E) [.lib]Config.pm
+base : miniperl$(E) perl$(E) [.lib.$(ARCH)]Config.pm
@ $(NOOP)
extras : [.lib]DynaLoader.pm [.lib.VMS]Filespec.pm [.lib.extutils]MM_VMS.pm
@ $(NOOP)
@@ -167,6 +183,10 @@ $(DBG)perlshr_xtras.ts : perl.h config.h vmsish.h proto.h [.vms]gen_shrfls.pl $(
@ If f$$Search("$(DBG)perlshr_xtras.ts").nes."" Then Delete/NoLog/NoConfirm $(DBG)perlshr_xtras.ts;*
@ Copy NLA0: $(DBG)perlshr_xtras.ts
+[.lib.$(ARCH)]config.pm : [.lib]config.pm
+ Create/Directory [.lib.$(ARCH)]
+ Copy [.lib]config.pm $@
+
[.lib]config.pm : [.vms]config.vms [.vms]genconfig.pl $(MINIPERL_EXE)
$(MINIPERL) [.VMS]GenConfig.Pl cc=$(CC)$(CFLAGS) ldflags=$(LINKFLAGS)
$(MINIPERL) ConfigPM.
@@ -187,28 +207,38 @@ $(DBG)perlshr_xtras.ts : perl.h config.h vmsish.h proto.h [.vms]gen_shrfls.pl $(
[.lib.ExtUtils]MM_VMS.pm : [.vms.ext]MM_VMS.pm
Copy/Log/NoConfirm [.vms.ext]MM_VMS.pm $@
-preplibrary : $(MINIPERL_EXE) [.lib]DynaLoader.pm [.lib.VMS]Filespec.pm [.lib.ExtUtils]MM_VMS.pm
+preplibrary : $(MINIPERL_EXE) [.lib]DynaLoader.pm [.lib.VMS]Filespec.pm [.lib.ExtUtils]MM_VMS.pm $(SOCKPM)
@ Write sys$$Output "Autosplitting Perl library . . ."
@ Create/Directory [.lib.auto]
@ $(MINIPERL) "-Ilib" -e "use AutoSplit; autosplit_lib_modules(@ARGV)" [.lib]*.pm [.lib.*]*.pm
-#opcode.h : opcode.pl $(MINIPERL_EXE)
-# $(MINIPERL) opcode.pl
+opcode.h : opcode.pl
+ @ Write sys$$Output "Don't worry if this fails."
+ - $(INSTPERL) opcode.pl
+keywords.h : keywords.pl
+ @ Write sys$$Output "Don't worry if this fails."
+ - $(INSTPERL) keywords.pl
+embed.h : global.sym interp.sym
+ @ Write sys$$Output "Don't worry if this fails."
+ - $(INSTPERL) [.vms]embed_h.pl
-perly.h : perly.c # Quick and dirty 'touch'
- Copy/Log/NoConfirm perly.h; ;
- Delete/Log/NoConfirm perly.h;-1
+# VMS uses modified perly.[ch] with tags for globaldefs if using DEC compiler
+perly.c : [.vms]perly_c.vms
+ Copy/Log [.vms]perly_c.vms $@
+perly.h : [.vms]perly_h.vms
+ Copy/Log [.vms]perly_h.vms $@
# I now supply perly.c with the kits, so the following section is
# commented out if you don't have byacc.
-
+# Altered for VMS by Charles Bailey bailey@genetics.upenn.edu
# perly.c:
-# @ echo 'Expect' 80 shift/reduce and 62 reduce/reduce conflicts
+# @ Write Sys$Output 'Expect' 80 shift/reduce and 62 reduce/reduce conflicts
# \$(BYACC) -d perly.y
+# Has to be done by hand or by POSIX shell under VMS
# sh \$(shellflags) ./perly.fixer y.tab.c perly.c
-# mv y.tab.h perly.h
-# echo 'extern YYSTYPE yylval;' >>perly.h
+# rename y.tab.h perly.h
+# $(INSTPERL) [.vms]vms_yfix.pl perly.c perly.h [.vms]perly_c.vms [.vms]perly_h.vms
perly$(O) : perly.c, perly.h, $(h)
$(CC) $(CFLAGS) perly.c
@@ -328,6 +358,7 @@ av$(O) : mg.h
av$(O) : op.h
av$(O) : opcode.h
av$(O) : perl.h
+av$(O) : perly.h
av$(O) : pp.h
av$(O) : proto.h
av$(O) : regexp.h
@@ -349,6 +380,7 @@ scope$(O) : mg.h
scope$(O) : op.h
scope$(O) : opcode.h
scope$(O) : perl.h
+scope$(O) : perly.h
scope$(O) : pp.h
scope$(O) : proto.h
scope$(O) : regexp.h
@@ -372,6 +404,7 @@ op$(O) : op.c
op$(O) : op.h
op$(O) : opcode.h
op$(O) : perl.h
+op$(O) : perly.h
op$(O) : pp.h
op$(O) : proto.h
op$(O) : regexp.h
@@ -394,6 +427,7 @@ doop$(O) : mg.h
doop$(O) : op.h
doop$(O) : opcode.h
doop$(O) : perl.h
+doop$(O) : perly.h
doop$(O) : pp.h
doop$(O) : proto.h
doop$(O) : regexp.h
@@ -416,6 +450,7 @@ doio$(O) : mg.h
doio$(O) : op.h
doio$(O) : opcode.h
doio$(O) : perl.h
+doio$(O) : perly.h
doio$(O) : pp.h
doio$(O) : proto.h
doio$(O) : regexp.h
@@ -438,6 +473,7 @@ dump$(O) : mg.h
dump$(O) : op.h
dump$(O) : opcode.h
dump$(O) : perl.h
+dump$(O) : perly.h
dump$(O) : pp.h
dump$(O) : proto.h
dump$(O) : regexp.h
@@ -460,6 +496,7 @@ hv$(O) : mg.h
hv$(O) : op.h
hv$(O) : opcode.h
hv$(O) : perl.h
+hv$(O) : perly.h
hv$(O) : pp.h
hv$(O) : proto.h
hv$(O) : regexp.h
@@ -482,6 +519,7 @@ mg$(O) : mg.h
mg$(O) : op.h
mg$(O) : opcode.h
mg$(O) : perl.h
+mg$(O) : perly.h
mg$(O) : pp.h
mg$(O) : proto.h
mg$(O) : regexp.h
@@ -504,6 +542,7 @@ perl$(O) : op.h
perl$(O) : opcode.h
perl$(O) : perl.c
perl$(O) : perl.h
+perl$(O) : perly.h
perl$(O) : pp.h
perl$(O) : proto.h
perl$(O) : regexp.h
@@ -525,6 +564,7 @@ perly$(O) : mg.h
perly$(O) : op.h
perly$(O) : opcode.h
perly$(O) : perl.h
+perly$(O) : perly.h
perly$(O) : perly.c
perly$(O) : pp.h
perly$(O) : proto.h
@@ -547,6 +587,7 @@ pp$(O) : mg.h
pp$(O) : op.h
pp$(O) : opcode.h
pp$(O) : perl.h
+pp$(O) : perly.h
pp$(O) : pp.c
pp$(O) : pp.h
pp$(O) : proto.h
@@ -569,6 +610,7 @@ pp_ctl$(O) : mg.h
pp_ctl$(O) : op.h
pp_ctl$(O) : opcode.h
pp_ctl$(O) : perl.h
+pp_ctl$(O) : perly.h
pp_ctl$(O) : pp_ctl.c
pp_ctl$(O) : pp.h
pp_ctl$(O) : proto.h
@@ -591,6 +633,7 @@ pp_hot$(O) : mg.h
pp_hot$(O) : op.h
pp_hot$(O) : opcode.h
pp_hot$(O) : perl.h
+pp_hot$(O) : perly.h
pp_hot$(O) : pp_hot.c
pp_hot$(O) : pp.h
pp_hot$(O) : proto.h
@@ -613,6 +656,7 @@ pp_sys$(O) : mg.h
pp_sys$(O) : op.h
pp_sys$(O) : opcode.h
pp_sys$(O) : perl.h
+pp_sys$(O) : perly.h
pp_sys$(O) : pp_sys.c
pp_sys$(O) : pp.h
pp_sys$(O) : proto.h
@@ -636,6 +680,7 @@ regcomp$(O) : mg.h
regcomp$(O) : op.h
regcomp$(O) : opcode.h
regcomp$(O) : perl.h
+regcomp$(O) : perly.h
regcomp$(O) : pp.h
regcomp$(O) : proto.h
regcomp$(O) : regcomp.c
@@ -659,6 +704,7 @@ regexec$(O) : mg.h
regexec$(O) : op.h
regexec$(O) : opcode.h
regexec$(O) : perl.h
+regexec$(O) : perly.h
regexec$(O) : pp.h
regexec$(O) : proto.h
regexec$(O) : regcomp.h
@@ -683,6 +729,7 @@ gv$(O) : mg.h
gv$(O) : op.h
gv$(O) : opcode.h
gv$(O) : perl.h
+gv$(O) : perly.h
gv$(O) : pp.h
gv$(O) : proto.h
gv$(O) : regexp.h
@@ -727,6 +774,7 @@ taint$(O) : mg.h
taint$(O) : op.h
taint$(O) : opcode.h
taint$(O) : perl.h
+taint$(O) : perly.h
taint$(O) : pp.h
taint$(O) : proto.h
taint$(O) : regexp.h
@@ -773,6 +821,7 @@ util$(O) : mg.h
util$(O) : op.h
util$(O) : opcode.h
util$(O) : perl.h
+util$(O) : perly.h
util$(O) : pp.h
util$(O) : proto.h
util$(O) : regexp.h
@@ -796,6 +845,7 @@ deb$(O) : mg.h
deb$(O) : op.h
deb$(O) : opcode.h
deb$(O) : perl.h
+deb$(O) : perly.h
deb$(O) : pp.h
deb$(O) : proto.h
deb$(O) : regexp.h
@@ -817,6 +867,7 @@ run$(O) : mg.h
run$(O) : op.h
run$(O) : opcode.h
run$(O) : perl.h
+run$(O) : perly.h
run$(O) : pp.h
run$(O) : proto.h
run$(O) : regexp.h
@@ -839,6 +890,7 @@ vms$(O) : mg.h
vms$(O) : op.h
vms$(O) : opcode.h
vms$(O) : perl.h
+vms$(O) : perly.h
vms$(O) : pp.h
vms$(O) : proto.h
vms$(O) : regexp.h
@@ -847,7 +899,7 @@ vms$(O) : scope.h
vms$(O) : sv.h
vms$(O) : vmsish.h
vms$(O) : util.h
-miniperlmain$(O) : INTERN.h
+miniperlmain$(O) : EXTERN.h
miniperlmain$(O) : av.h
miniperlmain$(O) : config.h
miniperlmain$(O) : cop.h
@@ -862,6 +914,7 @@ miniperlmain$(O) : miniperlmain.c
miniperlmain$(O) : op.h
miniperlmain$(O) : opcode.h
miniperlmain$(O) : perl.h
+miniperlmain$(O) : perly.h
miniperlmain$(O) : pp.h
miniperlmain$(O) : proto.h
miniperlmain$(O) : regexp.h
@@ -869,7 +922,7 @@ miniperlmain$(O) : scope.h
miniperlmain$(O) : sv.h
miniperlmain$(O) : vmsish.h
miniperlmain$(O) : util.h
-perlmain$(O) : INTERN.h
+perlmain$(O) : EXTERN.h
perlmain$(O) : av.h
perlmain$(O) : config.h
perlmain$(O) : cop.h
@@ -883,6 +936,7 @@ perlmain$(O) : mg.h
perlmain$(O) : op.h
perlmain$(O) : opcode.h
perlmain$(O) : perl.h
+perlmain$(O) : perly.h
perlmain$(O) : perlmain.c
perlmain$(O) : pp.h
perlmain$(O) : proto.h
@@ -891,6 +945,29 @@ perlmain$(O) : scope.h
perlmain$(O) : sv.h
perlmain$(O) : vmsish.h
perlmain$(O) : util.h
+globals$(O) : INTERN.h
+globals$(O) : av.h
+globals$(O) : config.h
+globals$(O) : cop.h
+globals$(O) : cv.h
+globals$(O) : embed.h
+globals$(O) : form.h
+globals$(O) : gv.h
+globals$(O) : handy.h
+globals$(O) : hv.h
+globals$(O) : mg.h
+globals$(O) : op.h
+globals$(O) : opcode.h
+globals$(O) : perl.h
+globals$(O) : perly.h
+globals$(O) : globals.c
+globals$(O) : pp.h
+globals$(O) : proto.h
+globals$(O) : regexp.h
+globals$(O) : scope.h
+globals$(O) : sv.h
+globals$(O) : vmsish.h
+globals$(O) : util.h
config.h : [.vms]config.vms
Copy/Log/NoConfirm [.vms]config.vms []config.h
@@ -916,6 +993,8 @@ tidy : cleanlis
- If f$$Search("*$(E);-1").nes."" Then Purge/NoConfirm/Log *$(E)
- If f$$Search("Config.H;-1").nes."" Then Purge/NoConfirm/Log Config.H
- If f$$Search("Config.SH;-1").nes."" Then Purge/NoConfirm/Log Config.SH
+ - If f$$Search("perly.c;-1").nes."" Then Purge/NoConfirm/Log perly.c
+ - If f$$Search("perly.h;-1").nes."" Then Purge/NoConfirm/Log perly.h
- If f$$Search("VMSish.H;-1").nes."" Then Purge/NoConfirm/Log VMSish.H
- If f$$Search("VMS.C;-1") .nes."" Then Purge/NoConfirm/Log VMS.C
- If f$$Search("Perlmain.C;-1") .nes."" Then Purge/NoConfirm/Log Perlmain.C
@@ -938,6 +1017,8 @@ clean : tidy
- If f$$Search("Config.SH").nes."" Then Delete/NoConfirm/Log Config.SH;*
- If f$$Search(f$$Parse("sys$$Disk:[]","$(SOCKH)")).nes."" Then Delete/NoConfirm/Log $(SOCKH);*
- If f$$Search(f$$Parse("sys$$Disk:[]","$(SOCKC)")).nes."" Then Delete/NoConfirm/Log $(SOCKC);*
+ - If f$$Search("perly.c").nes."" Then Delete/NoConfirm/Log perly.c;*
+ - If f$$Search("perly.h").nes."" Then Delete/NoConfirm/Log perly.h;*
- If f$$Search("VMSish.H").nes."" Then Delete/NoConfirm/Log VMSish.H;*
- If f$$Search("VMS.C") .nes."" Then Delete/NoConfirm/Log VMS.C;*
- If f$$Search("Perlmain.C") .nes."" Then Delete/NoConfirm/Log Perlmain.C;*
@@ -945,19 +1026,18 @@ clean : tidy
- If f$$Search("*.TS").nes."" Then Delete/NoConfirm/Log *.TS;*
- If f$$Search("[.Ext.DynaLoader]DL_VMS$(O)").nes."" Then Delete/NoConfirm/Log [.Ext.DynaLoader]DL_VMS$(O);*
- If f$$Search("[.Ext.DynaLoader]DL_VMS.C").nes."" Then Delete/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C;*
+ - If f$$Search("[.Ext.Socket]Socket$(O)").nes."" Then Delete/NoConfirm/Log [.Ext.Socket]Socket$(O);*
+ - If f$$Search("[.Ext.Socket]Socket.C").nes."" Then Delete/NoConfirm/Log [.Ext.Socket]Socket.C;*
- If f$$Search("[.VMS.Ext...]*.C").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*.C;*
- If f$$Search("[.VMS.Ext...]*$(O)").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*$(O);*
realclean : clean
- - If f$$Search("*$(E)").nes."" Then Delete/NoConfirm/Log *$(E);*
- If f$$Search("*$(OLB)").nes."" Then Delete/NoConfirm/Log *$(OLB);*
- If f$$Search("*.Opt").nes."" Then Delete/NoConfirm/Log *.Opt;*
- - If f$$Search("[.Lib.Auto...]*.al").nes."" Then Delete/NoConfirm/Log [.Lib.Auto...]*.al;*
- - If f$$Search("[.Lib.Auto...]autosplit.ix;-1").nes."" Then Delete/NoConfirm/Log [.Lib.Auto...]autosplit.ix;*
+ - $(MINIPERL) -e "use File::Path; rmtree(['lib/auto','lib/VMS','lib/$(ARCH)'],1,0);"
- If f$$Search("[.Lib]DynaLoader.pm").nes."" Then Delete/NoConfirm/Log [.Lib]DynaLoader.pm;*
- - If f$$Search("[.Lib.VMS]*.*").nes."" Then Delete/NoConfirm/Log [.Lib.VMS...]*.*;*
- If f$$Search("[.Lib.ExtUtils]MM_VMS.pm").nes."" Then Delete/NoConfirm/Log [.Lib.ExtUtils]MM_VMS.pm;*
- - If f$$Search("$(ARCHCORE)*.*").nes."" Then Delete/NoConfirm/Log $(ARCHCORE)*.*;*
+ - If f$$Search("*$(E)").nes."" Then Delete/NoConfirm/Log *$(E);*
cleansrc : clean
- If f$$Search("*.C;-1").nes."" Then Purge/NoConfirm/Log *.C
@@ -972,4 +1052,5 @@ cleansrc : clean
- If f$$Search("[.VMS...]*.xs;-1").nes."" Then Purge/NoConfirm/Log [.VMS...]*.xs
- If f$$Search("[.Lib.Auto...]*.al").nes."" Then Delete/NoConfirm/Log [.Lib.Auto...]*.al;*
- If f$$Search("[.Lib.Auto...]autosplit.ts").nes."" Then Delete/NoConfirm/Log [.Lib.Auto...]autosplit.ts;*
+ - If f$$Search("[.Lib.$(ARCH)]Config.pm").nes."" Then Delete/NoConfirm/Log [.Lib.$(ARCH)]Config.pm;*
- If f$$Search("[.Lib]Config.pm").nes."" Then Delete/NoConfirm/Log [.Lib]Config.pm;*
diff --git a/vms/config.vms b/vms/config.vms
index 60de301fd1..6381339734 100644
--- a/vms/config.vms
+++ b/vms/config.vms
@@ -8,9 +8,10 @@
* GenConfig.pl when producing Config.pm.
*
* config.h for VMS
+ * Version: 5.1.5
*/
-/* Configuration time: 18-Apr-1995 17:00
+/* Configuration time: 8-Jun-1995 17:00
* Configured by: Charles Bailey bailey@genetics.upenn.edu
* Target system: VMS
*/
@@ -39,7 +40,7 @@
* same as PRIVLIB_EXP, it is not defined, since presumably the
* program already searches PRIVLIB_EXP.
*/
-#ifndef __ALPHA
+#ifdef __ALPHA
#define ARCHLIB_EXP "/perl_root/lib/VMS_AXP" /* config-skip */
#else
#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX" /* config-skip */
@@ -485,6 +486,10 @@
* to determine the number of bytes in the buffer. USE_STDIO_BASE
* will never be defined unless USE_STDIO_PTR is.
*/
+/* VMS:
+ * Regular FILE * are pretty close to meeting these criteria, but socket
+ * I/O uses a summy FILE *, and Perl doesn't distinguish between socket
+ * and non-socket filehandles. */
#undef USE_STDIO_PTR /**/
#undef USE_STDIO_BASE /**/
@@ -493,13 +498,23 @@
* FILE structure pointed to by its argument. This macro will always be
* defined if USE_STDIO_PTR is defined.
*/
+/* STDIO_PTR_LVALUE:
+ * This symbol is defined if the FILE_ptr macro can be used as an
+ * lvalue.
+ */
/* FILE_cnt:
* This macro is used to access the _cnt field (or equivalent) of the
* FILE structure pointed to by its argument. This macro will always be
* defined if USE_STDIO_PTR is defined.
*/
-#ifdef USE_STDIO_PTR
-#endif
+/* STDIO_CNT_LVALUE:
+ * This symbol is defined if the FILE_cnt macro can be used as an
+ * lvalue.
+ */
+#undef FILE_ptr
+#undef STDIO_PTR_LVALUE
+#undef FILE_cnt
+#undef STDIO_CNT_LVALUE
/* FILE_base:
* This macro is used to access the _base field (or equivalent) of the
@@ -512,8 +527,8 @@
* structure pointed to its argument. This macro will always be defined
* if USE_STDIO_BASE is defined.
*/
-#ifdef USE_STDIO_BASE
-#endif
+#undef FILE_base
+#undef FILE_bufsiz
/* USE_STRUCT_COPY:
* This symbol, if defined, indicates that this C compiler knows how
@@ -940,7 +955,7 @@
/* VMS:
* This symbol, if defined, indicates that the program is running under
- * VMS. It's symbol automagically defined by all VMS C compilers I've seen.
+ * VMS. It's a symbol automagically defined by all VMS C compilers I've seen.
* Just in case, however . . . */
#ifndef VMS
#define VMS /**/
diff --git a/vms/descrip.mms b/vms/descrip.mms
index 1af44baa6c..00985a6222 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -1,5 +1,5 @@
# Descrip.MMS for perl5 on VMS
-# Last revised 10-Mar-1995 by Charles Bailey bailey@genetics.upenn.edu
+# Last revised 5-Jun-1995 by Charles Bailey bailey@genetics.upenn.edu
#
#: This file uses MMS syntax, and can be processed using DEC's MMS product,
#: or the free MMK clone (available by ftp at ftp.spc.edu). If you want to
@@ -59,12 +59,13 @@ E = .exe
.ifdef __AXP__
DECC = 1
-ARCHCORE = [.lib.VMS_AXP.CORE]
-ARCHAUTO = [.lib.auto.VMS_AXP]
+ARCH = VMS_AXP
.else
-ARCHCORE = [.lib.VMS_VAX.CORE]
-ARCHAUTO = [.lib.auto.VMS_VAX]
+ARCH = VMS_VAX
.endif
+ARCHDIR = [.lib.$(ARCH)]
+ARCHCORE = [.lib.$(ARCH).CORE]
+ARCHAUTO = [.lib.$(ARCH).auto]
#: >>>>>Compiler-specific options <<<<<
@@ -88,8 +89,15 @@ XTRAOBJS =
LIBS1 = $(XTRAOBJS)
DBGSPECFLAGS = /Show=(Source,Include,Expansion)
.ifdef decc
+# Some versions of DECCRTL on AXP have a bug in chdir() which causes the change
+# to persist after the image exits, even when this was not requested, iff
+# SYSNAM is enabled. This is fixed in CSC Patch # AXPACRT04_061, but turning
+# off SYSNAM for the MM[SK] subprocess doesn't hurt anything, so we do it
+# just in case.
+.first
+ @ Set Process/Privilege=(NoSYSNAM)
LIBS2 =
-XTRACCFLAGS = /Warning=Disable=(ADDRCONSTEXT,MISSINGRETURN)/Include=[]/Prefix=All/Obj=$(MMS$TARGET_NAME)$(O)
+XTRACCFLAGS = /Include=[]/Prefix=All/Obj=$(MMS$TARGET_NAME)$(O)
XTRADEF =
.else # VAXC
XTRACCFLAGS = /Include=[]/Object=$(O)
@@ -125,6 +133,7 @@ SOCKH = sockadapt.h
SOCKCLIS = ,$(SOCKC)
SOCKHLIS = ,$(SOCKH)
SOCKOBJ = ,sockadapt$(O)
+SOCKPM = [.lib]Socket.pm
.else
SOCKDEF =
SOCKLIB =
@@ -133,6 +142,7 @@ SOCKH =
SOCKCLIS =
SOCKHLIS =
SOCKOBJ =
+SOCKPM =
.endif
# C preprocessor manifest "DEBUGGING" ==> perl -D, not the VMS debugger
@@ -146,15 +156,31 @@ NOOP = continue
# Macros to invoke a copy of miniperl during the build. Targets which
# are built using these macros should depend on $(MINIPERL_EXE)
MINIPERL_EXE = Sys$Disk:[]miniperl$(E)
-MINIPERL = MCR $(MINIPERL_EXE)
+MINIPERL = MCR $(MINIPERL_EXE) "-Ilib"
XSUBPP = $(MINIPERL) [.lib.extutils]xsubpp
+# Macro to invoke a preexisting copy of Perl. This is used to regenerate
+# some header files when rebuilding Perl, but premade versions are provided
+# in the distribution, so it's OK if this doesn't work; it's here to make
+# life easier for those who modify Perl and rebuild it.
+INSTPERL = perl
# Space-separated list of "static" extensions to build into perlshr (case counts).
-EXT = DynaLoader
+MYEXT = DynaLoader
# object files for these extensions; the trailing comma is required if
# there are any object files specified
# These must be built separately, or you must add rules below to build them
-extobj = [.ext.dynaloader]dl_vms$(O),
+myextobj = [.ext.dynaloader]dl_vms$(O),
+#: We include the Socket extension by default if we're building with socket
+#: support, since it's small and not really worth bothering to keep track
+#: of separately.
+.ifdef SOCKET
+EXT = $(MYEXT) Socket
+extobj = $(myextobj) [.ext.socket]socket$(O),
+.else
+EXT = $(MYEXT)
+extobj = $(myextobj)
+.endif
+
#### End of system configuration section. ####
@@ -211,7 +237,7 @@ CRTLOPTS =,$(CRTL)/Options
all : base extras archcorefiles preplibrary
@ $(NOOP)
-base : miniperl$(E) perl$(E) [.lib]Config.pm
+base : miniperl$(E) perl$(E) [.lib.$(ARCH)]Config.pm
@ $(NOOP)
extras : [.lib]DynaLoader.pm [.lib.VMS]Filespec.pm [.lib.extutils]MM_VMS.pm
@ $(NOOP)
@@ -257,6 +283,10 @@ $(DBG)perlshr_xtras.ts : perl.h config.h vmsish.h proto.h [.vms]gen_shrfls.pl $(
@ Copy NLA0: $(DBG)perlshr_xtras.ts
.endif
+[.lib.$(ARCH)]config.pm : [.lib]config.pm
+ Create/Directory [.lib.$(ARCH)]
+ Copy $(MMS$SOURCE) $(MMS$TARGET)
+
[.lib]config.pm : [.vms]config.vms [.vms]genconfig.pl $(MINIPERL_EXE)
$(MINIPERL) [.VMS]GenConfig.Pl cc=$(CC)$(CFLAGS) ldflags=$(LINKFLAGS)
$(MINIPERL) ConfigPM.
@@ -277,7 +307,7 @@ $(DBG)perlshr_xtras.ts : perl.h config.h vmsish.h proto.h [.vms]gen_shrfls.pl $(
[.lib.ExtUtils]MM_VMS.pm : [.vms.ext]MM_VMS.pm
Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
-preplibrary : $(MINIPERL_EXE) [.lib]DynaLoader.pm [.lib.VMS]Filespec.pm [.lib.ExtUtils]MM_VMS.pm
+preplibrary : $(MINIPERL_EXE) [.lib]DynaLoader.pm [.lib.VMS]Filespec.pm [.lib.ExtUtils]MM_VMS.pm $(SOCKPM)
@ Write Sys$Output "Autosplitting Perl library . . ."
@ Create/Directory [.lib.auto]
@ $(MINIPERL) "-Ilib" -e "use AutoSplit; autosplit_lib_modules(@ARGV)" [.lib]*.pm [.lib.*]*.pm
@@ -292,24 +322,43 @@ $(SOCKC) : [.vms]$(SOCKC)
$(SOCKH) : [.vms]$(SOCKH)
Copy/Log/NoConfirm [.vms]$(SOCKH) []$(SOCKH)
+
+[.ext.Socket]Socket.c : [.ext.Socket]Socket.xs $(MINIPERL_EXE)
+ $(XSUBPP) $(MMS$SOURCE) >$(MMS$TARGET)
+
+[.ext.Socket]Socket$(O) : [.ext.Socket]Socket.c
+ $(CC) $(CFLAGS) /Object=$(MMS$TARGET) $(MMS$SOURCE)
+
+[.lib]Socket.pm : [.ext.Socket]Socket.pm
+ Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
.endif
-#opcode.h : opcode.pl $(MINIPERL_EXE)
-# $(MINIPERL) opcode.pl
+opcode.h : opcode.pl
+ @ Write Sys$Output "Don't worry if this fails."
+ - $(INSTPERL) opcode.pl
+keywords.h : keywords.pl
+ @ Write Sys$Output "Don't worry if this fails."
+ - $(INSTPERL) keywords.pl
+embed.h : global.sym interp.sym
+ @ Write Sys$Output "Don't worry if this fails."
+ - $(INSTPERL) [.vms]embed_h.pl
-perly.h : perly.c # Quick and dirty 'touch'
- Copy/Log/NoConfirm perly.h; ;
- Delete/Log/NoConfirm perly.h;-1
+# VMS uses modified perly.[ch] with tags for globaldefs if using DEC compiler
+perly.c : [.vms]perly_c.vms
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+perly.h : [.vms]perly_h.vms
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
# I now supply perly.c with the kits, so the following section is
# commented out if you don't have byacc.
-
+# Altered for VMS by Charles Bailey bailey@genetics.upenn.edu
# perly.c:
-# @ echo 'Expect' 80 shift/reduce and 62 reduce/reduce conflicts
+# @ Write Sys$Output 'Expect' 80 shift/reduce and 62 reduce/reduce conflicts
# \$(BYACC) -d perly.y
+# Has to be done by hand or by POSIX shell under VMS
# sh \$(shellflags) ./perly.fixer y.tab.c perly.c
-# mv y.tab.h perly.h
-# echo 'extern YYSTYPE yylval;' >>perly.h
+# rename y.tab.h perly.h
+# $(INSTPERL) [.vms]vms_yfix.pl perly.c perly.h [.vms]perly_c.vms [.vms]perly_h.vms
perly$(O) : perly.c, perly.h, $(h)
$(CC) $(CFLAGS) $(MMS$SOURCE)
@@ -434,6 +483,7 @@ av$(O) : mg.h
av$(O) : op.h
av$(O) : opcode.h
av$(O) : perl.h
+av$(O) : perly.h
av$(O) : pp.h
av$(O) : proto.h
av$(O) : regexp.h
@@ -455,6 +505,7 @@ scope$(O) : mg.h
scope$(O) : op.h
scope$(O) : opcode.h
scope$(O) : perl.h
+scope$(O) : perly.h
scope$(O) : pp.h
scope$(O) : proto.h
scope$(O) : regexp.h
@@ -478,6 +529,7 @@ op$(O) : op.c
op$(O) : op.h
op$(O) : opcode.h
op$(O) : perl.h
+op$(O) : perly.h
op$(O) : pp.h
op$(O) : proto.h
op$(O) : regexp.h
@@ -500,6 +552,7 @@ doop$(O) : mg.h
doop$(O) : op.h
doop$(O) : opcode.h
doop$(O) : perl.h
+doop$(O) : perly.h
doop$(O) : pp.h
doop$(O) : proto.h
doop$(O) : regexp.h
@@ -522,6 +575,7 @@ doio$(O) : mg.h
doio$(O) : op.h
doio$(O) : opcode.h
doio$(O) : perl.h
+doio$(O) : perly.h
doio$(O) : pp.h
doio$(O) : proto.h
doio$(O) : regexp.h
@@ -544,6 +598,7 @@ dump$(O) : mg.h
dump$(O) : op.h
dump$(O) : opcode.h
dump$(O) : perl.h
+dump$(O) : perly.h
dump$(O) : pp.h
dump$(O) : proto.h
dump$(O) : regexp.h
@@ -566,6 +621,7 @@ hv$(O) : mg.h
hv$(O) : op.h
hv$(O) : opcode.h
hv$(O) : perl.h
+hv$(O) : perly.h
hv$(O) : pp.h
hv$(O) : proto.h
hv$(O) : regexp.h
@@ -588,6 +644,7 @@ mg$(O) : mg.h
mg$(O) : op.h
mg$(O) : opcode.h
mg$(O) : perl.h
+mg$(O) : perly.h
mg$(O) : pp.h
mg$(O) : proto.h
mg$(O) : regexp.h
@@ -610,6 +667,7 @@ perl$(O) : op.h
perl$(O) : opcode.h
perl$(O) : perl.c
perl$(O) : perl.h
+perl$(O) : perly.h
perl$(O) : pp.h
perl$(O) : proto.h
perl$(O) : regexp.h
@@ -631,6 +689,7 @@ perly$(O) : mg.h
perly$(O) : op.h
perly$(O) : opcode.h
perly$(O) : perl.h
+perly$(O) : perly.h
perly$(O) : perly.c
perly$(O) : pp.h
perly$(O) : proto.h
@@ -653,6 +712,7 @@ pp$(O) : mg.h
pp$(O) : op.h
pp$(O) : opcode.h
pp$(O) : perl.h
+pp$(O) : perly.h
pp$(O) : pp.c
pp$(O) : pp.h
pp$(O) : proto.h
@@ -675,6 +735,7 @@ pp_ctl$(O) : mg.h
pp_ctl$(O) : op.h
pp_ctl$(O) : opcode.h
pp_ctl$(O) : perl.h
+pp_ctl$(O) : perly.h
pp_ctl$(O) : pp_ctl.c
pp_ctl$(O) : pp.h
pp_ctl$(O) : proto.h
@@ -697,6 +758,7 @@ pp_hot$(O) : mg.h
pp_hot$(O) : op.h
pp_hot$(O) : opcode.h
pp_hot$(O) : perl.h
+pp_hot$(O) : perly.h
pp_hot$(O) : pp_hot.c
pp_hot$(O) : pp.h
pp_hot$(O) : proto.h
@@ -719,6 +781,7 @@ pp_sys$(O) : mg.h
pp_sys$(O) : op.h
pp_sys$(O) : opcode.h
pp_sys$(O) : perl.h
+pp_sys$(O) : perly.h
pp_sys$(O) : pp_sys.c
pp_sys$(O) : pp.h
pp_sys$(O) : proto.h
@@ -742,6 +805,7 @@ regcomp$(O) : mg.h
regcomp$(O) : op.h
regcomp$(O) : opcode.h
regcomp$(O) : perl.h
+regcomp$(O) : perly.h
regcomp$(O) : pp.h
regcomp$(O) : proto.h
regcomp$(O) : regcomp.c
@@ -765,6 +829,7 @@ regexec$(O) : mg.h
regexec$(O) : op.h
regexec$(O) : opcode.h
regexec$(O) : perl.h
+regexec$(O) : perly.h
regexec$(O) : pp.h
regexec$(O) : proto.h
regexec$(O) : regcomp.h
@@ -789,6 +854,7 @@ gv$(O) : mg.h
gv$(O) : op.h
gv$(O) : opcode.h
gv$(O) : perl.h
+gv$(O) : perly.h
gv$(O) : pp.h
gv$(O) : proto.h
gv$(O) : regexp.h
@@ -833,6 +899,7 @@ taint$(O) : mg.h
taint$(O) : op.h
taint$(O) : opcode.h
taint$(O) : perl.h
+taint$(O) : perly.h
taint$(O) : pp.h
taint$(O) : proto.h
taint$(O) : regexp.h
@@ -879,6 +946,7 @@ util$(O) : mg.h
util$(O) : op.h
util$(O) : opcode.h
util$(O) : perl.h
+util$(O) : perly.h
util$(O) : pp.h
util$(O) : proto.h
util$(O) : regexp.h
@@ -902,6 +970,7 @@ deb$(O) : mg.h
deb$(O) : op.h
deb$(O) : opcode.h
deb$(O) : perl.h
+deb$(O) : perly.h
deb$(O) : pp.h
deb$(O) : proto.h
deb$(O) : regexp.h
@@ -923,6 +992,7 @@ run$(O) : mg.h
run$(O) : op.h
run$(O) : opcode.h
run$(O) : perl.h
+run$(O) : perly.h
run$(O) : pp.h
run$(O) : proto.h
run$(O) : regexp.h
@@ -945,6 +1015,7 @@ vms$(O) : mg.h
vms$(O) : op.h
vms$(O) : opcode.h
vms$(O) : perl.h
+vms$(O) : perly.h
vms$(O) : pp.h
vms$(O) : proto.h
vms$(O) : regexp.h
@@ -953,7 +1024,7 @@ vms$(O) : scope.h
vms$(O) : sv.h
vms$(O) : vmsish.h
vms$(O) : util.h
-miniperlmain$(O) : INTERN.h
+miniperlmain$(O) : EXTERN.h
miniperlmain$(O) : av.h
miniperlmain$(O) : config.h
miniperlmain$(O) : cop.h
@@ -968,6 +1039,7 @@ miniperlmain$(O) : miniperlmain.c
miniperlmain$(O) : op.h
miniperlmain$(O) : opcode.h
miniperlmain$(O) : perl.h
+miniperlmain$(O) : perly.h
miniperlmain$(O) : pp.h
miniperlmain$(O) : proto.h
miniperlmain$(O) : regexp.h
@@ -975,7 +1047,7 @@ miniperlmain$(O) : scope.h
miniperlmain$(O) : sv.h
miniperlmain$(O) : vmsish.h
miniperlmain$(O) : util.h
-perlmain$(O) : INTERN.h
+perlmain$(O) : EXTERN.h
perlmain$(O) : av.h
perlmain$(O) : config.h
perlmain$(O) : cop.h
@@ -989,6 +1061,7 @@ perlmain$(O) : mg.h
perlmain$(O) : op.h
perlmain$(O) : opcode.h
perlmain$(O) : perl.h
+perlmain$(O) : perly.h
perlmain$(O) : perlmain.c
perlmain$(O) : pp.h
perlmain$(O) : proto.h
@@ -997,6 +1070,29 @@ perlmain$(O) : scope.h
perlmain$(O) : sv.h
perlmain$(O) : vmsish.h
perlmain$(O) : util.h
+globals$(O) : INTERN.h
+globals$(O) : av.h
+globals$(O) : config.h
+globals$(O) : cop.h
+globals$(O) : cv.h
+globals$(O) : embed.h
+globals$(O) : form.h
+globals$(O) : gv.h
+globals$(O) : handy.h
+globals$(O) : hv.h
+globals$(O) : mg.h
+globals$(O) : op.h
+globals$(O) : opcode.h
+globals$(O) : perl.h
+globals$(O) : perly.h
+globals$(O) : globals.c
+globals$(O) : pp.h
+globals$(O) : proto.h
+globals$(O) : regexp.h
+globals$(O) : scope.h
+globals$(O) : sv.h
+globals$(O) : vmsish.h
+globals$(O) : util.h
config.h : [.vms]config.vms
Copy/Log/NoConfirm [.vms]config.vms []config.h
@@ -1022,6 +1118,8 @@ tidy : cleanlis
- If F$Search("*$(E);-1").nes."" Then Purge/NoConfirm/Log *$(E)
- If F$Search("Config.H;-1").nes."" Then Purge/NoConfirm/Log Config.H
- If F$Search("Config.SH;-1").nes."" Then Purge/NoConfirm/Log Config.SH
+ - If F$Search("perly.c;-1").nes."" Then Purge/NoConfirm/Log perly.c
+ - If F$Search("perly.h;-1").nes."" Then Purge/NoConfirm/Log perly.h
- If F$Search("VMSish.H;-1").nes."" Then Purge/NoConfirm/Log VMSish.H
- If F$Search("VMS.C;-1") .nes."" Then Purge/NoConfirm/Log VMS.C
- If F$Search("Perlmain.C;-1") .nes."" Then Purge/NoConfirm/Log Perlmain.C
@@ -1044,6 +1142,8 @@ clean : tidy
- If F$Search("Config.SH").nes."" Then Delete/NoConfirm/Log Config.SH;*
- If F$Search(F$Parse("Sys$Disk:[]","$(SOCKH)")).nes."" Then Delete/NoConfirm/Log $(SOCKH);*
- If F$Search(F$Parse("Sys$Disk:[]","$(SOCKC)")).nes."" Then Delete/NoConfirm/Log $(SOCKC);*
+ - If F$Search("perly.c").nes."" Then Delete/NoConfirm/Log perly.c;*
+ - If F$Search("perly.h").nes."" Then Delete/NoConfirm/Log perly.h;*
- If F$Search("VMSish.H").nes."" Then Delete/NoConfirm/Log VMSish.H;*
- If F$Search("VMS.C") .nes."" Then Delete/NoConfirm/Log VMS.C;*
- If F$Search("Perlmain.C") .nes."" Then Delete/NoConfirm/Log Perlmain.C;*
@@ -1051,19 +1151,18 @@ clean : tidy
- If F$Search("*.TS").nes."" Then Delete/NoConfirm/Log *.TS;*
- If F$Search("[.Ext.DynaLoader]DL_VMS$(O)").nes."" Then Delete/NoConfirm/Log [.Ext.DynaLoader]DL_VMS$(O);*
- If F$Search("[.Ext.DynaLoader]DL_VMS.C").nes."" Then Delete/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C;*
+ - If F$Search("[.Ext.Socket]Socket$(O)").nes."" Then Delete/NoConfirm/Log [.Ext.Socket]Socket$(O);*
+ - If F$Search("[.Ext.Socket]Socket.C").nes."" Then Delete/NoConfirm/Log [.Ext.Socket]Socket.C;*
- If F$Search("[.VMS.Ext...]*.C").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*.C;*
- If F$Search("[.VMS.Ext...]*$(O)").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*$(O);*
realclean : clean
- - If F$Search("*$(E)").nes."" Then Delete/NoConfirm/Log *$(E);*
- If F$Search("*$(OLB)").nes."" Then Delete/NoConfirm/Log *$(OLB);*
- If F$Search("*.Opt").nes."" Then Delete/NoConfirm/Log *.Opt;*
- - If F$Search("[.Lib.Auto...]*.al").nes."" Then Delete/NoConfirm/Log [.Lib.Auto...]*.al;*
- - If F$Search("[.Lib.Auto...]autosplit.ix;-1").nes."" Then Delete/NoConfirm/Log [.Lib.Auto...]autosplit.ix;*
+ - $(MINIPERL) -e "use File::Path; rmtree(['lib/auto','lib/VMS','lib/$(ARCH)'],1,0);"
- If F$Search("[.Lib]DynaLoader.pm").nes."" Then Delete/NoConfirm/Log [.Lib]DynaLoader.pm;*
- - If F$Search("[.Lib.VMS]*.*").nes."" Then Delete/NoConfirm/Log [.Lib.VMS...]*.*;*
- If F$Search("[.Lib.ExtUtils]MM_VMS.pm").nes."" Then Delete/NoConfirm/Log [.Lib.ExtUtils]MM_VMS.pm;*
- - If F$Search("$(ARCHCORE)*.*").nes."" Then Delete/NoConfirm/Log $(ARCHCORE)*.*;*
+ - If F$Search("*$(E)").nes."" Then Delete/NoConfirm/Log *$(E);*
cleansrc : clean
- If F$Search("*.C;-1").nes."" Then Purge/NoConfirm/Log *.C
@@ -1078,4 +1177,5 @@ cleansrc : clean
- If F$Search("[.VMS...]*.xs;-1").nes."" Then Purge/NoConfirm/Log [.VMS...]*.xs
- If F$Search("[.Lib.Auto...]*.al").nes."" Then Delete/NoConfirm/Log [.Lib.Auto...]*.al;*
- If F$Search("[.Lib.Auto...]autosplit.ts").nes."" Then Delete/NoConfirm/Log [.Lib.Auto...]autosplit.ts;*
+ - If F$Search("[.Lib.$(ARCH)]Config.pm").nes."" Then Delete/NoConfirm/Log [.Lib.$(ARCH)]Config.pm;*
- If F$Search("[.Lib]Config.pm").nes."" Then Delete/NoConfirm/Log [.Lib]Config.pm;*
diff --git a/vms/ext/MM_VMS.pm b/vms/ext/MM_VMS.pm
index 801f2f8587..4701245f52 100644
--- a/vms/ext/MM_VMS.pm
+++ b/vms/ext/MM_VMS.pm
@@ -3,9 +3,9 @@
# This package is inserted into @ISA of MakeMaker's MM before the
# built-in MM_Unix methods if MakeMaker.pm is run under VMS.
#
-# Version: 4.03
+# Version: 4.15
# Author: Charles Bailey bailey@genetics.upenn.edu
-# Revised: 30-Jan-1995
+# Revised: 11-Jun-1995
package ExtUtils::MM_VMS;
@@ -18,17 +18,95 @@ Exporter::import('ExtUtils::MakeMaker',
qw(%att %skip %Recognized_Att_Keys $Verbose &neatvalue));
-sub fixpath {
- my($path) = @_;
+sub eliminate_macros {
+ my($path) = unixify(@_);
my($head,$macro,$tail);
while (($head,$macro,$tail) = ($path =~ m#(.*?)\$\((\S+?)\)/(.*)#)) {
($macro = unixify($att{$macro})) =~ s#/$##;
$path = "$head$macro/$tail";
}
- vmsify($path);
+ $path;
}
+sub fixpath {
+ my($path) = @_;
+ return $path if $path =~ /^[^\)\/]+\)?[\w\-\.]*/;
+ vmsify(eliminate_macros(@_));
+}
+
+sub catdir {
+ my($self,$path,$dir) = @_;
+ vmspath(eliminate_macros($path).'/'.eliminate_macros($dir));
+}
+
+sub catfile {
+ my($self,$path,$file) = @_;
+ if ( $path =~ /^[^\)\]\/:>]+\)$/ ) { "$path$file"; }
+ else { vmsify(eliminate_macros($path)."/$file"); }
+}
+
+
+sub find_perl{
+ my($self, $ver, $names, $dirs, $trace) = @_;
+ my($name, $dir,$vmsfile);
+ if ($trace){
+ print "Looking for perl $ver by these names: ";
+ print "@$names, ";
+ print "in these dirs:";
+ print "@$dirs";
+ }
+ foreach $dir (@$dirs){
+ next unless defined $dir; # $att{PERL_SRC} may be undefined
+ foreach $name (@$names){
+ $name .= ".exe" unless -x "$dir/$name";
+ $vmsfile = vmsify("$dir/$name");
+ print "Checking $vmsfile" if ($trace >= 2);
+ next unless -x "$vmsfile";
+ print "Executing $vmsfile" if ($trace >= 2);
+ if (`MCR $vmsfile -e "require $ver; print ""VER_OK\n"""` =~ /VER_OK/) {
+ print "Using PERL=MCR $vmsfile" if $trace;
+ return "MCR $vmsfile"
+ }
+ }
+ }
+ print STDOUT "Unable to find a perl $ver (by these names: @$names, in these dirs: @$dirs)\n";
+ 0; # false and not empty
+}
+
+
+# $att{NAME} is taken from the directory name if it's not passed in.
+# Since VMS filenames are case-insensitive, we actually look in the
+# extension files to find the Mixed-case name
+sub init_main {
+ my($self) = @_;
+
+ if (!$att{NAME}) {
+ my($defname,$defpm);
+ local *PM;
+ $defname = $ENV{'DEFAULT'};
+ $defname =~ s:.*?([^.\]]+)\]:$1: unless ($defname =~ s:.*[.\[]ext\.(.*)\]:$1:i);
+ $defname =~ s#[.\]]#::#g;
+ ($defpm = $defname) =~ s/.*:://;
+ if (open(PM,"${defpm}.pm")){
+ while (<PM>) {
+ if (/^\s*package\s+($defname)/oi) {
+ $att{NAME} = $1;
+ last;
+ }
+ }
+ close PM;
+ print STDOUT "Warning (non-fatal): Couldn't find package name in ${defpm}.pm;\n\t",
+ "defaulting package name to $defname\n" unless $att{NAME};
+ }
+ else {
+ print STDOUT "Warning (non-fatal): Couldn't find ${defpm}.pm;\n\t",
+ "defaulting package name to $defname\n" unless $att{NAME};
+ }
+ $att{NAME} = $defname unless $att{NAME};
+ }
+ MM_Unix::init_main(@_);
+}
sub init_others {
&MM_Unix::init_others;
@@ -36,17 +114,20 @@ sub init_others {
$att{MAKEFILE} = '$(MAKEFILE)';
$att{RM_F} = '$(PERL) -e "foreach (@ARGV) { -d $_ ? rmdir $_ : unlink $_}"';
$att{RM_RF} = '$(PERL) -e "use File::Path; use VMS::Filespec; @dirs = map(unixify($_),@ARGV); rmtree(\@dirs,0,0)"';
- $att{TOUCH} = '$(PERL) -e "$t=time; utime $t,$t,@ARGV"';
+ $att{TOUCH} = '$(PERL) -e "$t=time; foreach (@ARGV) { -e $_ ? utime($t,$t,@ARGV) : (open(F,"">$_""),close F)"';
+ $att{CHMOD} = '$(PERL) -e "chmod @ARGV"'; # expect Unix syntax from MakeMaker
$att{CP} = 'Copy/NoConfirm';
$att{MV} = 'Rename/NoConfirm';
}
sub constants {
+ my($self) = @_;
my(@m,$def);
push @m, "
NAME = $att{NAME}
DISTNAME = $att{DISTNAME}
VERSION = $att{VERSION}
+VERSION_SYM = $att{VERSION_SYM}
# In which library should we install this extension?
# This is typically the same as PERL_LIB.
@@ -55,25 +136,38 @@ INST_LIB = ",vmspath($att{INST_LIB}),"
INST_ARCHLIB = ",vmspath($att{INST_ARCHLIB}),"
INST_EXE = ",vmspath($att{INST_EXE}),"
+# AFS users will want to set the installation directories for
+# the final 'make install' early without setting INST_LIB,
+# INST_ARCHLIB, and INST_EXE for the testing phase
+INSTALLPRIVLIB = ",vmspath($att{INSTALLPRIVLIB}),'
+INSTALLARCHLIB = ',vmspath($att{INSTALLARCHLIB}),'
+INSTALLBIN = ',vmspath($att{INSTALLBIN}),'
+
# Perl library to use when building the extension
-PERL_LIB = ",vmspath($att{PERL_LIB}),"
-PERL_ARCHLIB = ",vmspath($att{PERL_ARCHLIB}),"
-LIBPERL_A = ",vmsify($att{LIBPERL_A}),"
+PERL_LIB = ',vmspath($att{PERL_LIB}),'
+PERL_ARCHLIB = ',vmspath($att{PERL_ARCHLIB}),'
+LIBPERL_A = ',vmsify($att{LIBPERL_A}),'
+
+MAKEMAKER = ',vmsify(unixpath($att{PERL_LIB}).'ExtUtils/MakeMaker.pm'),"
+MM_VERSION = $ExtUtils::MakeMaker::Version
";
-# Define I_PERL_LIBS to include the required -Ipaths
-# To be cute we only include PERL_ARCHLIB if different
-# To be portable we add quotes for VMS
-my(@i_perl_libs) = qw{-I$(PERL_ARCHLIB) -I$(PERL_LIB)};
-shift(@i_perl_libs) if ($att{PERL_ARCHLIB} eq $att{PERL_LIB});
-push @m, "I_PERL_LIBS = \"".join('" "',@i_perl_libs)."\"\n";
+ # Define I_PERL_LIBS to include the required -Ipaths
+ # To be cute we only include PERL_ARCHLIB if different
+ # To be portable we add quotes for VMS
+ #### Deprecated from Version 4.11: We want to avoid different
+ #### behavior for variables with make(1) and perl(1)
+
+ my(@i_perl_libs) = qw{-I$(PERL_ARCHLIB) -I$(PERL_LIB)};
+ shift(@i_perl_libs) if ($att{PERL_ARCHLIB} eq $att{PERL_LIB});
+ push @m, "I_PERL_LIBS = \"".join('" "',@i_perl_libs)."\"\n";
-if ($att{PERL_SRC}) {
- push @m, "
+ if ($att{PERL_SRC}) {
+ push @m, "
# Where is the perl source code located?
PERL_SRC = ",vmspath($att{PERL_SRC});
-}
- push @m,"
+ }
+ push @m,"
# Perl header files (will eventually be under PERL_LIB)
PERL_INC = ",vmspath($att{PERL_INC}),"
# Perl binaries
@@ -108,16 +202,22 @@ INC = ";
$att{DEFINE} = join ',',@defs;
}
+ $att{OBJECT} =~ s#\.o\b#\.obj#;
+ if ($att{OBJECT} =~ /\s/) {
+ $att{OBJECT} =~ s/(\\)?\n+\s+/ /g;
+ $att{OBJECT} = map(vmsify($_),split(/,?\s+/,$att{OBJECT}));
+ }
+ $att{LDFROM} = join(' ',map(fixpath($_),split(/,?\s+/,$att{LDFROM})));
push @m,"
DEFINE = $att{DEFINE}
-OBJECT = ",vmsify($att{OBJECT}),"
-LDFROM = ",vmsify($att{LDFROM}),"
+OBJECT = $att{OBJECT}
+LDFROM = $att{LDFROM})
LINKTYPE = $att{LINKTYPE}
# Handy lists of source code files:
XS_FILES = ",join(', ', sort keys %{$att{XS}}),"
C_FILES = ",join(', ', @{$att{C}}),"
-O_FILES = ",join(', ', @{$att{O_FILES}}),"
+O_FILES = ",join(', ', map { s#\.o\b#\.obj#; $_ } @{$att{O_FILES}} ),"
H_FILES = ",join(', ', @{$att{H}}),"
.SUFFIXES : .xs
@@ -135,10 +235,23 @@ INST_ARCHLIBDIR = ",($att{'INST_ARCHLIBDIR'} = vmspath(unixpath($att{INST_ARCHLI
INST_AUTODIR = ",($att{'INST_AUTODIR'} = vmspath(unixpath($att{INST_LIB}) . 'auto/' . unixpath($att{FULLEXT}))),'
INST_ARCHAUTODIR = ',($att{'INST_ARCHAUTODIR'} = vmspath(unixpath($att{INST_ARCHLIB}) . 'auto/' . unixpath($att{FULLEXT}))),'
+';
+ if ($self->needs_linking) {
+ push @m,'
INST_STATIC = $(INST_ARCHAUTODIR)$(BASEEXT).olb
INST_DYNAMIC = $(INST_ARCHAUTODIR)$(BASEEXT).$(DLEXT)
INST_BOOT = $(INST_ARCHAUTODIR)$(BASEEXT).bs
+';
+ } else {
+ push @m,'
+INST_STATIC =
+INST_DYNAMIC =
+INST_BOOT =
+';
+ }
+
+ push @m,'
INST_PM = ',join(', ',map(fixpath($_),sort values %{$att{PM}})),'
';
@@ -182,20 +295,36 @@ sub const_loadlibs{
my (@m);
push @m, "
# $att{NAME} might depend on some other libraries.
+# (These comments may need revising:)
#
-# Dependent libraries are linked in either by the Link command
-# at build time or by the DynaLoader at bootstrap time.
+# Dependent libraries can be linked in one of three ways:
#
-# These comments may need revising:
+# 1. (For static extensions) by the ld command when the perl binary
+# is linked with the extension library. See EXTRALIBS below.
#
-# EXTRALIBS = Full list of libraries needed for static linking.
+# 2. (For dynamic extensions) by the ld command when the shared
+# object is built/linked. See LDLOADLIBS below.
+#
+# 3. (For dynamic extensions) by the DynaLoader when the shared
+# object is loaded. See BSLOADLIBS below.
+#
+# EXTRALIBS = List of libraries that need to be linked with when
+# linking a perl binary which includes this extension
# Only those libraries that actually exist are included.
+# These are written to a file and used when linking perl.
#
-# BSLOADLIBS = List of those libraries that are needed but can be
-# linked in dynamically.
+# LDLOADLIBS = List of those libraries which can or must be linked into
+# the shared library when created using ld. These may be
+# static or dynamic libraries.
+# LD_RUN_PATH is a colon separated list of the directories
+# in LDLOADLIBS. It is passed as an environment variable to
+# the process that links the shared library.
#
-# LDLOADLIBS = List of those libraries which must be statically
-# linked into the shared library.
+# BSLOADLIBS = List of those libraries that are needed but can be
+# linked in dynamically at run time on this platform.
+# SunOS/Solaris does not need this because ld records
+# the information (from LDLOADLIBS) into the object file.
+# This list is used to create a .bs (bootstrap) file.
#
EXTRALIBS = ",map(vmsify($_) . ' ',$att{'EXTRALIBS'}),"
BSLOADLIBS = ",map(vmsify($_) . ' ',$att{'BSLOADLIBS'}),"
@@ -212,7 +341,7 @@ sub tool_autosplit{
$asl = "\$AutoSplit::Maxlen=$attribs{MAXLEN};" if $attribs{MAXLEN};
q{
# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
-AUTOSPLITFILE = $(PERL) $(I_PERL_LIBS) -e "use AutoSplit;}.$asl.q{ AutoSplit::autosplit($ARGV[0], $ARGV[1], 0, 1, 1) ;"
+AUTOSPLITFILE = $(PERL) "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)" -e "use AutoSplit;}.$asl.q{ AutoSplit::autosplit($ARGV[0], $ARGV[1], 0, 1, 1) ;"
};
}
@@ -234,6 +363,8 @@ XSUBPPARGS = @tmargs
sub tools_other {
"
# Assumes \$(MMS) invokes MMS or MMK
+# (It is assumed in some cases later that the default makefile name
+# (Descrip.MMS for MM[SK]) is used.)
USEMAKEFILE = /Descrip=
USEMACROS = /Macro=(
MACROEND = )
@@ -298,22 +429,27 @@ sub dlsyms {
my(@m);
push(@m,'
-dynamic :: perlshr.opt $(BASEEXT).opt
+dynamic :: $(INST_ARCHAUTODIR)perlshr.opt $(INST_ARCHAUTODIR)$(BASEEXT).opt
',$att{NOOP},'
-perlshr.opt : makefile.PL
+$(INST_ARCHAUTODIR)perlshr.opt : makefile.PL
$(PERL) -e "open O,\'>perlshr.opt\'; print O ""PerlShr/Share\n""; close O"
+ @ $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR).packlist\';print F \'$(MMS$TARGET)\';close F;"
') unless $skip{'dynamic'};
push(@m,'
-static :: $(BASEEXT).opt
+static :: $(INST_ARCHAUTODIR)$(BASEEXT).opt
',$att{NOOP},'
') unless $skip{'static'};
push(@m,'
+$(INST_ARCHAUTODIR)$(BASEEXT).opt : $(BASEEXT).opt
+ $(CP) $(MMS$SOURCE) $(MMS$TARGET)
+
$(BASEEXT).opt : makefile.PL
- $(PERL) $(I_PERL_LIBS) -e "use ExtUtils::MakeMaker; mksymlists(DL_FUNCS => ',neatvalue($att{DL_FUNCS}),', DL_VARS => ',neatvalue($att{DL_VARS}),',NAME => ',$att{NAME},')"
- $(PERL) $(I_PERL_LIBS) -e "open OPT,\'>>$(MMS$TARGET)\'; print OPT ""$(INST_STATIC)/Include=$(BASEEXT)\n$(INST_STATIC)/Library\n"";close OPT"
+ $(PERL) "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)" -e "use ExtUtils::MakeMaker; mksymlists(DL_FUNCS => ',neatvalue($att{DL_FUNCS}),', DL_VARS => ',neatvalue($att{DL_VARS}),',NAME => \'',$att{NAME},'\')"
+ $(PERL) -e "open OPT,\'>>$(MMS$TARGET)\'; print OPT ""$(INST_STATIC)/Include=$(BASEEXT)\n$(INST_STATIC)/Library\n"";close OPT"
+ @ $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR).packlist\';print F \'$(MMS$TARGET)\';close F;"
');
join('',@m);
@@ -332,9 +468,11 @@ OTHERLDFLAGS = $otherldflags
";
push @m, '
-$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt perlshr.opt $(BASEEXT).opt
+$(INST_DYNAMIC) : $(INST_STATIC) $(PERL_INC)perlshr_attr.opt $(INST_ARCHAUTODIR)perlshr.opt $(INST_ARCHAUTODIR)$(BASEEXT).opt
@ $(MKPATH) $(INST_ARCHAUTODIR)
- Link $(LDFLAGS) /Shareable=$(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,perlshr.opt/Option,$(PERL_INC)perlshr_attr.opt/Option
+ Link $(LDFLAGS) /Shareable=$(MMS$TARGET)$(OTHERLDFLAGS) $(INST_ARCHAUTODIR)$(BASEEXT).opt/Option,perlshr.opt/Option,$(PERL_INC)perlshr_attr.opt/Option
+ $(CHMOD) 755 $(MMS$TARGET)
+ @ $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR).packlist\';print F \'$(MMS$TARGET)\';close F;"
';
join('',@m);
@@ -348,25 +486,34 @@ BOOTSTRAP = '."$att{BASEEXT}.bs".'
# As MakeMaker mkbootstrap might not write a file (if none is required)
# we use touch to prevent make continually trying to remake it.
# The DynaLoader only reads a non-empty file.
-$(BOOTSTRAP): '."$att{MAKEFILE} $att{BOOTDEP}".'
+$(BOOTSTRAP) : '."$att{MAKEFILE} $att{BOOTDEP}".'
@ Write Sys$Output "Running mkbootstrap for $(NAME) ($(BSLOADLIBS))"
- @ $(PERL) $(I_PERL_LIBS) -e "use ExtUtils::MakeMaker; &mkbootstrap(""$(BSLOADLIBS)"");" "INST_LIB=$(INST_LIB)" "INST_ARCHLIB=$(INST_ARCHLIB)" "PERL_SRC=$(PERL_SRC)" "NAME=$(NAME)"
- @ $(TOUCH) $(BOOTSTRAP)
+ @ $(PERL) "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)" -e "use ExtUtils::Mkbootstrap; Mkbootstrap(\'$(BASEEXT)\',\'$(BSLOADLIBS)\');"
+ @ $(TOUCH) $(MMS$TARGET)
+ $(CHMOD) 644 $(MMS$TARGET)
+ @ $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR).packlist\';print F \'$(MMS$TARGET)\';close F;"
-$(INST_BOOT): $(BOOTSTRAP)
+$(INST_BOOT) : $(BOOTSTRAP)
@ '.$att{RM_RF}.' $(INST_BOOT)
- - '.$att{CP}.' $(BOOTSTRAP) $(INST_BOOT)
+ - $(CP) $(BOOTSTRAP) $(INST_BOOT)
+ $(CHMOD) 644 $(MMS$TARGET)
+ @ $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR).packlist\';print F \'$(MMS$TARGET)\';close F;"
';
}
# --- Static Loading Sections ---
sub static_lib {
- '
-$(INST_STATIC) : $(OBJECT), $(MYEXTLIB)
- @ $(MKPATH) $(INST_ARCHAUTODIR)
+ my(@m);
+ push @m,'
+$(INST_STATIC) : $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR).exists
If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET)
Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)
+ $(CHMOD) 755 $(MMS$TARGET)
+ @ $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR)extralibs.ld\';print F \'$(EXTRALIBS)\';close F;"
+ @ $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR).packlist\';print F \'$(MMS$TARGET)\';close F;"
';
+ push @m, MM->dir_target('$(INST_ARCHAUTODIR)');
+ join('',@m);
}
@@ -374,14 +521,15 @@ sub installpm_x { # called by installpm perl file
my($self, $dist, $inst, $splitlib) = @_;
$inst = fixpath($inst);
$dist = vmsify($dist);
- my($instdir) = dirname($inst);
+ my($instdir) = $inst =~ /([^\)]+\))[^\)]*$/ ? $1 : dirname($inst);
my(@m);
push(@m, "
-$inst : $dist $att{MAKEFILE}
-",' @ ',$att{RM_F},' $(MMS$TARGET);*
- @ $(MKPATH) ',$instdir,'
- @ ',$att{CP},' $(MMS$SOURCE) $(MMS$TARGET)
+$inst : $dist $att{MAKEFILE} ${instdir}.exists
+",' @ $(RM_F) $(MMS$TARGET);*
+ @ $(CP) $(MMS$SOURCE) $(MMS$TARGET)
+ $(CHMOD) 644 $(MMS$TARGET)
+ @ $(PERL) -e "open F,\'>>$(INST_ARCHAUTODIR).packlist\';print F \'$(MMS$TARGET)\';close F;"
');
if ($splitlib and $inst =~ /\.pm$/) {
my($attdir) = $splitlib;
@@ -389,46 +537,101 @@ $inst : $dist $att{MAKEFILE}
$attdir = $att{$attdir} if $att{$attdir};
push(@m, ' $(AUTOSPLITFILE) $(MMS$TARGET) ',
- vmspath(unixpath($attdir) . 'auto')."\n");
- push(@m,"\n");
+ vmspath(unixpath($attdir) . 'auto')."\n\n");
}
+ push(@m,MM->dir_target($instdir));
join('',@m);
}
+sub processPL {
+ return "" unless $att{PL_FILES};
+ my(@m, $plfile);
+ foreach $plfile (sort keys %{$att{PL_FILES}}) {
+ push @m, "
+all :: $att{PL_FILES}->{$plfile}
+
+$att{PL_FILES}->{$plfile} :: $plfile
+",' $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" '," $plfile
+";
+ }
+ join "", @m;
+}
-# --- Sub-directory Sections ---
-sub exescan {
- vmsify($_);
+sub installbin {
+ return "" unless $att{EXE_FILES} && ref $att{EXE_FILES} eq "ARRAY";
+ my(@m, $from, $to, %fromto, @to, $line);
+ for $from (@{$att{EXE_FILES}}) {
+ local($_)= '$(INST_EXE)' . basename($from);
+ $to = MY->exescan();
+ print "exescan($from) => '$to'" if ($Verbose >=2);
+ $fromto{$from}=$to;
+ }
+ @to = values %fromto;
+ push @m, "
+EXE_FILES = @{$att{EXE_FILES}}
+
+all :: @to
+
+realclean ::
+";
+ $line = ''; #avoid unitialized var warning
+ foreach $to (@to) {
+ if (length($line) + length($to) > 150) {
+ push @m, "\t\$(RM_F) $line\n";
+ $line = $to;
+ }
+ else { $line .= " $to"; }
+ }
+ push @m, "\t\$(RM_F) $line\n\n";
+
+ while (($from,$to) = each %fromto) {
+ my $todir;
+ if ($to =~ m#[/>:\]]#) { $todir = dirname($to); }
+ else { ($todir = $to) =~ s/[^\)]+$//; }
+ $todir = fixpath($todir);
+ push @m, "
+$to : $from $att{MAKEFILE} ${todir}.exists
+ \$(CP) \$(MMS\$SOURCE_LIST) \$(MMS\$TARGET)
+
+", MY->dir_target($todir);
+ }
+ join "", @m;
}
+# --- Sub-directory Sections ---
+
sub subdir_x {
my($self, $subdir) = @_;
my(@m);
+ $subdir = vmspath($subdir);
# The intention is that the calling Makefile.PL should define the
# $(SUBDIR_MAKEFILE_PL_ARGS) make macro to contain whatever
# information needs to be passed down to the other Makefile.PL scripts.
# If this does not suit your needs you'll need to write your own
# MY::subdir_x() method to override this one.
push @m, '
-config :: ',vmspath($subdir) . '$(MAKEFILE)
- $(MMS) $(USEMAKEFILE) $(MMS$SOURCE) config $(USEMACROS)(INST_LIB=$(INST_LIB),INST_ARCHLIB=$(INST_ARCHLIB), \\
- LINKTYPE=$(LINKTYPE),INST_EXE=$(INST_EXE),LIBPERL_A=$(LIBPERL_A)$(MACROEND) $(SUBDIR_MAKEFILE_PL_ARGS)
+config :: ',$subdir,'$(MAKEFILE)
+ olddef = F$Environment("Default")
+ Set Default ',$subdir,'
+ $(MMS) config $(PASTHRU1) $(SUBDIR_MAKEFILE_PL_ARGS)
+ Set Default \'olddef\'
-',vmspath($subdir),'$(MAKEFILE) : ',vmspath($subdir),'Makefile.PL, $(CONFIGDEP)
+',$subdir,'$(MAKEFILE) : ',$subdir,'Makefile.PL, $(CONFIGDEP)
@Write Sys$Output "Rebuilding $(MMS$TARGET) ..."
$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::MakeMaker; MM->runsubdirpl(qw('.$subdir.'))" \\
- $(SUBDIR_MAKEFILE_PL_ARGS) INST_LIB=$(INST_LIB) INST_ARCHLIB=$(INST_ARCHLIB) \\
- INST_EXE=$(INST_EXE) LIBPERL_A=$(LIBPERL_A) LINKTYPE=$(LINKTYPE)
+ $(PASTHRU1) $(SUBDIR_MAKEFILE_PL_ARGS)
@Write Sys$Output "Rebuild of $(MMS$TARGET) complete."
# The default clean, realclean and test targets in this Makefile
# have automatically been given entries for $subdir.
subdirs ::
- Set Default ',vmspath($subdir),'
- $(MMS) all $(USEMACROS)LINKTYPE=$(LINKTYPE)$(MACROEND)
+ olddef = F$Environment("Default")
+ Set Default ',$subdir,'
+ $(MMS) all $(PASTHRU2)
+ Set Default \'olddef\'
';
join('',@m);
}
@@ -440,25 +643,34 @@ sub clean {
my($self, %attribs) = @_;
my(@m);
push @m, '
-# Delete temporary files but do not touch installed files
-# We don\'t delete the Makefile here so that a
-# later make realclean still has a makefile to work from
+# Delete temporary files but do not touch installed files. We don\'t delete
+# the Descrip.MMS here so that a later make realclean still has it to use.
clean ::
';
foreach (@{$att{DIR}}) { # clean subdirectories first
my($vmsdir) = vmspath($_);
- push( @m, ' If F$Search("'.$vmsdir.'$(MAKEFILE)") Then $(MMS) $(USEMAKEFILE)'.$vmsdir.'$(MAKEFILE) clean'."\n");
+ push( @m, ' If F$Search("'.$vmsdir.'$(MAKEFILE)") Then \\',"\n\t",
+ '$(PERL) -e "chdir ',"'$vmsdir'",'; print `$(MMS) clean`;"',"\n");
}
- push @m, "
- $att{RM_F} *.Map;* *.lis;* *.cpp;* *.Obj;* *.Olb;* \$(BOOTSTRAP);* \$(BASEEXT).bso;*
-";
+ push @m, ' $(RM_F) *.Map;* *.lis;* *.cpp;* *.Obj;* *.Olb;* $(BOOTSTRAP);* $(BASEEXT).bso;*
+';
my(@otherfiles) = values %{$att{XS}}; # .c files from *.xs files
push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
push(@otherfiles, "blib.dir");
- push(@m, " $att{RM_F} ".join(";* ", map(fixpath($_),@otherfiles)),";*\n");
+ my($file,$line);
+ $line = ''; #avoid unitialized var warning
+ foreach $file (@otherfiles) {
+ $file = fixpath($file);
+ if (length($line) + length($file) > 150) {
+ push @m, "\t\$(RM_F) $line\n";
+ $line = "$file;*";
+ }
+ else { $line .= " $file;*"; }
+ }
+ push @m, "\t\$(RM_F) $line\n\n";
# See realclean and ext/utils/make_ext for usage of Makefile.old
- push(@m, " $att{MV} $att{MAKEFILE} $att{MAKEFILE}_old");
+ push(@m, ' $(MV) $(MAKEFILE) $(MAKEFILE)_old');
push(@m, " $attribs{POSTOP}\n") if $attribs{POSTOP};
join('', @m);
}
@@ -473,37 +685,106 @@ realclean :: clean
');
foreach(@{$att{DIR}}){
my($vmsdir) = vmspath($_);
- push(@m, ' If F$Search("'."$vmsdir$att{MAKEFILE}".'").nes."" Then $(MMS) $(USEMAKEFILE)'."$vmsdir$att{MAKEFILE}".' realclean'."\n");
- push(@m, ' If F$Search("'."$vmsdir$att{MAKEFILE}".'_old").nes."" Then $(MMS) $(USEMAKEFILE)'."$vmsdir$att{MAKEFILE}".'_old realclean'."\n");
+ push(@m, ' If F$Search("'."$vmsdir$att{MAKEFILE}".'").nes."" Then \\',"\n\t",
+ '$(PERL) -e "chdir ',"'$vmsdir'",'; print `$(MMS) realclean`;"',"\n");
+ push(@m, ' If F$Search("'."$vmsdir$att{MAKEFILE}".'_old").nes."" \\',"\n\t",
+ '$(PERL) -e "chdir ',"'$vmsdir'",'; print `$(MMS) $(USEMAKEFILE)$(MAKEFILE)_old realclean`;"'."\n");
}
- push @m,'
- ',$att{RM_RF},' $(INST_AUTODIR) $(INST_ARCHAUTODIR)
- ',$att{RM_F},' *.Opt;* $(INST_DYNAMIC);* $(INST_STATIC);* $(INST_BOOT);* $(INST_PM);*
- ',$att{RM_F},' $(OBJECT);* $(MAKEFILE);* $(MAKEFILE)_old;*
+ push @m,' $(RM_RF) $(INST_AUTODIR) $(INST_ARCHAUTODIR)
';
- push(@m, " $att{RM_RF} ".join(";* ", map(fixpath($_),$attribs{'FILES'})),";*\n") if $attribs{'FILES'};
+ my($file,$line);
+ my(@files) = qw{ *.Opt $(INST_DYNAMIC) $(INST_STATIC) $(INST_BOOT) $(INST_PM) $(OBJECT) $(MAKEFILE) $(MAKEFILE)_old };
+ $line = ''; #avoid unitialized var warning
+ foreach $file (@files) {
+ $file = fixpath($file);
+ if (length($line) + length($file) > 150) {
+ push @m, "\t\$(RM_F) $line\n";
+ $line = "$file;*";
+ }
+ else { $line .= " $file;*"; }
+ }
+ push @m, "\t\$(RM_F) $line\n";
+ if ($attribs{FILES} && ref $attribs{FILES} eq 'ARRAY') {
+ foreach $file (@{$attribs{'FILES'}}) {
+ $file = unixify($file);
+ if (length($line) + length($file) > 150) {
+ push @m, "\t\$(RM_RF) $line\n";
+ $line = "$file;*";
+ }
+ else { $line .= " $file;*"; }
+ }
+ }
+ push @m, "\t\$(RM_RF) $line\n";
push(@m, " $attribs{POSTOP}\n") if $attribs{POSTOP};
join('', @m);
}
-sub distclean {
+sub dist {
my($self, %attribs) = @_;
- my($preop) = $attribs{PREOP} || '@ !'; # e.g., update MANIFEST
- my($zipname) = $attribs{TARNAME} || '$(DISTNAME)-$(VERSION)';
- my($zipflags) = $attribs{ZIPFLAGS} || '-Vu';
- my($postop) = $attribs{POSTOP} || "";
+ my(@m);
+ if ($attribs{TARNAME}){
+ print STDOUT "Error (fatal): Attribute TARNAME for target dist is deprecated
+Please use DISTNAME and VERSION";
+ }
+ my($name) = $attribs{NAME} || '$(DISTNAME)-$(VERSION)';
+ my($zip) = $attribs{ZIP} || 'zip';
+ my($zipflags) = $attribs{ZIPFLAGS} || '-Vu';
+ my($suffix) = $attribs{SUFFIX} || '';
+ my($shar) = $attribs{SHAR} || 'vms_share';
+ my($preop) = $attribs{PREOP} || '@ !'; # e.g., update MANIFEST
+ my($postop) = $attribs{POSTOP} || '@ !';
+ my($dist_default) = $attribs{DIST_DEFAULT} || 'zipdist';
my($mkfiles) = join(' ', map("$_\$(MAKEFILE) $_\$(MAKEFILE)_old",map(vmspath($_),@{$att{'DIR'}})));
- "
-distclean : clean
- $preop
- $att{RM_F} $mkfiles
- Zip \"$zipflags\" $zipname \$(BASEEXT).* Makefile.PL
- $postop
+ my($src) = $name;
+ $src = "[.$src]" unless $src =~ /\[/;
+ $src =~ s#\]#...]#;
+ $src .= '*.*' if $src =~ /\]$/;
+ $suffix =~ s#\.#_#g;
+ push @m,"
+ZIP = $zip
+ZIPFLAGS = $zipflags
+SUFFIX = $suffix
+SHARE = $shar
+PREOP = $preop
+POSTOP = $postop
+DIST_DEFAULT = $dist_default
";
-}
+ push @m, '
+distclean :: realclean distcheck
+
+distcheck :
+ $(PERL) "-I$(PERL_LIB)" -e "use ExtUtils:Manifest \'&fullcheck\'; &fullcheck;"
+
+manifest :
+ $(PERL) "-I$(PERL_LIB)" -e "use ExtUtils:Manifest \'&mkmanifest\'; &mkmanifest;"
+
+dist : $(DIST_DEFAULT)
+
+zipdist : ',"${name}.zip$suffix
+
+${name}.zip_$suffix : distdir
+ ",'$(PREOP)
+ $(ZIP) "$(ZIPFLAGS)" $(MMS$TARGET) ',$src,'
+ $(RM_RF) ',$name,'
+ $(POSTOP)
+
+shdist : distdir
+ $(PREOP)
+ $(SHARE) ',"$src ${name}.share$suffix",'
+ $(RM_RF) ',$name,'
+ $(POSTOP)
+
+distdir :
+ $(RM_RF) ',$name,'
+ $(PERL) "-I$(PERL_LIB)" -e use ExtUtils::Manifest \'/mani/\';" \\
+ -e "manicopy(maniread(),',"'$name'",');
+';
+
+ join('',@m);
+}
# --- Test and Installation Sections ---
@@ -512,16 +793,19 @@ sub test {
my($tests) = $attribs{TESTS} || ( -d 't' ? 't/*.t' : '');
my(@m);
push @m,'
+TEST_VERBOSE = 0
+
test : all
-';
- push(@m,' $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" $(I_PERL_LIBS) -e "use Test::Harness; runtests @ARGV;" '.$tests."\n")
+' if $tests;
+ push(@m,' $(FULLPERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)" \\',"\n\t",
+ '-e "use Test::Harness qw(&runtests $$verbose); $$verbose=$(TEST_VERBOSE); runtests @ARGV;" \\',"\n\t$tests\n")
if $tests;
- push(@m,' $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" $(I_PERL_LIBS) test.pl',"\n")
+ push(@m,' $(FULLPERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_LIB)" "-I$(PERL_ARCHLIB)" test.pl',"\n")
if -f 'test.pl';
foreach(@{$att{DIR}}){
my($vmsdir) = vmspath($_);
- push(@m, ' If F$Search("',$vmsdir,'$(MAKEFILE)").nes."" Then $(PERL) -e "chdir \'',$vmsdir,
- '\'; print `$(MMS) $(USEMAKEFILE)$(MAKEFILE) $(USEMACRO)LINKTYPE=$(LINKTYPE)$(MACROEND) test`'."\n");
+ push(@m, ' If F$Search("',$vmsdir,'$(MAKEFILE)").nes."" Then $(PERL) -e "chdir ',"'$vmsdir'",
+ '; print `$(MMS) $(PASTHRU2) test`'."\n");
}
push(@m, "\t\@echo 'No tests defined for \$(NAME) extension.'\n") unless @m > 1;
@@ -533,9 +817,10 @@ sub install {
my(@m);
push @m, q{
doc_install ::
- @ $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" $(I_PERL_LIBS) \\
+ @ $(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_LIB)" "_I$(PERL_ARCHLIB)" \\
-e "use ExtUtils::MakeMaker; MM->writedoc('Module', '$(NAME)', \\
- 'LINKTYPE=$(LINKTYPE)', 'VERSION=$(VERSION)', 'EXE_FILES=$(EXE_FILES)')"
+ 'LINKTYPE=$(LINKTYPE)', 'VERSION=$(VERSION)', 'EXE_FILES=$(EXE_FILES)')" \\
+ >>$(INSTALLARCHLIB)perllocal.pod
};
push(@m, "
@@ -546,15 +831,30 @@ pure_install :: all
# install subdirectories first
foreach(@{$att{DIR}}){
my($vmsdir) = vmspath($_);
- push(@m, ' If F$Search("',$vmsdir,'$(MAKEFILE)").nes."" Then $(PERL) -e "chdir \'',$vmsdir,
- '\'; print `$(MMS) $(USEMAKEFILE)$(MAKEFILE) install`'."\n");
+ push(@m, ' If F$Search("',$vmsdir,'$(MAKEFILE)").nes."" Then $(PERL) -e "chdir ',"'$vmsdir'",
+ '; print `$(MMS) install`"'."\n");
}
- push(@m, "\t! perl5.000 used to autosplit into INST_ARCHLIB, we delete these old files here
- $att{RM_F} ",fixpath(unixpath($Config{'installarchlib'}).'auto/$(FULLEXT)/*.al'),';* ',
- fixpath(unixpath($Config{'installarchlib'}).'auto/$(FULLEXT)/*.ix'),";*
- \$(MMS) \$(USEMACROS)INST_LIB=$Config{'installprivlib'},INST_ARCHLIB=$Config{'installarchlib'},INST_EXE=$Config{'installbin'}\$(MACROEND)
-");
+ push(@m, '
+ @ $(PERL) -e "foreach (@ARGV){die qq{You do not have permissions to install into $$_\n} unless -w $$_}" $(INSTALLPRIVLIB) $(INSTALLARCHLIB)
+ ! perl5.000 and MM pre 3.8 used to autosplit into INST_ARCHLIB, we delete these old files here
+ $(RM_F) ',fixpath('$(INSTALLARCHLIB)/auto/$(FULLEXT)/*.al;*'),' ',
+ fixpath('$(INSTALLARCHLIB)/auto/$(FULLEXT)/*.ix;*'),"
+ \$(MMS) \$(USEMACROS)INST_LIB=$att{INSTALLPRIVLIB},INST_ARCHLIB=$att{INSTALLARCHLIB},INST_EXE=$att{INSTALLBIN}\$(MACROEND)",'
+ @ $(PERL) -i_bak -lne "print unless $seen{$_}++" $(INST_ARCHAUTODIR).packlist
+');
+
+ push @m, '
+#### UNINSTALL IS STILL EXPERIMENTAL ####
+uninstall ::
+';
+ foreach(@{$att{DIR}}){
+ my($vmsdir) = vmspath($_);
+ push(@m, ' If F$Search("',$vmsdir,'$(MAKEFILE)").nes."" Then $(PERL) -e "chdir ',"'$vmsdir'",
+ '; print `$(MMS) uninstall`"'."\n");
+ }
+ push @m, "\t".'$(PERL) -e "use File::Path; foreach (<>) {chomp;rmtree($_,1,0);}" $(INST_ARCHAUTODIR).packlist
+';
join("",@m);
}
@@ -571,14 +871,20 @@ $(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perly.h, $(PERL_INC)pp.h, $(PERL_INC)p
$(OBJECT) : $(PERL_INC)regcomp.h, $(PERL_INC)regexp.h, $(PERL_INC)scope.h, $(PERL_INC)sv.h
$(OBJECT) : $(PERL_INC)vmsish.h, $(PERL_INC)util.h, $(PERL_INC)config.h
-';
- push(@m,'
+' if $att{OBJECT};
-$(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
- @ Write Sys$Error "$(PERL_ARCHLIB)/Config.pm may be out of date with $(PERL_SRC)/config.sh"
+ push(@m,'
+# Check for unpropogated config.sh changes. Should never happen.
+# We do NOT just update config.h because that is not sufficient.
+# An out of date config.h is not fatal but complains loudly!
+$(PERL_INC)config.h : $(PERL_SRC)config.sh
+ @ Write Sys$Error "Warning: $(PERL_INC)config.h out of date with $(PERL_SRC)config.sh"
+
+$(PERL_ARCHLIB)Config.pm : $(PERL_SRC)config.sh
+ @ Write Sys$Error "$(PERL_ARCHLIB)Config.pm may be out of date with $(PERL_SRC)config.sh"
Set Default $(PERL_SRC)
- $(MMS) $(USEMAKEFILE)[.VMS]$(MAKEFILE) [.lib]config.pm
-');
+ $(MMS) $(USEMAKEFILE)[.VMS]$(MAKEFILE) [.lib.',$Config{'arch'},']config.pm
+') if $att{PERL_SRC};
push(@m, join(" ", map(vmsify($_),values %{$att{XS}}))." : \$(XSUBPPDEPS)\n")
if %{$att{XS}};
@@ -588,24 +894,51 @@ $(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
sub makefile {
my(@m,@cmd);
- push(@m,'
+ # We do not know what target was originally specified so we
+ # must force a manual rerun to be sure. But as it should only
+ # happen very rarely it is not a significant problem.
+ push @m, '
+$(OBJECT) : $(MAKEFILE)
# We take a very conservative approach here, but it\'s worth it.
# We move $(MAKEFILE) to $(MAKEFILE)_old here to avoid gnu make looping.
$(MAKEFILE) : Makefile.PL $(CONFIGDEP)
- @ Write Sys$Output "',$att{MAKEFILE},' out-of-date with respect to $(MMS$SOURCE_LIST)"
- @ Write Sys$Output "Cleaning current config before rebuilding ',$att{MAKEFILE},'...
- - ',"$att{MV} $att{MAKEFILE} $att{MAKEFILE}_old",'
- - $(MMS) $(USEMAKEFILE)',$att{MAKEFILE},'_old clean
- $(PERL) $(I_PERL_LIBS) Makefile.PL
+ @ Write Sys$Output "$(MAKEFILE) out-of-date with respect to $(MMS$SOURCE_LIST)"
+ @ Write Sys$Output "Cleaning current config before rebuilding $(MAKEFILE) ..."
+ - $(MV) $(MAKEFILE) $(MAKEFILE)_old
+ - $(MMS) $(USEMAKEFILE)$(MAKEFILE)_old clean
+ $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" Makefile.PL ',join(' ',@ARGV),'
@ Write Sys$Output "Now you must rerun $(MMS)."
-');
+';
join('',@m);
}
+# --- Make-Directories section (internal method) ---
+# dir_target(@array) returns a Makefile entry for the file .exists in each
+# named directory. Returns nothing, if the entry has already been processed.
+# We're helpless though, if the same directory comes as $(FOO) _and_ as "bar".
+# Both of them get an entry, that's why we use "::". I chose '$(PERL)' as the
+# prerequisite, because there has to be one, something that doesn't change
+# too often :)
+%Dir_Target = (); # package global
+
+sub dir_target {
+ my($self,@dirs) = @_;
+ my(@m,$dir);
+ foreach $dir (@dirs) {
+ next if $Dir_Target{$dir};
+ my($vmsdir) = fixpath($dir);
+ push @m, "
+${vmsdir}.exists :: \$(PERL_INC)perl.h
+ \@ \$(MKPATH) $vmsdir
+ \@ \$(TOUCH) ${vmsdir}.exists
+";
+ $Dir_Target{$dir}++;
+ }
+ join "", @m;
+}
-# --- Determine libraries to use and how to use them ---
sub makeaperl {
my($self, %attribs) = @_;
@@ -621,6 +954,7 @@ sub makeaperl {
# Which *.olb files could we make use of...
local(%olbs);
+ $olbs{$att{INST_ARCHAUTODIR}} = "$att{BASEEXT}.olb";
File::Find::find(sub {
return unless m/\.olb$/;
return if m/^libperl/;
@@ -749,13 +1083,6 @@ sub new_extliblist {
'','',''
}
-# --- Write a DynaLoader bootstrap file if required
-
-# VMS doesn't require a bootstrap file as a rule
-sub mkbootstrap {
- 1;
-}
-
sub mksymlists {
my($self,%attribs) = @_;
@@ -810,671 +1137,3 @@ sub nicetext {
1;
__END__
-# MM_VMS.pm
-# MakeMaker default methods for VMS
-# This package is inserted into @ISA of MakeMaker's MM before the
-# built-in MM_Unix methods if MakeMaker.pm is run under VMS.
-#
-# Version: 4.03
-# Author: Charles Bailey bailey@genetics.upenn.edu
-# Revised: 30-Jan-1995
-
-package ExtUtils::MM_VMS;
-
-use Config;
-require Exporter;
-use File::VMSspec;
-use File::Basename;
-
-Exporter::import('ExtUtils::MakeMaker',
- qw(%att %skip %Recognized_Att_Keys $Verbose &neatvalue));
-
-
-sub fixpath {
- my($path) = @_;
- my($head,$macro,$tail);
-
- while (($head,$macro,$tail) = ($path =~ m#(.*?)\$\((\S+?)\)/(.*)#)) {
- ($macro = unixify($att{$macro})) =~ s#/$##;
- $path = "$head$macro/$tail";
- }
- vmsify($path);
-}
-
-
-sub init_others {
- &MM_Unix::init_others;
- $att{NOOP} = "\tContinue";
- $att{MAKEFILE} = '$(MAKEFILE)';
- $att{RM_F} = '$(PERL) -e "foreach (@ARGV) { -d $_ ? rmdir $_ : unlink $_}"';
- $att{RM_RF} = '$(FULLPERL) -e "use File::Path; use File::VMSspec; @dirs = map(unixify($_),@ARGV); rmtree(\@dirs,0,0)"';
- $att{TOUCH} = '$(PERL) -e "$t=time; utime $t,$t,@ARGV"';
- $att{CP} = 'Copy/NoConfirm';
- $att{MV} = 'Rename/NoConfirm';
-}
-
-sub constants {
- my(@m,$def);
- push @m, "
-NAME = $att{NAME}
-DISTNAME = $att{DISTNAME}
-VERSION = $att{VERSION}
-
-# In which library should we install this extension?
-# This is typically the same as PERL_LIB.
-# (also see INST_LIBDIR and relationship to ROOTEXT)
-INST_LIB = ",vmspath($att{INST_LIB}),"
-INST_ARCHLIB = ",vmspath($att{INST_ARCHLIB}),"
-
-# Perl library to use when building the extension
-PERL_LIB = ",vmspath($att{PERL_LIB}),"
-PERL_ARCHLIB = ",vmspath($att{PERL_ARCHLIB}),"
-";
-
-# Define I_PERL_LIBS to include the required -Ipaths
-# To be cute we only include PERL_ARCHLIB if different
-# To be portable we add quotes for VMS
-my(@i_perl_libs) = qw{-I$(PERL_ARCHLIB) -I$(PERL_LIB)};
-shift(@i_perl_libs) if ($att{PERL_ARCHLIB} eq $att{PERL_LIB});
-push @m, "I_PERL_LIBS = \"".join('" "',@i_perl_libs)."\"\n";
-
- push @m, "
-# Where is the perl source code located? (Eventually we should
-# be able to build extensions without requiring the perl source
-# but that's a long way off yet).
-PERL_SRC = ",vmspath($att{PERL_SRC}),"
-# Perl header files (will eventually be under PERL_LIB)
-PERL_INC = ",vmspath($att{PERL_INC}),"
-# Perl binaries
-PERL = $att{PERL}
-FULLPERL = $att{FULLPERL}
-
-# FULLEXT = Pathname for extension directory (eg DBD/Oracle).
-# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT.
-# ROOTEXT = Directory part of FULLEXT with leading slash (e.g /DBD)
-FULLEXT = ",vmsify($att{FULLEXT}),"
-BASEEXT = $att{BASEEXT}
-ROOTEXT = ",$att{ROOTEXT} eq '' ? '[]' : vmspath($att{ROOTEXT}),"
-
-INC = ";
-
- if ($att{'INC'}) {
- push @m,'/Include=(';
- my(@includes) = split(/\s+/,$att{INC});
- foreach (@includes) {
- s/^-I//;
- push @m,vmspath($_);
- }
- push @m, ")\n";
- }
-
- if ($att{DEFINE} ne '') {
- my(@defs) = split(/\s+/,$att{DEFINE});
- foreach $def (@defs) {
- $def =~ s/^-D//;
- $def = "\"$def\"" if $def =~ /=/;
- }
- $att{DEFINE} = join ',',@defs;
- }
-
- push @m,"
-DEFINE = $att{DEFINE}
-OBJECT = ",vmsify($att{OBJECT}),"
-LDFROM = ",vmsify($att{LDFROM}),"
-LINKTYPE = $att{LINKTYPE}
-
-# Handy lists of source code files:
-XS_FILES = ",join(', ', sort keys %{$att{XS}}),"
-C_FILES = ",join(', ', @{$att{C}}),"
-O_FILES = ",join(', ', @{$att{O_FILES}}),"
-H_FILES = ",join(', ', @{$att{H}}),"
-
-.SUFFIXES : .xs
-
-# This extension may link to it's own library (see SDBM_File)";
- push @m,"
-MYEXTLIB = ",vmsify($att{MYEXTLIB}),"
-
-# Here is the Config.pm that we are using/depend on
-CONFIGDEP = \$(PERL_ARCHLIB)Config.pm, \$(PERL_INC)config.h
-
-# Where to put things:
-INST_LIBDIR = ",($att{'INST_LIBDIR'} = vmspath(unixpath($att{INST_LIB}) . unixpath($att{ROOTEXT}))),"
-INST_ARCHLIBDIR = ",($att{'INST_ARCHLIBDIR'} = vmspath(unixpath($att{INST_ARCHLIB}) . unixpath($att{ROOTEXT}))),"
-
-INST_AUTODIR = ",($att{'INST_AUTODIR'} = vmspath(unixpath($att{INST_LIB}) . 'auto/' . unixpath($att{FULLEXT}))),'
-INST_ARCHAUTODIR = ',($att{'INST_ARCHAUTODIR'} = vmspath(unixpath($att{INST_ARCHLIB}) . 'auto/' . unixpath($att{FULLEXT}))),'
-
-INST_STATIC = $(INST_ARCHLIBDIR)$(BASEEXT).olb
-INST_DYNAMIC = $(INST_ARCHAUTODIR)$(BASEEXT).$(DLEXT)
-INST_BOOT = $(INST_ARCHAUTODIR)$(BASEEXT).bs
-INST_PM = ',join(', ',map(fixpath($_),sort values %{$att{PM}})),'
-';
-
- join('',@m);
-}
-
-
-sub const_cccmd {
- my($cmd) = $Config{'cc'};
- my($name,$sys,@m);
-
- ( $name = $att{NAME} . "_cflags" ) =~ s/:/_/g ;
- warn "Unix shell script ".$Config{"$att{'BASEEXT'}_cflags"}.
- " required to modify CC command for $att{'BASEEXT'}\n"
- if ($Config{$name});
-
- # Deal with $att{DEFINE} here since some C compilers pay attention
- # to only one /Define clause on command line, so we have to
- # conflate the ones from $Config{'cc'} and $att{DEFINE}
- if ($att{DEFINE} ne '') {
- if ($cmd =~ m:/define=\(?([^\(\/\)]+)\)?:i) {
- $cmd = $` . "/Define=(" . $1 . ",$att{DEFINE})" . $';
- }
- else { $cmd .= "/Define=($att{DEFINE})" }
- }
-
- $sys = ($cmd =~ /^gcc/i) ? 'GNU_CC_Include:[VMS]' : 'Sys$Library';
- push @m,'
-.FIRST
- @ If F$TrnLnm("Sys").eqs."" Then Define/NoLog SYS ',$sys,'
-
-';
- push(@m, "CCCMD = $cmd\n");
-
- join('',@m);
-}
-
-
-
-sub const_loadlibs{
- my (@m);
- push @m, "
-# $att{NAME} might depend on some other libraries.
-#
-# Dependent libraries are linked in either by the Link command
-# at build time or by the DynaLoader at bootstrap time.
-#
-# These comments may need revising:
-#
-# EXTRALIBS = Full list of libraries needed for static linking.
-# Only those libraries that actually exist are included.
-#
-# BSLOADLIBS = List of those libraries that are needed but can be
-# linked in dynamically.
-#
-# LDLOADLIBS = List of those libraries which must be statically
-# linked into the shared library.
-#
-EXTRALIBS = ",map(vmsify($_) . ' ',$att{'EXTRALIBS'}),"
-BSLOADLIBS = ",map(vmsify($_) . ' ',$att{'BSLOADLIBS'}),"
-LDLOADLIBS = ",map(vmsify($_) . ' ',$att{'LDLOADLIBS'}),"\n";
-
- join('',@m);
-}
-
-# --- Tool Sections ---
-
-sub tool_autosplit{
- my($self, %attribs) = @_;
- my($asl) = "";
- $asl = "\$AutoSplit::Maxlen=$attribs{MAXLEN};" if $attribs{MAXLEN};
- q{
-# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
-AUTOSPLITFILE = $(PERL) $(I_PERL_LIBS) -e "use AutoSplit;}.$asl.q{ AutoSplit::autosplit($ARGV[0], $ARGV[1], 0, 1, 1) ;"
-};
-}
-
-sub tool_xsubpp{
- my($xsdir) = unixpath($att{PERL_LIB}).'ExtUtils';
- # drop back to old location if xsubpp is not in new location yet
- $xsdir = unixpath($att{PERL_SRC}).'ext' unless (-f "$xsdir/xsubpp");
- my(@tmdeps) = '$(XSUBPPDIR)typemap';
- push(@tmdeps, "typemap") if -f "typemap";
- my(@tmargs) = map("-typemap $_", @tmdeps);
- "
-XSUBPPDIR = ".vmspath($xsdir)."
-XSUBPP = \$(PERL) \$(XSUBPPDIR)xsubpp
-XSUBPPDEPS = @tmdeps
-XSUBPPARGS = @tmargs
-";
-}
-
-sub tools_other {
- "
-# Assumes \$(MMS) invokes MMS or MMK
-USEMAKEFILE = /Descrip=
-USEMACROS = /Macro=(
-MACROEND = )
-MAKEFILE = Descrip.MMS
-SHELL = Posix
-LD = $att{LD}
-TOUCH = $att{TOUCH}
-CP = $att{CP}
-RM_F = $att{RM_F}
-RM_RF = $att{RM_RF}
-MKPATH = Create/Directory
-";
-}
-
-
-# --- Translation Sections ---
-
-sub c_o {
- '
-.c.obj :
- $(CCCMD) $(CCCDLFLAGS) /Include=($(PERL_INC)) $(INC) $(MMS$TARGET_NAME).c
-';
-}
-
-sub xs_c {
- '
-.xs.c :
- $(XSUBPP) $(XSUBPPARGS) $(MMS$TARGET_NAME).xs >$(MMS$TARGET)
-';
-}
-
-sub xs_o { # many makes are too dumb to use xs_c then c_o
- '
-.xs.obj :
- $(XSUBPP) $(XSUBPPARGS) $(MMS$TARGET_NAME).xs >$(MMS$TARGET_NAME).c
- $(CCCMD) $(CCCDLFLAGS) /Include=($(PERL_INC)) $(INC) $(MMS$TARGET_NAME).c
-';
-}
-
-
-# --- Target Sections ---
-
-sub top_targets{
- '
-all :: config linkext $(INST_PM)
-'.$att{NOOP}.'
-
-config :: '.$att{MAKEFILE}.'
- @ $(MKPATH) $(INST_LIBDIR), $(INST_ARCHAUTODIR)
-';
-}
-
-sub dlsyms {
- my($self,%attribs) = @_;
- my($funcs) = $attribs{DL_FUNCS} || $att{DL_FUNCS} || {};
- my($vars) = $attribs{DL_VARS} || $att{DL_VARS} || [];
- my(@m);
-
- push(@m,'
-dynamic :: perlshr.opt $(BASEEXT).opt
- ',$att{NOOP},'
-
-perlshr.opt : makefile.PL
- $(FULLPERL) $(I_PERL_LIBS) -e "use ExtUtils::MakeMaker; mksymlists(DL_FUNCS => ',
- %$funcs ? neatvalue($funcs) : "' '",', DL_VARS => ',
- @$vars ? neatvalue($vars) : "' '",')"
-') unless $skip{'dynamic'};
-
- push(@m,'
-static :: $(BASEEXT).opt
- ',$att{NOOP},'
-') unless $skip{'static'};
-
- push(@m,'
-$(BASEEXT).opt : makefile.PL
- $(FULLPERL) $(I_PERL_LIBS) -e "use ExtUtils::MakeMaker; mksymlists(DL_FUNCS => ',neatvalue($att{DL_FUNCS}),', DL_VARS => ',neatvalue($att{DL_VARS}),')"
-');
-
- join('',@m);
-}
-
-
-# --- Dynamic Loading Sections ---
-
-sub dynamic_lib {
- my($self, %attribs) = @_;
- my($otherldflags) = $attribs{OTHERLDFLAGS} || "";
- my(@m);
- push @m,"
-
-OTHERLDFLAGS = $otherldflags
-
-";
- push @m, '
-$(INST_DYNAMIC) : $(OBJECT) $(MYEXTLIB) $(PERL_INC)perlshr_attr.opt $(PERL_INC)crtl.opt perlshr.opt $(BASEEXT).opt
- @ $(MKPATH) $(INST_ARCHAUTODIR)
- Link $(LDFLAGS) /Shareable/Executable=$(MMS$TARGET)$(OTHERLDFLAGS) $(OBJECT),$(PERL_INC)perlshr_attr.opt/Option,$(PERL_INC)crtl.opt/Option,[]perlshr.opt/Option,[]$(BASEEXT).opt/Option
-';
-
- join('',@m);
-}
-
-# --- Static Loading Sections ---
-
-sub static_lib {
- my(@m);
- push @m, <<'END';
-$(INST_STATIC) : $(OBJECT), $(MYEXTLIB)
- If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET)
- Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)
-END
- push @m,"
- $att{CP}",'$(MMS$SOURCE) $(INST_ARCHAUTODIR)
- $(PERL) -e "print ""$(MMS$TARGET)\n""" >$(INST_ARCHAUTODIR)extralibs.ld
-';
- push @m, <<'END' if $att{PERL_SRC};
- @! Old mechanism - still needed:
- $(PERL) -e "print ""$(MMS$TARGET)\n""" >>$(PERL_SRC)ext.libs
-END
-
- join('',@m);
-}
-
-
-sub installpm_x { # called by installpm perl file
- my($self, $dist, $inst, $splitlib) = @_;
- $inst = fixpath($inst);
- $dist = vmsify($dist);
- my($instdir) = dirname($inst);
- my(@m);
-
- push(@m, "
-$inst : $dist
-",' @ ',$att{RM_F},' $(MMS$TARGET);*
- @ $(MKPATH) ',$instdir,'
- @ ',$att{CP},' $(MMS$SOURCE) $(MMS$TARGET)
-');
- if ($splitlib and $inst =~ /\.pm$/) {
- my($attdir) = $splitlib;
- $attdir =~ s/\$\((.*)\)/$1/;
- $attdir = $att{$attdir} if $att{$attdir};
-
- push(@m, ' $(AUTOSPLITFILE) $(MMS$TARGET) ',
- vmspath(unixpath($attdir) . 'auto')."\n");
- push(@m,"\n");
- }
-
- join('',@m);
-}
-
-
-# --- Sub-directory Sections ---
-
-sub subdir_x {
- my($self, $subdir) = @_;
- my(@m);
- # The intention is that the calling Makefile.PL should define the
- # $(SUBDIR_MAKEFILE_PL_ARGS) make macro to contain whatever
- # information needs to be passed down to the other Makefile.PL scripts.
- # If this does not suit your needs you'll need to write your own
- # MY::subdir_x() method to override this one.
- push @m, '
-config :: ',vmspath($subdir) . '$(MAKEFILE)
- $(MMS) $(USEMAKEFILE) $(MMS$SOURCE) config $(USEMACROS)(INST_LIB=$(INST_LIB),INST_ARCHLIB=$(INST_ARCHLIB),LINKTYPE=$(LINKTYPE)$(MACROEND)
-
-',vmspath($subdir),'$(MAKEFILE) : ',vmspath($subdir),'Makefile.PL, $(CONFIGDEP)
- @Write Sys$Output "Rebuilding $(MMS$TARGET) ..."
- $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e "use ExtUtils::MakeMaker; MM->runsubdirpl(qw('.$subdir.'))" \\
- $(SUBDIR_MAKEFILE_PL_ARGS) INST_LIB=$(INST_LIB) INST_ARCHLIB=$(INST_ARCHLIB)
- @Write Sys$Output "Rebuild of $(MMS$TARGET) complete."
-
-# The default clean, realclean and test targets in this Makefile
-# have automatically been given entries for $subdir.
-
-subdirs ::
- Set Default ',vmspath($subdir),'
- $(MMS) all $(USEMACROS)LINKTYPE=$(LINKTYPE)$(MACROEND)
-';
- join('',@m);
-}
-
-
-# --- Cleanup and Distribution Sections ---
-
-sub clean {
- my($self, %attribs) = @_;
- my(@m);
- push @m, '
-# Delete temporary files but do not touch installed files
-# We don\'t delete the Makefile here so that a
-# later make realclean still has a makefile to work from
-clean ::
-';
- foreach (@{$att{DIR}}) { # clean subdirectories first
- my($vmsdir) = vmspath($_);
- push( @m, ' If F$Search("'.$vmsdir.'$(MAKEFILE)") Then $(MMS) $(USEMAKEFILE)'.$vmsdir.'$(MAKEFILE) clean'."\n");
- }
- push @m, "
- $att{RM_F} *.Map;* *.lis;* *.cpp;* *.Obj;* *.Olb;* \$(BOOTSTRAP);* \$(BASEEXT).bso;*
-";
-
- my(@otherfiles) = values %{$att{XS}}; # .c files from *.xs files
- push(@otherfiles, $attribs{FILES}) if $attribs{FILES};
- push(@otherfiles, "blib.dir");
- push(@m, " $att{RM_F} ".join(";* ", map(fixpath($_),@otherfiles)),";*\n");
- # See realclean and ext/utils/make_ext for usage of Makefile.old
- push(@m, " $att{MV} $att{MAKEFILE} $att{MAKEFILE}_old");
- push(@m, " $attribs{POSTOP}\n") if $attribs{POSTOP};
- join('', @m);
-}
-
-
-sub realclean {
- my($self, %attribs) = @_;
- my(@m);
- push(@m,'
-# Delete temporary files (via clean) and also delete installed files
-realclean :: clean
-');
- foreach(@{$att{DIR}}){
- my($vmsdir) = vmspath($_);
- push(@m, ' If F$Search("'."$vmsdir$att{MAKEFILE}".'").nes."" Then $(MMS) $(USEMAKEFILE)'."$vmsdir$att{MAKEFILE}".' realclean'."\n");
- push(@m, ' If F$Search("'."$vmsdir$att{MAKEFILE}".'_old").nes."" Then $(MMS) $(USEMAKEFILE)'."$vmsdir$att{MAKEFILE}".'_old realclean'."\n");
- }
- push @m,'
- ',$att{RM_RF},' $(INST_AUTODIR) $(INST_ARCHAUTODIR)
- ',$att{RM_F},' *.Opt;* $(INST_DYNAMIC);* $(INST_STATIC);* $(INST_BOOT);* $(INST_PM);*
- ',$att{RM_F},' $(OBJECT);* $(MAKEFILE);* $(MAKEFILE)_old;*
-';
- push(@m, " $att{RM_RF} ".join(";* ", map(fixpath($_),$attribs{'FILES'})),";*\n") if $attribs{'FILES'};
- push(@m, " $attribs{POSTOP}\n") if $attribs{POSTOP};
- join('', @m);
-}
-
-
-sub distclean {
- my($self, %attribs) = @_;
- my($preop) = $attribs{PREOP} || '@ !'; # e.g., update MANIFEST
- my($zipname) = $attribs{ZIPNAME} || '$(DISTNAME)-$(VERSION)';
- my($zipflags) = $attribs{ZIPFLAGS} || '-Vu';
- my($postop) = $attribs{POSTOP} || "";
- my(@mkfildirs) = map(vmspath($_),@{$att{'DIR'}});
- my(@m,$dir);
-
- push @m,'
-distclean : realclean
- ',$preop,'
- If F$Search("$(MAKEFILE)").nes."" Then ',$att{RM_F},' $(MAKEFILE);*
-';
- foreach $dir (@mkfildirs) {
- push(@m,'If F$Search("',$dir,'$(MAKEFILE)") Then Delete/Log/NoConfirm ',
- $dir,'$(MAKEFILE);*',"\n");
- }
-
- push(@m," Zip \"$zipflags\" $zipname \$(BASEEXT).* Makefile.PL
- $postop
-");
-
- join('',@m);
-}
-
-
-# --- Test and Installation Sections ---
-
-sub test {
- my($self, %attribs) = @_;
- my($tests) = $attribs{TESTS} || ( -d 't' ? 't/*.t' : '');
- my(@m);
- push @m,'
-test : all
-';
- push(@m,' $(FULLPERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" $(I_PERL_LIBS) -e "use Test::Harness; runtests @ARGV;" '.$tests."\n")
- if $tests;
- push(@m,' $(FULLPERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" test.pl',"\n")
- if -f 'test.pl';
- foreach(@{$att{DIR}}){
- my($vmsdir) = vmspath($_);
- push(@m, ' If F$Search("',$vmsdir,'$(MAKEFILE)").nes."" Then $(PERL) -e "chdir \'',$vmsdir,
- '\'; print `$(MMS) $(USEMAKEFILE)$(MAKEFILE) $(USEMACRO)LINKTYPE=$(LINKTYPE)$(MACROEND) test`'."\n");
- }
- push(@m, "\t\@echo 'No tests defined for \$(NAME) extension.'\n") unless @m > 1;
-
- join('',@m);
-}
-
-sub install {
- my($self, %attribs) = @_;
- my(@m);
- push(@m, "
-install :: all
-");
- # install subdirectories first
- foreach(@{$att{DIR}}){
- my($vmsdir) = vmspath($_);
- push(@m, ' If F$Search("',$vmsdir,'$(MAKEFILE)").nes."" Then $(PERL) -e "chdir \'',$vmsdir,
- '\'; print `$(MMS) $(USEMAKEFILE)$(MAKEFILE) install`'."\n");
- }
-
- push(@m, "\t! perl5.000 used to autosplit into INST_ARCHLIB, we delete these old files here
- $att{RM_F} ",fixpath('$(INST_ARCHLIB)/auto/$(FULLEXT)/*.al'),";*,",fixpath('$(INST_ARCHLIB)/auto/$(FULLEXT)/*.ix'),';*
- $(MMS) $(USEMACROS)INST_LIB=\$(INST_PRIVLIB),INST_ARCHLIB=\$(INST_ARCHLIB)$(MACROEND)
-');
-
- join("",@m);
-}
-
-sub perldepend {
- my(@m);
-
- push @m, '
-$(OBJECT) : $(PERL_INC)EXTERN.h, $(PERL_INC)INTERN.h, $(PERL_INC)XSUB.h, $(PERL_INC)av.h
-$(OBJECT) : $(PERL_INC)cop.h, $(PERL_INC)cv.h, $(PERL_INC)embed.h, $(PERL_INC)form.h
-$(OBJECT) : $(PERL_INC)gv.h, $(PERL_INC)handy.h, $(PERL_INC)hv.h, $(PERL_INC)keywords.h
-$(OBJECT) : $(PERL_INC)mg.h, $(PERL_INC)op.h, $(PERL_INC)opcode.h, $(PERL_INC)patchlevel.h
-$(OBJECT) : $(PERL_INC)perl.h, $(PERL_INC)perly.h, $(PERL_INC)pp.h, $(PERL_INC)proto.h
-$(OBJECT) : $(PERL_INC)regcomp.h, $(PERL_INC)regexp.h, $(PERL_INC)scope.h, $(PERL_INC)sv.h
-$(OBJECT) : $(PERL_INC)vmsish.h, $(PERL_INC)util.h, $(PERL_INC)config.h
-$(O_FILES) : $(H_FILES)
-
-';
- push(@m,'
-
-$(PERL_ARCHLIB)/Config.pm: $(PERL_SRC)/config.sh
- @ Write Sys$Error "$(PERL_ARCHLIB)/Config.pm may be out of date with $(PERL_SRC)/config.sh"
- Set Default $(PERL_SRC)
- $(MMS) $(USEMAKEFILE)[.VMS]$(MAKEFILE) [.lib]config.pm
-');
-
- push(@m, join(" ", map(vmsify($_),values %{$att{XS}}))." : \$(XSUBPPDEPS)\n")
- if %{$att{XS}};
-
- join('',@m);
-}
-
-sub makefile {
- my(@m,@cmd);
- @cmd = grep(/^\s/,split(/\n/,MY->c_o()));
- push(@m,join("\n",@cmd));
- push(@m,'
-
-# We take a very conservative approach here, but it\'s worth it.
-# We move $(MAKEFILE) to $(MAKEFILE)_old here to avoid gnu make looping.
-$(MAKEFILE) : Makefile.PL $(CONFIGDEP)
- @ Write Sys$Output "',$att{MAKEFILE},' out-of-date with respect to $(MMS$SOURCE_LIST)"
- @ Write Sys$Output "Cleaning current config before rebuilding ',$att{MAKEFILE},'...
- - ',"$att{MV} $att{MAKEFILE} $att{MAKEFILE}_old",'
- - $(MMS) $(USEMAKEFILE)',$att{MAKEFILE},'_old clean
- $(PERL) $(I_PERL_LIBS) Makefile.PL
- @ Write Sys$Output "Now you must rerun $(MMS)."
-');
-
- join('',@m);
-}
-
-
-# --- Determine libraries to use and how to use them ---
-
-sub extliblist {
- '','','';
-}
-
-sub old_extliblist {
- '','',''
-}
-
-sub new_extliblist {
- '','',''
-}
-
-# --- Write a DynaLoader bootstrap file if required
-
-# VMS doesn't require a bootstrap file as a rule
-sub mkbootstrap {
- 1;
-}
-
-sub mksymlists {
- my($self,%attribs) = @_;
-
- MY->init_main() unless $att{BASEEXT};
-
- my($vars) = $attribs{DL_VARS} || $att{DL_VARS} || [];
- my($procs) = $attribs{DL_FUNCS} || $att{DL_FUNCS};
- my($package,$packprefix,$sym);
- if (!%$procs) {
- $package = $attribs{NAME} || $att{NAME};
- $package =~ s/\W/_/g;
- $procs = { $package => ["boot_$package"] };
- }
- my($isvax) = $Config{'arch'} =~ /VAX/i;
- # First, a short linker options file to specify PerlShr
- # used only when linking dynamic extension
- open OPT, ">PerlShr.Opt";
- print OPT "PerlShr/Share\n";
- close OPT;
-
- # Next, the options file declaring universal symbols
- # Used when linking shareable image for dynamic extension,
- # or when linking PerlShr into which we've added this package
- # as a static extension
- # We don't do anything to preserve order, so we won't relax
- # the GSMATCH criteria for a dynamic extension
- open OPT, ">$att{BASEEXT}.opt";
- foreach $package (keys %$procs) {
- ($packprefix = $package) =~ s/\W/_/g;
- foreach $sym (@{$$procs{$package}}) {
- $sym = "XS_${packprefix}_$sym" unless $sym =~ /^boot_/;
- if ($isvax) { print OPT "UNIVERSAL=$sym\n" }
- else { print OPT "SYMBOL_VECTOR=($sym=PROCEDURE)\n"; }
- }
- }
- foreach $sym (@$vars) {
- print OPT "PSECT_ATTR=${sym},PIC,OVR,RD,NOEXE,WRT,NOSHR\n";
- if ($isvax) { print OPT "UNIVERSAL=$sym\n" }
- else { print OPT "SYMBOL_VECTOR=($sym=DATA)\n"; }
- }
- close OPT;
-}
-
-# --- Output postprocessing section ---
-
-sub nicetext {
- # Insure that colons marking targets are preceded by space -
- # most Unix Makes don't need this, but it's necessary under VMS
- # to distinguish the target delimiter from a colon appearing as
- # part of a filespec.
-
- my($self,$text) = @_;
- $text =~ s/([^\s:])(:+\s)/$1 $2/gs;
- $text;
-}
-
-1;
-
-__END__
diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl
index 043faccb09..d3a8ab9140 100644
--- a/vms/gen_shrfls.pl
+++ b/vms/gen_shrfls.pl
@@ -34,14 +34,19 @@
# (i.e. /Define=DEBUGGING,EMBED,MULTIPLICITY)?
#
# Author: Charles Bailey bailey@genetics.upenn.edu
-# Revised: 01-Mar-1995
+# Revised: 28-May-1995
require 5.000;
$debug = $ENV{'GEN_SHRFLS_DEBUG'};
$cc_cmd = shift @ARGV;
+
+# Someday, we'll have $GetSyI built into perl . . .
+$isvax = `\$ Write Sys\$Output F\$GetSyI(\"HW_MODEL\")` <= 1024;
+print "\$isvax: \\$isvax\\\n" if $debug;
+
print "Input \$cc_cmd: \\$cc_cmd\\\n" if $debug;
-$docc = ($cc_cmd !~ /~~NOCC~~/);
+$docc = ($cc_cmd !~ /^~~/);
print "\$docc = $docc\n" if $debug;
if ($docc) {
@@ -55,11 +60,30 @@ if ($docc) {
}
print "Filtered \$cc_cmd: \\$cc_cmd\\\n" if $debug;
+ # check for gcc - if present, we'll need to use MACRO hack to
+ # define global symbols for shared variables
+ $isvaxc = 0;
+ $isgcc = `$cc_cmd _nla0:/Version` =~ /GNU/
+ or 0; # make debug output nice
+ $isvaxc = (!$isgcc && $isvax && `$cc_cmd /ansi_alias _nla0:` =~ /IVQUAL/)
+ or 0; # again, make debug output nice
+ print "\$isgcc: $isgcc\n" if $debug;
+ print "\$isvaxc: $isvaxc\n" if $debug;
+
if (-f 'perl.h') { $dir = '[]'; }
elsif (-f '[-]perl.h') { $dir = '[-]'; }
else { die "$0: Can't find perl.h\n"; }
}
-else { ($cpp_file) = ($cc_cmd =~ /~~NOCC~~(.*)/) }
+else {
+ ($ccvers,$cpp_file) = ($cc_cmd =~ /^~~(\w+)~~(.*)/);
+ $isgcc = $ccvers =~ /GCC/
+ or 0; # for nice debug output
+ $isvaxc = (!$isgcc && $ccvers =~ /VAXC/)
+ or 0; # again, for nice debug output
+ print "\$isgcc: \\$isgcc\\\n" if $debug;
+ print "\$isvaxc: \\$isvaxc\\\n" if $debug;
+ print "Not running cc, preprocesor output in \\$cpp_file\\\n" if $debug;
+}
$objsuffix = shift @ARGV;
print "\$objsuffix: \\$objsuffix\\\n" if $debug;
@@ -73,9 +97,32 @@ print "\$extnames: \\$extnames\\\n" if $debug;
$rtlopt = shift @ARGV;
print "\$rtlopt: \\$rtlopt\\\n" if $debug;
-# Someday, we'll have $GetSyI built into perl . . .
-$isvax = `\$ Write Sys\$Output F\$GetSyI(\"HW_MODEL\")` <= 1024;
-print "\$isvax: \\$isvax\\\n" if $debug;
+# This part gets tricky. VAXC creates creating global symbols for the
+# constants in an enum if that enum is ever used as the data type of a
+# global[dr]ef. We have to detect enums which are used in this way, so we
+# can set up the constants as universal symbols, since anything which
+# #includes perl.h will want to resolve these global symbols.
+# We're using a weak test here - we basically know that the only enums
+# we need to handle now are the big one in opcode.h, and the
+# "typedef enum { ... } expectation" in perl.h, so we hard code
+# appropriate tests below. Since we can't know in general whether a given
+# enum will be used elsewhere in a globaldef, it's hard to decide a
+# priori whether its constants need to be treated as global symbols.
+sub scan_enum {
+ my($line) = @_;
+
+ return unless $isvaxc;
+
+ return unless /^\s+(OP|X)/; # we only want opcode and expectation enums
+ print "\tchecking for enum constant\n" if $debug > 1;
+ $line =~ s#/\*.+##;
+ $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}++;
+ }
+}
sub scan_var {
my($line) = @_;
@@ -101,7 +148,7 @@ sub scan_func {
if ($1 eq 'main' || $1 eq 'perl_init_ext') {
print "\tskipped\n" if $debug > 1;
}
- else { $funcs{$1}++ }
+ else { $fcns{$1}++ }
}
}
@@ -128,6 +175,12 @@ LINE: while (<CPP>) {
print "opcode.h>> $_" if $debug > 2;
if (/^OP \*\s/) { &scan_func($_); }
if (/^EXT/) { &scan_var($_); }
+ if (/^\s+OP_/) { &scan_enum($_); }
+ last LINE unless $_ = <CPP>;
+ }
+ while (/^typedef enum/ .. /^\}/) {
+ print "global enum>> $_" if $debug > 2;
+ &scan_enum($_);
last LINE unless $_ = <CPP>;
}
while (/^#.*proto\.h/i .. /^#.*perl\.h/i) {
@@ -143,6 +196,7 @@ close CPP;
while (<DATA>) {
next if /^#/;
s/\s+#.*\n//;
+ next if /^\s*$/;
($key,$array) = split('=',$_);
print "Adding $key to \%$array list\n" if $debug > 1;
${$array}{$key}++;
@@ -150,8 +204,8 @@ while (<DATA>) {
foreach (split /\s+/, $extnames) {
my($pkgname) = $_;
$pkgname =~ s/::/__/g;
- $funcs{"boot_$pkgname"}++;
- print "Adding boot_$pkgname to \%funcs (for extension $_)\n" if $debug;
+ $fcns{"boot_$pkgname"}++;
+ print "Adding boot_$pkgname to \%fcns (for extension $_)\n" if $debug;
}
# Eventually, we'll check against existing copies here, so we can add new
@@ -160,19 +214,16 @@ foreach (split /\s+/, $extnames) {
$marord++;
open(OPTBLD,">${dir}${dbgprefix}perlshr_bld.opt")
or die "$0: Can't write to ${dir}${dbgprefix}perlshr_bld.opt: $!\n";
-open(OPTATTR,">${dir}perlshr_attr.opt")
- or die "$0: Can't write to ${dir}perlshr_attr.opt: $!\n";
if ($isvax) {
open(MAR,">${dir}perlshr_gbl${marord}.mar")
or die "$0: Can't write to ${dir}perlshr_gbl${marord}.mar: $!\n";
print MAR "\t.title perlshr_gbl$marord\n";
}
-print OPTATTR "PSECT_ATTR=\$CHAR_STRING_CONSTANTS,PIC,SHR,NOEXE,RD,NOWRT\n";
foreach $var (sort keys %vars) {
- print OPTATTR "PSECT_ATTR=${var},PIC,OVR,RD,NOEXE,WRT,NOSHR\n";
if ($isvax) { print OPTBLD "UNIVERSAL=$var\n"; }
else { print OPTBLD "SYMBOL_VECTOR=($var=DATA)\n"; }
- if ($isvax) {
+ # This hack brought to you by the lack of a globaldef in gcc.
+ if ($isgcc) {
if ($count++ > 200) { # max 254 psects/file
print MAR "\t.end\n";
close MAR;
@@ -182,27 +233,35 @@ foreach $var (sort keys %vars) {
print MAR "\t.title perlshr_gbl$marord\n";
$count = 0;
}
- # This hack brought to you by the lack of a globaldef in gcc.
print MAR "\t.psect ${var},long,pic,ovr,rd,wrt,noexe,noshr\n";
print MAR "\t${var}:: .blkl 1\n";
}
}
print MAR "\t.psect \$transfer_vec,pic,rd,nowrt,exe,shr\n" if ($isvax);
-foreach $func (sort keys %funcs) {
+foreach $func (sort keys %fcns) {
if ($isvax) {
print MAR "\t.transfer $func\n";
print MAR "\t.mask $func\n";
- print MAR "\tjmp L\^${func}+2\n";
+ print MAR "\tjmp G\^${func}+2\n";
}
else { print OPTBLD "SYMBOL_VECTOR=($func=PROCEDURE)\n"; }
}
+if ($isvax) {
+ print MAR "\t.end\n";
+ close MAR;
+}
+open(OPTATTR,">${dir}perlshr_attr.opt")
+ or die "$0: Can't write to ${dir}perlshr_attr.opt: $!\n";
+print OPTATTR "PSECT_ATTR=\$CHAR_STRING_CONSTANTS,PIC,SHR,NOEXE,RD,NOWRT\n";
+foreach $var (sort keys %vars) {
+ print OPTATTR "PSECT_ATTR=${var},PIC,OVR,RD,NOEXE,WRT,NOSHR\n";
+}
close OPTATTR;
+
$incstr = 'perl,globals';
if ($isvax) {
- print MAR "\t.end\n";
- close MAR;
$drvrname = "Compile_shrmars.tmp_".time;
open (DRVR,">$drvrname") or die "$0: Can't write to $drvrname: $!\n";
print DRVR "\$ Set NoOn\n";
diff --git a/vms/perlshr.c b/vms/perlshr.c
deleted file mode 100644
index 92e6d44cf5..0000000000
--- a/vms/perlshr.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* perlshr.c
- *
- * Small stub to create object module containing global variables
- * for use in PerlShr.C. Written as a separate file because some
- * old Make implementations won't deal correctly with DCL Open/Write
- * statements in the makefile.
- *
- */
-
-#include "INTERN.h"
-#include "perl.h"
-
-/* That's it. */
diff --git a/vms/perlvms.pod b/vms/perlvms.pod
index c0cec10ef0..722c638dbc 100644
--- a/vms/perlvms.pod
+++ b/vms/perlvms.pod
@@ -422,8 +422,10 @@ order to delete all versions, you need to say
You may need to make this change to scripts written for a
Unix system which expect that after a call to C<unlink>,
no files with the names passed to C<unlink> will exist.
-(Note: This can be changed at compile time by including
-C<#define UNLINK_ALL_VERSIONS> in config.h.
+(Note: This can be changed at compile time; if you
+C<use Config> and C<$Config{'d_unlink_all_versions'}> is
+C<define>, then C<unlink> will delete all versions of a
+file on the first call.)
C<unlink> will delete a file if at all possible, even if it
requires changing file protection (though it won't try to
diff --git a/vms/perly_c.vms b/vms/perly_c.vms
new file mode 100644
index 0000000000..4cc29e3ec8
--- /dev/null
+++ b/vms/perly_c.vms
@@ -0,0 +1,2224 @@
+#ifndef lint
+static char yysccsid[] = "@(#)yaccpar 1.8 (Berkeley) 01/20/91";
+#endif
+#define YYBYACC 1
+#line 16 "perly.y"
+#include "EXTERN.h"
+#include "perl.h"
+
+static void
+dep()
+{
+ deprecate("\"do\" to call subroutines");
+}
+
+#define YYERRCODE 256
+dEXT short yylhs[] = { -1,
+ 31, 0, 5, 3, 6, 6, 6, 7, 7, 7,
+ 7, 21, 21, 21, 21, 21, 21, 11, 11, 11,
+ 9, 9, 9, 9, 30, 30, 8, 8, 8, 8,
+ 8, 8, 8, 8, 10, 10, 25, 25, 29, 29,
+ 1, 1, 1, 1, 2, 2, 32, 32, 28, 28,
+ 4, 33, 33, 34, 13, 13, 13, 13, 12, 12,
+ 12, 26, 26, 26, 26, 26, 26, 26, 26, 27,
+ 27, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 22, 22, 23, 23, 23, 20, 15,
+ 16, 17, 18, 19, 24, 24, 24, 24,
+};
+dEXT short yylen[] = { 2,
+ 0, 2, 4, 0, 0, 2, 2, 2, 1, 2,
+ 3, 1, 1, 3, 3, 3, 3, 0, 2, 6,
+ 6, 6, 4, 4, 0, 2, 7, 7, 5, 5,
+ 8, 7, 10, 3, 0, 1, 0, 1, 0, 1,
+ 1, 1, 1, 1, 4, 3, 5, 5, 0, 1,
+ 0, 3, 2, 4, 3, 3, 2, 1, 2, 3,
+ 1, 3, 5, 6, 3, 5, 2, 4, 4, 1,
+ 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 5, 3, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 3, 2, 3, 2, 4,
+ 3, 4, 1, 1, 4, 5, 4, 1, 1, 1,
+ 5, 6, 5, 6, 5, 4, 5, 1, 1, 3,
+ 4, 3, 2, 2, 4, 5, 4, 5, 1, 2,
+ 1, 2, 2, 2, 1, 3, 1, 3, 4, 4,
+ 6, 1, 1, 0, 1, 0, 1, 2, 2, 2,
+ 2, 2, 2, 2, 1, 1, 1, 1,
+};
+dEXT short yydefred[] = { 1,
+ 0, 5, 0, 40, 51, 51, 0, 0, 6, 41,
+ 7, 9, 0, 42, 43, 44, 0, 0, 0, 53,
+ 0, 12, 4, 142, 0, 0, 118, 0, 51, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 137, 0,
+ 0, 0, 0, 0, 0, 0, 51, 0, 0, 0,
+ 0, 0, 0, 0, 0, 10, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 8, 0, 0, 0, 0,
+ 0, 108, 110, 104, 0, 0, 143, 0, 46, 0,
+ 52, 0, 0, 5, 155, 158, 157, 156, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 153, 0, 124, 0,
+ 0, 0, 0, 0, 0, 57, 0, 0, 67, 0,
+ 0, 132, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 99, 0, 149, 150, 151, 152, 154,
+ 0, 34, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 91, 92, 0, 0, 0, 0,
+ 0, 0, 0, 11, 45, 50, 0, 54, 0, 65,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 36, 0, 136, 138, 0, 0,
+ 0, 0, 0, 0, 101, 0, 122, 0, 0, 0,
+ 0, 98, 26, 0, 0, 0, 0, 0, 0, 55,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 70, 0, 71, 0,
+ 0, 0, 0, 0, 0, 120, 0, 48, 47, 3,
+ 0, 140, 0, 102, 0, 29, 0, 30, 0, 0,
+ 0, 23, 0, 24, 0, 0, 0, 139, 148, 68,
+ 0, 125, 0, 127, 0, 100, 69, 0, 0, 0,
+ 0, 0, 0, 0, 107, 0, 105, 0, 116, 121,
+ 66, 0, 0, 0, 0, 19, 0, 0, 0, 0,
+ 0, 63, 126, 128, 115, 0, 113, 0, 0, 106,
+ 0, 111, 117, 141, 27, 28, 21, 0, 22, 0,
+ 32, 0, 114, 112, 64, 0, 0, 31, 0, 0,
+ 20, 33,
+};
+dEXT short yydgoto[] = { 1,
+ 9, 10, 84, 17, 87, 3, 11, 12, 66, 193,
+ 262, 67, 200, 69, 70, 71, 72, 73, 74, 75,
+ 195, 83, 201, 89, 185, 77, 240, 177, 13, 142,
+ 2, 14, 15, 16,
+};
+dEXT short yysindex[] = { 0,
+ 0, 0, -105, 0, 0, 0, -47, -232, 0, 0,
+ 0, 0, 570, 0, 0, 0, -112, -217, 10, 0,
+ 2121, 0, 0, 0, -35, -35, 0, 46, 0, -3,
+ 1, 8, 14, 55, 2121, 56, 60, 63, 0, -35,
+ 1806, 2121, 941, -178, 1846, 997, 0, 1911, 2121, 2121,
+ 2121, 2121, 2121, 2121, 1272, 0, 2121, 2121, 1312, -35,
+ -35, -35, -35, -35, -183, 0, 71, 227, 3368, -55,
+ -49, 0, 0, 0, 89, 48, 0, 20, 0, -118,
+ 0, 71, 85, 0, 0, 0, 0, 0, 2121, 106,
+ 2121, -118, 1846, 20, 1846, 20, 1846, 20, 1846, 20,
+ 1371, 115, 3368, 116, 1411, 901, 0, 125, 0, 864,
+ -1, 864, 41, -53, 2121, 0, 0, -55, 0, 2121,
+ 20, 0, 864, 864, 510, 510, 510, -89, -89, 80,
+ -38, 510, 510, 0, -84, 0, 0, 0, 0, 0,
+ 20, 0, 2121, 1846, 1846, 1846, 1846, 1846, 1846, 1846,
+ 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121, 2121,
+ 2121, 2121, 2121, 2121, 0, 0, -21, 1846, 1846, 1846,
+ 1846, 1846, 1451, 0, 0, 0, -29, 0, -115, 0,
+ 1846, 614, 20, -187, 131, -183, -34, -183, -27, -140,
+ 4, -140, 114, 208, 0, 1846, 0, 0, 6, -6,
+ 135, 1846, 1726, 1766, 0, 57, 0, 71, 2121, 1846,
+ 94, 0, 0, 3368, -187, -187, -187, -187, -113, 0,
+ 67, 2023, 864, 1613, 445, 685, 3368, 3106, 363, 771,
+ 1082, 1235, 1465, 510, 510, 1846, 0, 1846, 0, 147,
+ -77, 88, -72, 95, -67, 0, 18, 0, 0, 0,
+ 148, 0, 2121, 0, 20, 0, 20, 0, 20, 20,
+ 150, 0, 20, 0, 1846, 20, 26, 0, 0, 0,
+ 32, 0, 69, 0, 82, 0, 0, -62, 1846, 66,
+ 2121, 97, -41, 1846, 0, 68, 0, 73, 0, 0,
+ 0, 2844, -183, -183, -140, 0, 1846, -140, 129, -183,
+ 20, 0, 0, 0, 0, 99, 0, 3756, 78, 0,
+ 153, 0, 0, 0, 0, 0, 0, 84, 0, 1371,
+ 0, -183, 0, 0, 0, 20, 155, 0, -140, 20,
+ 0, 0,
+};
+dEXT short yyrindex[] = { 0,
+ 0, 0, 141, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 145, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2299, 2164, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2658, 0, 2703, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 13, 0, 58, 3, 170, 2748,
+ 2796, 0, 0, 0, 2209, 0, 0, 0, 0, -26,
+ 0, 2380, 0, 0, 0, 0, 0, 0, 2426, 0,
+ 0, 83, 166, 0, 0, 0, 0, 0, 0, 0,
+ 154, 0, 1341, 0, 0, 171, 0, 2254, 0, 3507,
+ 2748, 3552, 0, 0, 2426, 0, 431, 502, 0, 0,
+ 0, 0, 3585, 3630, 2980, 3028, 3073, 2890, 2935, 2471,
+ 0, 3152, 3197, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2516, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 845, 0,
+ 171, 0, 0, 19, 0, 13, 0, 13, 0, 76,
+ 0, 76, 0, 158, 0, 0, 0, 0, 0, 177,
+ 0, 0, 0, 0, 0, 0, 0, 2564, 2426, 0,
+ 2612, 0, 0, 2080, 23, 30, 39, 52, 827, 0,
+ 0, -36, 3678, 1208, 3335, 3414, 2574, 0, 1049, 3739,
+ 3646, 3694, 3462, 3245, 3290, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 160, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 171, 0, 0, 0, 0, 0, 0,
+ 0, 0, 13, 13, 76, 0, 0, 76, 0, 13,
+ 0, 0, 0, 0, 0, 0, 0, 776, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 182,
+ 0, 13, 0, 0, 0, 0, 0, 0, 76, 0,
+ 0, 0,
+};
+dEXT short yygindex[] = { 0,
+ 0, 0, 0, 37, -13, 157, 0, 0, 0, -82,
+ -168, 470, 360, 3971, 1933, 0, 0, 0, 0, 0,
+ 230, -14, -152, 1366, -20, 0, 0, 156, 0, -125,
+ 0, 0, 0, 0,
+};
+#define YYTABLESIZE 4252
+dEXT short yytable[] = { 65,
+ 61, 168, 211, 79, 81, 206, 257, 81, 212, 250,
+ 23, 20, 25, 259, 61, 285, 94, 96, 98, 100,
+ 287, 81, 81, 264, 21, 289, 81, 109, 251, 248,
+ 305, 119, 49, 150, 122, 170, 93, 269, 204, 80,
+ 95, 172, 18, 13, 263, 25, 268, 97, 25, 25,
+ 25, 310, 25, 99, 25, 25, 81, 25, 290, 38,
+ 256, 13, 258, 16, 175, 92, 301, 169, 81, 238,
+ 17, 25, 302, 171, 180, 18, 25, 38, 115, 14,
+ 186, 16, 188, 121, 190, 91, 192, 23, 17, 170,
+ 61, 141, 15, 23, 101, 104, 49, 14, 58, 105,
+ 207, 236, 106, 25, 148, 149, 174, 209, 18, 303,
+ 15, 18, 18, 18, 143, 18, 58, 18, 18, 23,
+ 18, 169, 304, 23, 326, 280, 317, 213, 173, 319,
+ 23, 311, 260, 261, 18, 25, 23, 25, 25, 18,
+ 2, 176, 23, 178, 78, 181, 286, 4, 5, 6,
+ 58, 7, 8, 288, 196, 309, 197, 4, 5, 6,
+ 331, 7, 8, 249, 203, 205, 18, 315, 316, 254,
+ 210, 255, 265, 39, 321, 270, 39, 39, 39, 149,
+ 39, 276, 39, 39, 279, 39, 284, 320, 291, 297,
+ 307, 323, 312, 325, 277, 330, 328, 313, 18, 39,
+ 18, 18, 324, 144, 39, 49, 37, 148, 149, 19,
+ 61, 146, 35, 61, 148, 149, 13, 147, 37, 148,
+ 149, 85, 35, 167, 148, 149, 86, 61, 61, 148,
+ 149, 39, 81, 81, 81, 81, 237, 327, 148, 149,
+ 179, 293, 76, 294, 299, 295, 296, 183, 266, 298,
+ 148, 149, 300, 148, 149, 81, 81, 148, 149, 0,
+ 81, 0, 61, 39, 148, 149, 39, 0, 25, 25,
+ 25, 25, 25, 25, 0, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 148, 149, 322, 25, 25,
+ 0, 25, 25, 25, 25, 148, 149, 148, 149, 25,
+ 25, 25, 25, 25, 0, 0, 25, 25, 25, 148,
+ 149, 0, 329, 0, 25, 25, 332, 148, 149, 25,
+ 0, 25, 25, 148, 149, 0, 58, 58, 58, 58,
+ 0, 18, 18, 18, 18, 18, 18, 0, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 0, 58,
+ 58, 18, 18, 0, 18, 18, 18, 18, 148, 149,
+ 148, 149, 18, 18, 18, 18, 18, 0, 0, 18,
+ 18, 18, 68, 148, 149, 148, 149, 18, 18, 148,
+ 149, 0, 18, 0, 18, 18, 148, 149, 148, 149,
+ 148, 149, 0, 0, 0, 0, 39, 39, 39, 39,
+ 39, 39, 114, 0, 116, 0, 39, 0, 0, 39,
+ 39, 39, 39, 0, 131, 0, 39, 39, 135, 39,
+ 39, 39, 39, 0, 0, 0, 0, 39, 39, 39,
+ 39, 39, 0, 0, 39, 39, 39, 0, 61, 61,
+ 61, 61, 39, 39, 0, 0, 0, 39, 0, 39,
+ 39, 0, 184, 168, 187, 0, 189, 0, 191, 0,
+ 194, 61, 61, 155, 199, 0, 155, 155, 155, 0,
+ 155, 142, 155, 155, 142, 155, 144, 145, 146, 147,
+ 0, 0, 0, 0, 0, 150, 0, 0, 142, 142,
+ 82, 0, 0, 142, 155, 144, 145, 146, 147, 148,
+ 149, 0, 0, 215, 216, 217, 218, 219, 220, 221,
+ 0, 0, 0, 0, 0, 82, 0, 0, 148, 149,
+ 0, 142, 0, 142, 0, 0, 0, 241, 242, 243,
+ 244, 245, 247, 0, 156, 168, 0, 156, 156, 156,
+ 0, 156, 103, 156, 156, 103, 156, 0, 0, 0,
+ 0, 0, 0, 142, 0, 267, 155, 0, 82, 103,
+ 103, 271, 273, 275, 103, 156, 0, 150, 0, 278,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 82, 0, 0, 0, 0, 208,
+ 0, 0, 0, 0, 103, 282, 0, 283, 0, 0,
+ 168, 0, 50, 0, 0, 61, 63, 60, 0, 55,
+ 0, 64, 58, 0, 57, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 184, 0, 0, 156, 56, 0,
+ 0, 0, 150, 62, 0, 0, 0, 0, 306, 0,
+ 0, 0, 0, 0, 0, 152, 153, 154, 155, 0,
+ 0, 0, 0, 0, 252, 0, 318, 253, 0, 0,
+ 59, 159, 160, 161, 0, 0, 162, 163, 0, 0,
+ 164, 0, 0, 165, 166, 167, 157, 0, 82, 68,
+ 0, 0, 0, 0, 0, 0, 0, 155, 155, 155,
+ 155, 155, 23, 0, 0, 51, 155, 0, 0, 142,
+ 142, 142, 142, 0, 168, 0, 0, 155, 142, 155,
+ 155, 155, 155, 142, 142, 142, 142, 155, 155, 155,
+ 155, 155, 142, 142, 155, 155, 155, 142, 142, 142,
+ 142, 142, 155, 155, 142, 142, 150, 155, 142, 155,
+ 155, 142, 142, 142, 0, 0, 0, 0, 0, 163,
+ 0, 0, 164, 0, 0, 165, 166, 167, 156, 156,
+ 156, 156, 156, 0, 0, 0, 0, 156, 0, 0,
+ 103, 103, 103, 103, 0, 168, 0, 0, 156, 103,
+ 156, 156, 156, 156, 103, 103, 103, 103, 156, 156,
+ 156, 156, 156, 103, 103, 156, 156, 156, 103, 103,
+ 103, 103, 103, 156, 156, 103, 103, 150, 156, 103,
+ 156, 156, 103, 103, 103, 0, 84, 164, 0, 84,
+ 165, 166, 167, 0, 0, 22, 24, 25, 26, 27,
+ 28, 0, 0, 84, 84, 29, 0, 0, 30, 31,
+ 32, 33, 0, 0, 0, 34, 35, 0, 36, 37,
+ 38, 39, 0, 0, 0, 0, 40, 41, 42, 43,
+ 44, 168, 0, 45, 46, 47, 0, 56, 84, 0,
+ 56, 48, 49, 0, 0, 0, 52, 39, 53, 54,
+ 39, 39, 39, 0, 39, 56, 39, 39, 0, 39,
+ 0, 151, 0, 150, 0, 0, 152, 153, 154, 155,
+ 0, 0, 0, 39, 0, 0, 0, 0, 39, 0,
+ 156, 158, 159, 160, 161, 0, 0, 162, 163, 56,
+ 0, 164, 0, 0, 165, 166, 167, 0, 0, 0,
+ 0, 0, 0, 50, 0, 39, 61, 63, 60, 0,
+ 55, 0, 64, 58, 0, 57, 0, 0, 0, 0,
+ 0, 0, 0, 0, 168, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 62, 0, 0, 39, 0, 154,
+ 39, 0, 0, 50, 0, 0, 61, 63, 60, 0,
+ 55, 0, 64, 58, 0, 57, 150, 0, 0, 163,
+ 0, 59, 164, 0, 0, 165, 166, 167, 0, 113,
+ 0, 0, 0, 0, 62, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 23, 0, 0, 51, 0, 0, 50,
+ 0, 59, 61, 63, 60, 0, 55, 0, 64, 58,
+ 0, 57, 0, 0, 84, 84, 84, 84, 0, 0,
+ 0, 0, 0, 152, 153, 154, 155, 0, 0, 0,
+ 62, 0, 0, 0, 0, 0, 51, 84, 84, 0,
+ 160, 161, 84, 0, 162, 163, 0, 0, 164, 0,
+ 0, 165, 166, 167, 0, 0, 0, 59, 0, 83,
+ 0, 0, 83, 0, 0, 56, 56, 56, 56, 0,
+ 39, 39, 39, 39, 39, 39, 83, 83, 0, 0,
+ 39, 83, 0, 39, 39, 39, 39, 0, 56, 23,
+ 39, 39, 51, 39, 39, 39, 39, 0, 0, 0,
+ 0, 39, 39, 39, 39, 39, 0, 0, 39, 39,
+ 39, 83, 0, 0, 0, 0, 39, 39, 154, 155,
+ 0, 39, 0, 39, 39, 0, 0, 117, 25, 26,
+ 27, 28, 86, 0, 0, 0, 29, 162, 163, 0,
+ 0, 164, 168, 0, 165, 166, 167, 35, 0, 36,
+ 37, 38, 39, 0, 0, 0, 0, 40, 41, 42,
+ 43, 44, 0, 0, 45, 46, 47, 24, 25, 26,
+ 27, 28, 48, 49, 150, 0, 29, 52, 0, 53,
+ 54, 0, 0, 0, 0, 0, 0, 35, 0, 36,
+ 37, 38, 39, 0, 0, 0, 0, 40, 41, 42,
+ 43, 44, 0, 0, 45, 46, 47, 0, 0, 0,
+ 0, 0, 48, 49, 0, 0, 0, 52, 78, 53,
+ 54, 78, 0, 117, 25, 26, 27, 28, 86, 0,
+ 0, 0, 29, 0, 0, 78, 78, 0, 0, 0,
+ 78, 0, 0, 35, 0, 36, 37, 38, 39, 0,
+ 0, 0, 0, 40, 41, 42, 43, 44, 0, 0,
+ 0, 46, 47, 0, 0, 0, 0, 0, 48, 49,
+ 78, 0, 0, 52, 50, 53, 54, 61, 63, 60,
+ 0, 55, 130, 64, 58, 0, 57, 83, 83, 83,
+ 83, 0, 0, 0, 0, 168, 83, 0, 0, 0,
+ 0, 0, 0, 0, 0, 62, 0, 0, 0, 0,
+ 83, 83, 0, 0, 50, 83, 83, 61, 63, 60,
+ 0, 55, 0, 64, 58, 0, 57, 150, 0, 0,
+ 0, 0, 59, 0, 152, 153, 154, 155, 0, 0,
+ 0, 0, 0, 0, 0, 62, 0, 0, 0, 0,
+ 0, 130, 161, 0, 130, 162, 163, 0, 0, 164,
+ 0, 90, 165, 166, 167, 0, 0, 51, 130, 130,
+ 0, 0, 59, 50, 134, 107, 61, 63, 60, 0,
+ 55, 120, 64, 58, 0, 57, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 136, 137, 138, 139, 140,
+ 0, 0, 0, 130, 62, 0, 0, 51, 0, 0,
+ 0, 0, 0, 50, 0, 0, 61, 63, 60, 0,
+ 55, 198, 64, 58, 0, 57, 0, 0, 0, 0,
+ 0, 59, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 202, 0, 0, 62, 0, 78, 78, 78, 78,
+ 0, 0, 0, 50, 0, 78, 61, 63, 60, 0,
+ 55, 246, 64, 58, 0, 57, 51, 0, 0, 78,
+ 78, 59, 0, 0, 78, 78, 78, 78, 78, 0,
+ 0, 0, 0, 0, 62, 0, 0, 152, 153, 154,
+ 155, 0, 0, 0, 0, 0, 0, 0, 24, 25,
+ 26, 27, 28, 0, 0, 0, 51, 29, 162, 163,
+ 0, 59, 164, 0, 0, 165, 166, 167, 35, 0,
+ 36, 37, 38, 39, 0, 168, 0, 0, 40, 41,
+ 42, 43, 44, 0, 0, 45, 46, 47, 24, 25,
+ 26, 27, 28, 48, 49, 0, 51, 29, 52, 0,
+ 53, 54, 0, 0, 0, 0, 0, 150, 35, 0,
+ 36, 37, 38, 39, 0, 0, 0, 0, 40, 41,
+ 42, 43, 44, 0, 0, 45, 46, 47, 0, 130,
+ 130, 130, 130, 48, 49, 0, 0, 0, 52, 0,
+ 53, 54, 0, 0, 0, 0, 22, 24, 25, 26,
+ 27, 28, 130, 130, 0, 0, 29, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 35, 0, 36,
+ 37, 38, 39, 0, 0, 0, 0, 40, 41, 42,
+ 43, 44, 0, 0, 45, 46, 47, 24, 25, 26,
+ 27, 28, 48, 49, 0, 0, 29, 52, 0, 53,
+ 54, 0, 0, 0, 0, 0, 0, 35, 0, 36,
+ 37, 38, 39, 0, 0, 0, 0, 40, 41, 42,
+ 43, 44, 0, 168, 45, 46, 47, 24, 25, 26,
+ 27, 28, 48, 49, 0, 0, 29, 52, 0, 53,
+ 54, 0, 0, 0, 0, 0, 0, 35, 0, 36,
+ 37, 38, 39, 0, 0, 150, 0, 40, 41, 42,
+ 43, 44, 0, 0, 45, 46, 47, 0, 0, 154,
+ 155, 0, 48, 49, 0, 0, 0, 52, 50, 53,
+ 54, 61, 63, 60, 0, 55, 272, 64, 58, 163,
+ 57, 0, 164, 0, 0, 165, 166, 167, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
+ 0, 0, 0, 0, 0, 0, 0, 0, 50, 0,
+ 0, 61, 63, 60, 0, 55, 274, 64, 58, 0,
+ 57, 0, 0, 0, 0, 0, 59, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
+ 0, 0, 0, 0, 0, 0, 0, 0, 50, 0,
+ 0, 61, 63, 60, 0, 55, 0, 64, 58, 0,
+ 57, 51, 0, 0, 0, 0, 59, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
+ 0, 0, 0, 0, 0, 0, 0, 0, 50, 0,
+ 0, 61, 63, 60, 0, 55, 0, 64, 58, 0,
+ 57, 51, 0, 0, 0, 152, 59, 154, 155, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,
+ 0, 0, 0, 0, 0, 0, 162, 163, 0, 0,
+ 164, 0, 0, 165, 166, 167, 0, 0, 23, 0,
+ 0, 51, 0, 0, 0, 0, 59, 0, 0, 0,
+ 0, 0, 0, 50, 0, 0, 61, 63, 60, 0,
+ 55, 0, 64, 58, 0, 57, 0, 88, 88, 0,
+ 0, 0, 0, 0, 0, 0, 102, 0, 0, 0,
+ 0, 51, 88, 111, 62, 0, 0, 0, 118, 0,
+ 0, 0, 24, 25, 26, 27, 28, 0, 0, 0,
+ 0, 29, 88, 88, 88, 88, 88, 0, 0, 0,
+ 0, 59, 35, 0, 36, 37, 38, 39, 0, 0,
+ 0, 0, 40, 41, 42, 43, 44, 0, 0, 45,
+ 46, 47, 24, 25, 26, 27, 28, 48, 49, 0,
+ 0, 29, 52, 23, 53, 54, 51, 0, 118, 0,
+ 0, 0, 35, 0, 36, 37, 38, 39, 0, 0,
+ 0, 0, 40, 41, 42, 43, 44, 0, 0, 45,
+ 46, 47, 108, 25, 26, 27, 28, 48, 49, 0,
+ 0, 29, 52, 0, 53, 54, 0, 0, 0, 0,
+ 0, 0, 35, 0, 36, 37, 38, 39, 0, 0,
+ 0, 0, 40, 41, 42, 43, 44, 0, 0, 239,
+ 46, 47, 24, 25, 26, 27, 28, 48, 49, 0,
+ 0, 29, 52, 168, 53, 54, 0, 0, 0, 0,
+ 60, 0, 35, 60, 36, 37, 38, 39, 0, 0,
+ 0, 0, 40, 41, 42, 43, 44, 60, 60, 45,
+ 46, 47, 0, 0, 0, 150, 0, 48, 49, 0,
+ 0, 0, 52, 50, 53, 54, 61, 63, 60, 0,
+ 55, 0, 64, 58, 0, 57, 0, 24, 25, 26,
+ 27, 28, 60, 0, 0, 0, 29, 0, 0, 0,
+ 0, 0, 0, 0, 62, 0, 0, 35, 0, 36,
+ 37, 38, 39, 0, 0, 0, 0, 40, 41, 42,
+ 43, 44, 0, 0, 135, 46, 47, 135, 0, 0,
+ 0, 59, 48, 49, 0, 0, 0, 52, 0, 53,
+ 54, 135, 135, 0, 0, 0, 135, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 51, 0, 0, 119,
+ 0, 0, 119, 0, 135, 0, 135, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 119, 119, 0, 0,
+ 0, 119, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 135, 0, 0, 0,
+ 0, 0, 0, 0, 142, 0, 0, 142, 0, 119,
+ 0, 119, 0, 0, 0, 152, 153, 154, 155, 0,
+ 0, 142, 142, 0, 0, 0, 142, 0, 0, 0,
+ 158, 159, 160, 161, 0, 0, 162, 163, 0, 0,
+ 164, 119, 0, 165, 166, 167, 0, 0, 0, 129,
+ 0, 0, 129, 0, 142, 0, 142, 0, 60, 60,
+ 60, 60, 0, 0, 0, 0, 129, 129, 0, 0,
+ 0, 129, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 60, 60, 0, 0, 0, 142, 24, 25, 26,
+ 27, 28, 0, 0, 0, 0, 29, 0, 0, 0,
+ 0, 129, 0, 0, 0, 0, 0, 35, 0, 36,
+ 37, 38, 39, 0, 0, 0, 0, 40, 41, 42,
+ 43, 44, 0, 0, 0, 46, 47, 0, 0, 0,
+ 145, 129, 48, 49, 0, 0, 0, 52, 0, 53,
+ 54, 0, 135, 135, 135, 135, 0, 145, 145, 0,
+ 0, 135, 145, 0, 0, 0, 135, 135, 135, 135,
+ 0, 0, 0, 0, 0, 135, 135, 0, 0, 0,
+ 135, 135, 135, 135, 135, 0, 144, 135, 135, 144,
+ 145, 135, 145, 0, 135, 135, 135, 119, 119, 119,
+ 119, 0, 0, 144, 144, 0, 119, 0, 144, 0,
+ 0, 119, 119, 119, 119, 0, 0, 0, 0, 0,
+ 119, 119, 145, 0, 0, 119, 119, 119, 119, 119,
+ 0, 97, 119, 119, 97, 0, 119, 0, 144, 119,
+ 119, 119, 142, 142, 142, 142, 0, 0, 97, 97,
+ 0, 142, 0, 97, 0, 0, 142, 142, 142, 142,
+ 0, 0, 0, 0, 0, 142, 142, 0, 144, 0,
+ 142, 142, 142, 142, 142, 0, 59, 142, 142, 59,
+ 0, 142, 0, 97, 142, 142, 142, 129, 129, 129,
+ 129, 0, 0, 59, 59, 0, 129, 0, 59, 0,
+ 0, 129, 129, 129, 129, 0, 0, 0, 0, 0,
+ 129, 129, 0, 97, 0, 129, 129, 129, 129, 129,
+ 0, 0, 129, 129, 62, 0, 129, 0, 59, 129,
+ 129, 129, 0, 0, 72, 0, 0, 72, 0, 0,
+ 0, 62, 62, 0, 0, 0, 62, 0, 0, 0,
+ 0, 72, 72, 0, 0, 0, 0, 0, 59, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 145, 145,
+ 145, 145, 96, 0, 62, 96, 62, 145, 0, 0,
+ 0, 0, 145, 145, 145, 145, 72, 0, 0, 96,
+ 96, 145, 145, 0, 96, 0, 145, 145, 145, 145,
+ 145, 0, 0, 145, 145, 0, 62, 145, 0, 0,
+ 145, 145, 145, 0, 144, 144, 144, 144, 144, 0,
+ 0, 144, 0, 144, 96, 0, 0, 0, 144, 144,
+ 144, 144, 0, 0, 0, 144, 144, 144, 144, 0,
+ 144, 0, 144, 144, 144, 144, 144, 0, 0, 144,
+ 144, 0, 0, 144, 96, 0, 144, 144, 144, 97,
+ 97, 97, 97, 131, 0, 0, 131, 0, 97, 0,
+ 144, 0, 0, 97, 97, 97, 97, 0, 0, 0,
+ 131, 131, 97, 97, 0, 131, 0, 97, 97, 97,
+ 97, 97, 0, 0, 97, 97, 0, 0, 97, 0,
+ 0, 97, 97, 97, 59, 59, 59, 59, 103, 0,
+ 0, 103, 0, 59, 0, 131, 0, 0, 59, 59,
+ 59, 59, 0, 0, 0, 103, 103, 59, 59, 0,
+ 103, 0, 59, 59, 59, 59, 59, 0, 0, 59,
+ 59, 0, 0, 59, 0, 0, 59, 59, 59, 0,
+ 0, 0, 62, 62, 62, 62, 109, 0, 0, 109,
+ 103, 62, 72, 72, 72, 72, 62, 62, 62, 62,
+ 0, 0, 0, 109, 109, 62, 62, 0, 109, 0,
+ 62, 62, 62, 62, 62, 72, 72, 62, 62, 0,
+ 0, 62, 0, 0, 62, 62, 62, 0, 0, 0,
+ 96, 96, 96, 96, 314, 0, 0, 0, 109, 96,
+ 0, 0, 0, 0, 96, 96, 96, 96, 0, 0,
+ 0, 0, 0, 96, 96, 0, 157, 0, 96, 96,
+ 96, 96, 96, 0, 0, 96, 96, 0, 0, 96,
+ 0, 0, 96, 96, 96, 0, 144, 144, 144, 144,
+ 93, 0, 0, 93, 168, 144, 0, 0, 0, 0,
+ 144, 144, 144, 144, 0, 0, 0, 93, 93, 144,
+ 144, 0, 93, 0, 144, 144, 144, 144, 144, 0,
+ 0, 144, 144, 0, 0, 144, 150, 0, 144, 144,
+ 144, 131, 131, 131, 131, 94, 0, 0, 94, 0,
+ 131, 0, 93, 0, 0, 131, 131, 131, 131, 0,
+ 0, 0, 94, 94, 131, 131, 0, 94, 0, 131,
+ 131, 131, 131, 131, 0, 0, 131, 131, 0, 0,
+ 131, 0, 0, 131, 131, 131, 103, 103, 103, 103,
+ 88, 0, 0, 88, 0, 103, 0, 94, 0, 0,
+ 103, 103, 103, 103, 0, 0, 0, 88, 88, 103,
+ 103, 0, 88, 0, 103, 103, 103, 103, 103, 0,
+ 0, 103, 103, 0, 0, 103, 0, 0, 103, 103,
+ 103, 0, 0, 0, 109, 109, 109, 109, 89, 0,
+ 0, 89, 88, 109, 0, 0, 0, 0, 109, 109,
+ 109, 109, 0, 0, 0, 89, 89, 109, 109, 0,
+ 89, 0, 109, 109, 109, 109, 109, 0, 0, 109,
+ 109, 0, 0, 109, 0, 0, 109, 109, 109, 0,
+ 0, 0, 0, 90, 0, 0, 90, 0, 0, 0,
+ 89, 151, 0, 0, 0, 0, 152, 153, 154, 155,
+ 90, 90, 0, 0, 0, 90, 0, 0, 0, 0,
+ 156, 158, 159, 160, 161, 0, 0, 162, 163, 0,
+ 0, 164, 0, 0, 165, 166, 167, 0, 93, 93,
+ 93, 93, 0, 281, 0, 90, 0, 93, 157, 0,
+ 0, 0, 93, 93, 93, 93, 0, 0, 0, 0,
+ 0, 93, 93, 0, 0, 0, 93, 93, 93, 93,
+ 93, 0, 86, 93, 93, 86, 168, 93, 0, 0,
+ 0, 0, 0, 94, 94, 94, 94, 0, 0, 86,
+ 86, 0, 94, 0, 86, 0, 0, 94, 94, 94,
+ 94, 0, 0, 0, 0, 0, 94, 94, 150, 0,
+ 0, 94, 94, 94, 94, 94, 0, 87, 94, 94,
+ 87, 0, 94, 0, 86, 0, 0, 0, 88, 88,
+ 88, 88, 0, 0, 87, 87, 0, 88, 0, 87,
+ 0, 0, 88, 88, 88, 88, 0, 0, 0, 0,
+ 0, 88, 88, 0, 0, 0, 88, 88, 88, 88,
+ 88, 0, 0, 88, 88, 85, 0, 0, 85, 87,
+ 0, 0, 0, 0, 0, 0, 89, 89, 89, 89,
+ 0, 0, 85, 85, 0, 89, 0, 85, 0, 0,
+ 89, 89, 89, 89, 0, 0, 0, 0, 0, 89,
+ 89, 0, 0, 0, 89, 89, 89, 89, 89, 0,
+ 73, 89, 89, 73, 0, 0, 0, 85, 0, 0,
+ 0, 90, 90, 90, 90, 0, 0, 73, 73, 0,
+ 90, 0, 73, 0, 0, 90, 90, 90, 90, 0,
+ 0, 0, 0, 0, 90, 90, 0, 0, 0, 90,
+ 90, 90, 90, 90, 0, 74, 90, 90, 74, 0,
+ 0, 0, 73, 151, 0, 0, 0, 0, 152, 153,
+ 154, 155, 74, 74, 0, 0, 0, 74, 0, 0,
+ 0, 0, 156, 158, 159, 160, 161, 0, 0, 162,
+ 163, 0, 0, 164, 0, 0, 165, 166, 167, 0,
+ 86, 86, 86, 86, 0, 0, 0, 74, 0, 86,
+ 157, 0, 0, 0, 86, 86, 86, 86, 0, 0,
+ 0, 0, 0, 86, 86, 0, 0, 0, 86, 86,
+ 86, 86, 86, 0, 75, 86, 86, 75, 168, 0,
+ 0, 0, 0, 0, 0, 87, 87, 87, 87, 0,
+ 0, 75, 75, 0, 87, 0, 75, 0, 0, 87,
+ 87, 87, 87, 0, 0, 0, 0, 0, 87, 87,
+ 150, 0, 0, 87, 87, 87, 87, 87, 0, 0,
+ 87, 87, 76, 0, 0, 76, 75, 0, 0, 0,
+ 0, 0, 0, 85, 85, 85, 85, 0, 0, 76,
+ 76, 0, 85, 0, 76, 0, 0, 85, 85, 85,
+ 85, 0, 0, 0, 0, 0, 85, 85, 0, 0,
+ 0, 85, 85, 85, 85, 85, 0, 123, 85, 85,
+ 123, 0, 0, 0, 76, 0, 0, 0, 73, 73,
+ 73, 73, 0, 0, 123, 123, 0, 73, 0, 123,
+ 0, 0, 73, 73, 73, 73, 0, 0, 0, 0,
+ 0, 73, 73, 0, 0, 0, 73, 73, 73, 73,
+ 73, 0, 95, 73, 73, 95, 0, 0, 0, 123,
+ 0, 0, 0, 74, 74, 74, 74, 0, 0, 95,
+ 95, 0, 74, 0, 95, 0, 0, 74, 74, 74,
+ 74, 0, 0, 0, 0, 133, 74, 74, 133, 0,
+ 0, 74, 74, 74, 74, 74, 0, 0, 74, 0,
+ 0, 0, 133, 133, 95, 151, 0, 133, 0, 0,
+ 152, 153, 154, 155, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 156, 158, 159, 160, 161, 0,
+ 134, 162, 163, 134, 0, 164, 0, 133, 165, 166,
+ 167, 0, 75, 75, 75, 75, 80, 134, 134, 80,
+ 0, 75, 134, 0, 0, 0, 75, 75, 0, 75,
+ 0, 0, 0, 80, 80, 75, 75, 0, 80, 0,
+ 75, 75, 75, 75, 75, 0, 0, 75, 77, 0,
+ 0, 77, 134, 0, 0, 0, 0, 0, 0, 0,
+ 76, 76, 76, 76, 79, 77, 77, 79, 80, 76,
+ 77, 0, 0, 0, 76, 76, 0, 0, 0, 0,
+ 0, 79, 79, 76, 76, 0, 79, 0, 76, 76,
+ 76, 76, 76, 0, 0, 76, 0, 0, 0, 0,
+ 77, 0, 0, 0, 0, 123, 123, 123, 123, 82,
+ 0, 0, 82, 0, 123, 0, 79, 0, 0, 123,
+ 123, 0, 0, 0, 0, 0, 82, 82, 123, 123,
+ 0, 82, 0, 123, 123, 123, 123, 123, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 157, 0,
+ 95, 95, 95, 95, 0, 0, 0, 0, 0, 95,
+ 0, 82, 0, 0, 95, 95, 0, 0, 0, 0,
+ 0, 0, 0, 95, 95, 0, 168, 0, 95, 95,
+ 95, 95, 95, 133, 133, 133, 133, 0, 0, 0,
+ 0, 0, 133, 0, 0, 0, 0, 133, 133, 0,
+ 0, 0, 0, 0, 0, 0, 133, 133, 150, 0,
+ 0, 133, 133, 133, 133, 133, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 134, 134,
+ 134, 134, 0, 0, 0, 0, 0, 134, 0, 0,
+ 0, 0, 134, 134, 80, 80, 80, 80, 0, 0,
+ 0, 134, 134, 80, 0, 0, 134, 134, 134, 134,
+ 134, 0, 0, 0, 0, 0, 0, 80, 80, 0,
+ 0, 0, 80, 80, 80, 80, 77, 77, 77, 77,
+ 0, 0, 0, 0, 0, 77, 0, 0, 0, 0,
+ 0, 77, 79, 79, 79, 79, 0, 0, 0, 77,
+ 77, 79, 0, 0, 77, 77, 77, 77, 77, 0,
+ 0, 0, 0, 0, 0, 79, 79, 0, 0, 0,
+ 79, 79, 79, 79, 79, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 103, 0, 82, 82, 82,
+ 82, 110, 112, 0, 0, 0, 82, 0, 123, 124,
+ 125, 126, 127, 128, 129, 0, 0, 132, 133, 0,
+ 82, 82, 0, 151, 0, 82, 82, 82, 152, 153,
+ 154, 155, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 158, 159, 160, 161, 0, 0, 162,
+ 163, 182, 0, 164, 0, 0, 165, 166, 167, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 214, 0, 0, 0, 0, 0, 0,
+ 0, 222, 223, 224, 225, 226, 227, 228, 229, 230,
+ 231, 232, 233, 234, 235, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 292, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 308,
+};
+dEXT short yycheck[] = { 13,
+ 36, 91, 41, 17, 41, 59, 41, 44, 93, 125,
+ 123, 59, 0, 41, 36, 93, 30, 31, 32, 33,
+ 93, 58, 59, 192, 257, 93, 63, 41, 181, 59,
+ 93, 46, 59, 123, 48, 91, 40, 44, 40, 257,
+ 40, 91, 6, 41, 41, 33, 41, 40, 36, 37,
+ 38, 93, 40, 40, 42, 43, 93, 45, 41, 41,
+ 186, 59, 188, 41, 78, 29, 41, 123, 59, 91,
+ 41, 59, 41, 123, 89, 0, 64, 59, 257, 41,
+ 94, 59, 96, 47, 98, 40, 100, 123, 59, 91,
+ 36, 275, 41, 123, 40, 40, 123, 59, 41, 40,
+ 115, 123, 40, 91, 292, 293, 59, 121, 33, 41,
+ 59, 36, 37, 38, 44, 40, 59, 42, 43, 123,
+ 45, 123, 41, 123, 41, 59, 295, 141, 40, 298,
+ 123, 284, 273, 274, 59, 123, 123, 125, 126, 64,
+ 0, 260, 123, 59, 257, 40, 59, 263, 264, 265,
+ 93, 267, 268, 59, 40, 59, 41, 263, 264, 265,
+ 329, 267, 268, 177, 40, 125, 91, 293, 294, 183,
+ 91, 41, 59, 33, 300, 41, 36, 37, 38, 293,
+ 40, 125, 42, 43, 91, 45, 40, 59, 41, 40,
+ 125, 93, 125, 41, 209, 41, 322, 125, 123, 59,
+ 125, 126, 125, 59, 64, 123, 41, 292, 293, 257,
+ 41, 41, 59, 44, 292, 293, 59, 41, 59, 292,
+ 293, 257, 41, 313, 292, 293, 262, 58, 59, 292,
+ 293, 91, 269, 270, 271, 272, 258, 320, 292, 293,
+ 84, 255, 13, 257, 265, 259, 260, 92, 41, 263,
+ 292, 293, 266, 292, 293, 292, 293, 292, 293, -1,
+ 297, -1, 93, 123, 292, 293, 126, -1, 256, 257,
+ 258, 259, 260, 261, -1, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, 272, 292, 293, 301, 276, 277,
+ -1, 279, 280, 281, 282, 292, 293, 292, 293, 287,
+ 288, 289, 290, 291, -1, -1, 294, 295, 296, 292,
+ 293, -1, 326, -1, 302, 303, 330, 292, 293, 307,
+ -1, 309, 310, 292, 293, -1, 269, 270, 271, 272,
+ -1, 256, 257, 258, 259, 260, 261, -1, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, -1, 292,
+ 293, 276, 277, -1, 279, 280, 281, 282, 292, 293,
+ 292, 293, 287, 288, 289, 290, 291, -1, -1, 294,
+ 295, 296, 13, 292, 293, 292, 293, 302, 303, 292,
+ 293, -1, 307, -1, 309, 310, 292, 293, 292, 293,
+ 292, 293, -1, -1, -1, -1, 256, 257, 258, 259,
+ 260, 261, 43, -1, 45, -1, 266, -1, -1, 269,
+ 270, 271, 272, -1, 55, -1, 276, 277, 59, 279,
+ 280, 281, 282, -1, -1, -1, -1, 287, 288, 289,
+ 290, 291, -1, -1, 294, 295, 296, -1, 269, 270,
+ 271, 272, 302, 303, -1, -1, -1, 307, -1, 309,
+ 310, -1, 93, 91, 95, -1, 97, -1, 99, -1,
+ 101, 292, 293, 33, 105, -1, 36, 37, 38, -1,
+ 40, 41, 42, 43, 44, 45, 269, 270, 271, 272,
+ -1, -1, -1, -1, -1, 123, -1, -1, 58, 59,
+ 21, -1, -1, 63, 64, 269, 270, 271, 272, 292,
+ 293, -1, -1, 144, 145, 146, 147, 148, 149, 150,
+ -1, -1, -1, -1, -1, 46, -1, -1, 292, 293,
+ -1, 91, -1, 93, -1, -1, -1, 168, 169, 170,
+ 171, 172, 173, -1, 33, 91, -1, 36, 37, 38,
+ -1, 40, 41, 42, 43, 44, 45, -1, -1, -1,
+ -1, -1, -1, 123, -1, 196, 126, -1, 89, 58,
+ 59, 202, 203, 204, 63, 64, -1, 123, -1, 210,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 115, -1, -1, -1, -1, 120,
+ -1, -1, -1, -1, 93, 236, -1, 238, -1, -1,
+ 91, -1, 33, -1, -1, 36, 37, 38, -1, 40,
+ -1, 42, 43, -1, 45, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 265, -1, -1, 126, 59, -1,
+ -1, -1, 123, 64, -1, -1, -1, -1, 279, -1,
+ -1, -1, -1, -1, -1, 283, 284, 285, 286, -1,
+ -1, -1, -1, -1, 41, -1, 297, 44, -1, -1,
+ 91, 299, 300, 301, -1, -1, 304, 305, -1, -1,
+ 308, -1, -1, 311, 312, 313, 63, -1, 209, 320,
+ -1, -1, -1, -1, -1, -1, -1, 257, 258, 259,
+ 260, 261, 123, -1, -1, 126, 266, -1, -1, 269,
+ 270, 271, 272, -1, 91, -1, -1, 277, 278, 279,
+ 280, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299,
+ 300, 301, 302, 303, 304, 305, 123, 307, 308, 309,
+ 310, 311, 312, 313, -1, -1, -1, -1, -1, 305,
+ -1, -1, 308, -1, -1, 311, 312, 313, 257, 258,
+ 259, 260, 261, -1, -1, -1, -1, 266, -1, -1,
+ 269, 270, 271, 272, -1, 91, -1, -1, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
+ 299, 300, 301, 302, 303, 304, 305, 123, 307, 308,
+ 309, 310, 311, 312, 313, -1, 41, 308, -1, 44,
+ 311, 312, 313, -1, -1, 256, 257, 258, 259, 260,
+ 261, -1, -1, 58, 59, 266, -1, -1, 269, 270,
+ 271, 272, -1, -1, -1, 276, 277, -1, 279, 280,
+ 281, 282, -1, -1, -1, -1, 287, 288, 289, 290,
+ 291, 91, -1, 294, 295, 296, -1, 41, 93, -1,
+ 44, 302, 303, -1, -1, -1, 307, 33, 309, 310,
+ 36, 37, 38, -1, 40, 59, 42, 43, -1, 45,
+ -1, 278, -1, 123, -1, -1, 283, 284, 285, 286,
+ -1, -1, -1, 59, -1, -1, -1, -1, 64, -1,
+ 297, 298, 299, 300, 301, -1, -1, 304, 305, 93,
+ -1, 308, -1, -1, 311, 312, 313, -1, -1, -1,
+ -1, -1, -1, 33, -1, 91, 36, 37, 38, -1,
+ 40, -1, 42, 43, -1, 45, -1, -1, -1, -1,
+ -1, -1, -1, -1, 91, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 64, -1, -1, 123, -1, 285,
+ 126, -1, -1, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, 42, 43, -1, 45, 123, -1, -1, 305,
+ -1, 91, 308, -1, -1, 311, 312, 313, -1, 59,
+ -1, -1, -1, -1, 64, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 123, -1, -1, 126, -1, -1, 33,
+ -1, 91, 36, 37, 38, -1, 40, -1, 42, 43,
+ -1, 45, -1, -1, 269, 270, 271, 272, -1, -1,
+ -1, -1, -1, 283, 284, 285, 286, -1, -1, -1,
+ 64, -1, -1, -1, -1, -1, 126, 292, 293, -1,
+ 300, 301, 297, -1, 304, 305, -1, -1, 308, -1,
+ -1, 311, 312, 313, -1, -1, -1, 91, -1, 41,
+ -1, -1, 44, -1, -1, 269, 270, 271, 272, -1,
+ 256, 257, 258, 259, 260, 261, 58, 59, -1, -1,
+ 266, 63, -1, 269, 270, 271, 272, -1, 292, 123,
+ 276, 277, 126, 279, 280, 281, 282, -1, -1, -1,
+ -1, 287, 288, 289, 290, 291, -1, -1, 294, 295,
+ 296, 93, -1, -1, -1, -1, 302, 303, 285, 286,
+ -1, 307, -1, 309, 310, -1, -1, 257, 258, 259,
+ 260, 261, 262, -1, -1, -1, 266, 304, 305, -1,
+ -1, 308, 91, -1, 311, 312, 313, 277, -1, 279,
+ 280, 281, 282, -1, -1, -1, -1, 287, 288, 289,
+ 290, 291, -1, -1, 294, 295, 296, 257, 258, 259,
+ 260, 261, 302, 303, 123, -1, 266, 307, -1, 309,
+ 310, -1, -1, -1, -1, -1, -1, 277, -1, 279,
+ 280, 281, 282, -1, -1, -1, -1, 287, 288, 289,
+ 290, 291, -1, -1, 294, 295, 296, -1, -1, -1,
+ -1, -1, 302, 303, -1, -1, -1, 307, 41, 309,
+ 310, 44, -1, 257, 258, 259, 260, 261, 262, -1,
+ -1, -1, 266, -1, -1, 58, 59, -1, -1, -1,
+ 63, -1, -1, 277, -1, 279, 280, 281, 282, -1,
+ -1, -1, -1, 287, 288, 289, 290, 291, -1, -1,
+ -1, 295, 296, -1, -1, -1, -1, -1, 302, 303,
+ 93, -1, -1, 307, 33, 309, 310, 36, 37, 38,
+ -1, 40, 41, 42, 43, -1, 45, 269, 270, 271,
+ 272, -1, -1, -1, -1, 91, 278, -1, -1, -1,
+ -1, -1, -1, -1, -1, 64, -1, -1, -1, -1,
+ 292, 293, -1, -1, 33, 297, 298, 36, 37, 38,
+ -1, 40, -1, 42, 43, -1, 45, 123, -1, -1,
+ -1, -1, 91, -1, 283, 284, 285, 286, -1, -1,
+ -1, -1, -1, -1, -1, 64, -1, -1, -1, -1,
+ -1, 41, 301, -1, 44, 304, 305, -1, -1, 308,
+ -1, 26, 311, 312, 313, -1, -1, 126, 58, 59,
+ -1, -1, 91, 33, 93, 40, 36, 37, 38, -1,
+ 40, 46, 42, 43, -1, 45, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 60, 61, 62, 63, 64,
+ -1, -1, -1, 93, 64, -1, -1, 126, -1, -1,
+ -1, -1, -1, 33, -1, -1, 36, 37, 38, -1,
+ 40, 41, 42, 43, -1, 45, -1, -1, -1, -1,
+ -1, 91, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 106, -1, -1, 64, -1, 269, 270, 271, 272,
+ -1, -1, -1, 33, -1, 278, 36, 37, 38, -1,
+ 40, 41, 42, 43, -1, 45, 126, -1, -1, 292,
+ 293, 91, -1, -1, 297, 298, 299, 300, 301, -1,
+ -1, -1, -1, -1, 64, -1, -1, 283, 284, 285,
+ 286, -1, -1, -1, -1, -1, -1, -1, 257, 258,
+ 259, 260, 261, -1, -1, -1, 126, 266, 304, 305,
+ -1, 91, 308, -1, -1, 311, 312, 313, 277, -1,
+ 279, 280, 281, 282, -1, 91, -1, -1, 287, 288,
+ 289, 290, 291, -1, -1, 294, 295, 296, 257, 258,
+ 259, 260, 261, 302, 303, -1, 126, 266, 307, -1,
+ 309, 310, -1, -1, -1, -1, -1, 123, 277, -1,
+ 279, 280, 281, 282, -1, -1, -1, -1, 287, 288,
+ 289, 290, 291, -1, -1, 294, 295, 296, -1, 269,
+ 270, 271, 272, 302, 303, -1, -1, -1, 307, -1,
+ 309, 310, -1, -1, -1, -1, 256, 257, 258, 259,
+ 260, 261, 292, 293, -1, -1, 266, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 277, -1, 279,
+ 280, 281, 282, -1, -1, -1, -1, 287, 288, 289,
+ 290, 291, -1, -1, 294, 295, 296, 257, 258, 259,
+ 260, 261, 302, 303, -1, -1, 266, 307, -1, 309,
+ 310, -1, -1, -1, -1, -1, -1, 277, -1, 279,
+ 280, 281, 282, -1, -1, -1, -1, 287, 288, 289,
+ 290, 291, -1, 91, 294, 295, 296, 257, 258, 259,
+ 260, 261, 302, 303, -1, -1, 266, 307, -1, 309,
+ 310, -1, -1, -1, -1, -1, -1, 277, -1, 279,
+ 280, 281, 282, -1, -1, 123, -1, 287, 288, 289,
+ 290, 291, -1, -1, 294, 295, 296, -1, -1, 285,
+ 286, -1, 302, 303, -1, -1, -1, 307, 33, 309,
+ 310, 36, 37, 38, -1, 40, 41, 42, 43, 305,
+ 45, -1, 308, -1, -1, 311, 312, 313, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 64,
+ -1, -1, -1, -1, -1, -1, -1, -1, 33, -1,
+ -1, 36, 37, 38, -1, 40, 41, 42, 43, -1,
+ 45, -1, -1, -1, -1, -1, 91, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 64,
+ -1, -1, -1, -1, -1, -1, -1, -1, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, 42, 43, -1,
+ 45, 126, -1, -1, -1, -1, 91, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 64,
+ -1, -1, -1, -1, -1, -1, -1, -1, 33, -1,
+ -1, 36, 37, 38, -1, 40, -1, 42, 43, -1,
+ 45, 126, -1, -1, -1, 283, 91, 285, 286, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 64,
+ -1, -1, -1, -1, -1, -1, 304, 305, -1, -1,
+ 308, -1, -1, 311, 312, 313, -1, -1, 123, -1,
+ -1, 126, -1, -1, -1, -1, 91, -1, -1, -1,
+ -1, -1, -1, 33, -1, -1, 36, 37, 38, -1,
+ 40, -1, 42, 43, -1, 45, -1, 25, 26, -1,
+ -1, -1, -1, -1, -1, -1, 34, -1, -1, -1,
+ -1, 126, 40, 41, 64, -1, -1, -1, 46, -1,
+ -1, -1, 257, 258, 259, 260, 261, -1, -1, -1,
+ -1, 266, 60, 61, 62, 63, 64, -1, -1, -1,
+ -1, 91, 277, -1, 279, 280, 281, 282, -1, -1,
+ -1, -1, 287, 288, 289, 290, 291, -1, -1, 294,
+ 295, 296, 257, 258, 259, 260, 261, 302, 303, -1,
+ -1, 266, 307, 123, 309, 310, 126, -1, 106, -1,
+ -1, -1, 277, -1, 279, 280, 281, 282, -1, -1,
+ -1, -1, 287, 288, 289, 290, 291, -1, -1, 294,
+ 295, 296, 257, 258, 259, 260, 261, 302, 303, -1,
+ -1, 266, 307, -1, 309, 310, -1, -1, -1, -1,
+ -1, -1, 277, -1, 279, 280, 281, 282, -1, -1,
+ -1, -1, 287, 288, 289, 290, 291, -1, -1, 167,
+ 295, 296, 257, 258, 259, 260, 261, 302, 303, -1,
+ -1, 266, 307, 91, 309, 310, -1, -1, -1, -1,
+ 41, -1, 277, 44, 279, 280, 281, 282, -1, -1,
+ -1, -1, 287, 288, 289, 290, 291, 58, 59, 294,
+ 295, 296, -1, -1, -1, 123, -1, 302, 303, -1,
+ -1, -1, 307, 33, 309, 310, 36, 37, 38, -1,
+ 40, -1, 42, 43, -1, 45, -1, 257, 258, 259,
+ 260, 261, 93, -1, -1, -1, 266, -1, -1, -1,
+ -1, -1, -1, -1, 64, -1, -1, 277, -1, 279,
+ 280, 281, 282, -1, -1, -1, -1, 287, 288, 289,
+ 290, 291, -1, -1, 41, 295, 296, 44, -1, -1,
+ -1, 91, 302, 303, -1, -1, -1, 307, -1, 309,
+ 310, 58, 59, -1, -1, -1, 63, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 126, -1, -1, 41,
+ -1, -1, 44, -1, 91, -1, 93, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 58, 59, -1, -1,
+ -1, 63, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 123, -1, -1, -1,
+ -1, -1, -1, -1, 41, -1, -1, 44, -1, 91,
+ -1, 93, -1, -1, -1, 283, 284, 285, 286, -1,
+ -1, 58, 59, -1, -1, -1, 63, -1, -1, -1,
+ 298, 299, 300, 301, -1, -1, 304, 305, -1, -1,
+ 308, 123, -1, 311, 312, 313, -1, -1, -1, 41,
+ -1, -1, 44, -1, 91, -1, 93, -1, 269, 270,
+ 271, 272, -1, -1, -1, -1, 58, 59, -1, -1,
+ -1, 63, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 292, 293, -1, -1, -1, 123, 257, 258, 259,
+ 260, 261, -1, -1, -1, -1, 266, -1, -1, -1,
+ -1, 93, -1, -1, -1, -1, -1, 277, -1, 279,
+ 280, 281, 282, -1, -1, -1, -1, 287, 288, 289,
+ 290, 291, -1, -1, -1, 295, 296, -1, -1, -1,
+ 41, 123, 302, 303, -1, -1, -1, 307, -1, 309,
+ 310, -1, 269, 270, 271, 272, -1, 58, 59, -1,
+ -1, 278, 63, -1, -1, -1, 283, 284, 285, 286,
+ -1, -1, -1, -1, -1, 292, 293, -1, -1, -1,
+ 297, 298, 299, 300, 301, -1, 41, 304, 305, 44,
+ 91, 308, 93, -1, 311, 312, 313, 269, 270, 271,
+ 272, -1, -1, 58, 59, -1, 278, -1, 63, -1,
+ -1, 283, 284, 285, 286, -1, -1, -1, -1, -1,
+ 292, 293, 123, -1, -1, 297, 298, 299, 300, 301,
+ -1, 41, 304, 305, 44, -1, 308, -1, 93, 311,
+ 312, 313, 269, 270, 271, 272, -1, -1, 58, 59,
+ -1, 278, -1, 63, -1, -1, 283, 284, 285, 286,
+ -1, -1, -1, -1, -1, 292, 293, -1, 123, -1,
+ 297, 298, 299, 300, 301, -1, 41, 304, 305, 44,
+ -1, 308, -1, 93, 311, 312, 313, 269, 270, 271,
+ 272, -1, -1, 58, 59, -1, 278, -1, 63, -1,
+ -1, 283, 284, 285, 286, -1, -1, -1, -1, -1,
+ 292, 293, -1, 123, -1, 297, 298, 299, 300, 301,
+ -1, -1, 304, 305, 41, -1, 308, -1, 93, 311,
+ 312, 313, -1, -1, 41, -1, -1, 44, -1, -1,
+ -1, 58, 59, -1, -1, -1, 63, -1, -1, -1,
+ -1, 58, 59, -1, -1, -1, -1, -1, 123, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 269, 270,
+ 271, 272, 41, -1, 91, 44, 93, 278, -1, -1,
+ -1, -1, 283, 284, 285, 286, 93, -1, -1, 58,
+ 59, 292, 293, -1, 63, -1, 297, 298, 299, 300,
+ 301, -1, -1, 304, 305, -1, 123, 308, -1, -1,
+ 311, 312, 313, -1, 269, 270, 271, 272, 41, -1,
+ -1, 44, -1, 278, 93, -1, -1, -1, 283, 284,
+ 285, 286, -1, -1, -1, 58, 59, 292, 293, -1,
+ 63, -1, 297, 298, 299, 300, 301, -1, -1, 304,
+ 305, -1, -1, 308, 123, -1, 311, 312, 313, 269,
+ 270, 271, 272, 41, -1, -1, 44, -1, 278, -1,
+ 93, -1, -1, 283, 284, 285, 286, -1, -1, -1,
+ 58, 59, 292, 293, -1, 63, -1, 297, 298, 299,
+ 300, 301, -1, -1, 304, 305, -1, -1, 308, -1,
+ -1, 311, 312, 313, 269, 270, 271, 272, 41, -1,
+ -1, 44, -1, 278, -1, 93, -1, -1, 283, 284,
+ 285, 286, -1, -1, -1, 58, 59, 292, 293, -1,
+ 63, -1, 297, 298, 299, 300, 301, -1, -1, 304,
+ 305, -1, -1, 308, -1, -1, 311, 312, 313, -1,
+ -1, -1, 269, 270, 271, 272, 41, -1, -1, 44,
+ 93, 278, 269, 270, 271, 272, 283, 284, 285, 286,
+ -1, -1, -1, 58, 59, 292, 293, -1, 63, -1,
+ 297, 298, 299, 300, 301, 292, 293, 304, 305, -1,
+ -1, 308, -1, -1, 311, 312, 313, -1, -1, -1,
+ 269, 270, 271, 272, 41, -1, -1, -1, 93, 278,
+ -1, -1, -1, -1, 283, 284, 285, 286, -1, -1,
+ -1, -1, -1, 292, 293, -1, 63, -1, 297, 298,
+ 299, 300, 301, -1, -1, 304, 305, -1, -1, 308,
+ -1, -1, 311, 312, 313, -1, 269, 270, 271, 272,
+ 41, -1, -1, 44, 91, 278, -1, -1, -1, -1,
+ 283, 284, 285, 286, -1, -1, -1, 58, 59, 292,
+ 293, -1, 63, -1, 297, 298, 299, 300, 301, -1,
+ -1, 304, 305, -1, -1, 308, 123, -1, 311, 312,
+ 313, 269, 270, 271, 272, 41, -1, -1, 44, -1,
+ 278, -1, 93, -1, -1, 283, 284, 285, 286, -1,
+ -1, -1, 58, 59, 292, 293, -1, 63, -1, 297,
+ 298, 299, 300, 301, -1, -1, 304, 305, -1, -1,
+ 308, -1, -1, 311, 312, 313, 269, 270, 271, 272,
+ 41, -1, -1, 44, -1, 278, -1, 93, -1, -1,
+ 283, 284, 285, 286, -1, -1, -1, 58, 59, 292,
+ 293, -1, 63, -1, 297, 298, 299, 300, 301, -1,
+ -1, 304, 305, -1, -1, 308, -1, -1, 311, 312,
+ 313, -1, -1, -1, 269, 270, 271, 272, 41, -1,
+ -1, 44, 93, 278, -1, -1, -1, -1, 283, 284,
+ 285, 286, -1, -1, -1, 58, 59, 292, 293, -1,
+ 63, -1, 297, 298, 299, 300, 301, -1, -1, 304,
+ 305, -1, -1, 308, -1, -1, 311, 312, 313, -1,
+ -1, -1, -1, 41, -1, -1, 44, -1, -1, -1,
+ 93, 278, -1, -1, -1, -1, 283, 284, 285, 286,
+ 58, 59, -1, -1, -1, 63, -1, -1, -1, -1,
+ 297, 298, 299, 300, 301, -1, -1, 304, 305, -1,
+ -1, 308, -1, -1, 311, 312, 313, -1, 269, 270,
+ 271, 272, -1, 58, -1, 93, -1, 278, 63, -1,
+ -1, -1, 283, 284, 285, 286, -1, -1, -1, -1,
+ -1, 292, 293, -1, -1, -1, 297, 298, 299, 300,
+ 301, -1, 41, 304, 305, 44, 91, 308, -1, -1,
+ -1, -1, -1, 269, 270, 271, 272, -1, -1, 58,
+ 59, -1, 278, -1, 63, -1, -1, 283, 284, 285,
+ 286, -1, -1, -1, -1, -1, 292, 293, 123, -1,
+ -1, 297, 298, 299, 300, 301, -1, 41, 304, 305,
+ 44, -1, 308, -1, 93, -1, -1, -1, 269, 270,
+ 271, 272, -1, -1, 58, 59, -1, 278, -1, 63,
+ -1, -1, 283, 284, 285, 286, -1, -1, -1, -1,
+ -1, 292, 293, -1, -1, -1, 297, 298, 299, 300,
+ 301, -1, -1, 304, 305, 41, -1, -1, 44, 93,
+ -1, -1, -1, -1, -1, -1, 269, 270, 271, 272,
+ -1, -1, 58, 59, -1, 278, -1, 63, -1, -1,
+ 283, 284, 285, 286, -1, -1, -1, -1, -1, 292,
+ 293, -1, -1, -1, 297, 298, 299, 300, 301, -1,
+ 41, 304, 305, 44, -1, -1, -1, 93, -1, -1,
+ -1, 269, 270, 271, 272, -1, -1, 58, 59, -1,
+ 278, -1, 63, -1, -1, 283, 284, 285, 286, -1,
+ -1, -1, -1, -1, 292, 293, -1, -1, -1, 297,
+ 298, 299, 300, 301, -1, 41, 304, 305, 44, -1,
+ -1, -1, 93, 278, -1, -1, -1, -1, 283, 284,
+ 285, 286, 58, 59, -1, -1, -1, 63, -1, -1,
+ -1, -1, 297, 298, 299, 300, 301, -1, -1, 304,
+ 305, -1, -1, 308, -1, -1, 311, 312, 313, -1,
+ 269, 270, 271, 272, -1, -1, -1, 93, -1, 278,
+ 63, -1, -1, -1, 283, 284, 285, 286, -1, -1,
+ -1, -1, -1, 292, 293, -1, -1, -1, 297, 298,
+ 299, 300, 301, -1, 41, 304, 305, 44, 91, -1,
+ -1, -1, -1, -1, -1, 269, 270, 271, 272, -1,
+ -1, 58, 59, -1, 278, -1, 63, -1, -1, 283,
+ 284, 285, 286, -1, -1, -1, -1, -1, 292, 293,
+ 123, -1, -1, 297, 298, 299, 300, 301, -1, -1,
+ 304, 305, 41, -1, -1, 44, 93, -1, -1, -1,
+ -1, -1, -1, 269, 270, 271, 272, -1, -1, 58,
+ 59, -1, 278, -1, 63, -1, -1, 283, 284, 285,
+ 286, -1, -1, -1, -1, -1, 292, 293, -1, -1,
+ -1, 297, 298, 299, 300, 301, -1, 41, 304, 305,
+ 44, -1, -1, -1, 93, -1, -1, -1, 269, 270,
+ 271, 272, -1, -1, 58, 59, -1, 278, -1, 63,
+ -1, -1, 283, 284, 285, 286, -1, -1, -1, -1,
+ -1, 292, 293, -1, -1, -1, 297, 298, 299, 300,
+ 301, -1, 41, 304, 305, 44, -1, -1, -1, 93,
+ -1, -1, -1, 269, 270, 271, 272, -1, -1, 58,
+ 59, -1, 278, -1, 63, -1, -1, 283, 284, 285,
+ 286, -1, -1, -1, -1, 41, 292, 293, 44, -1,
+ -1, 297, 298, 299, 300, 301, -1, -1, 304, -1,
+ -1, -1, 58, 59, 93, 278, -1, 63, -1, -1,
+ 283, 284, 285, 286, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 297, 298, 299, 300, 301, -1,
+ 41, 304, 305, 44, -1, 308, -1, 93, 311, 312,
+ 313, -1, 269, 270, 271, 272, 41, 58, 59, 44,
+ -1, 278, 63, -1, -1, -1, 283, 284, -1, 286,
+ -1, -1, -1, 58, 59, 292, 293, -1, 63, -1,
+ 297, 298, 299, 300, 301, -1, -1, 304, 41, -1,
+ -1, 44, 93, -1, -1, -1, -1, -1, -1, -1,
+ 269, 270, 271, 272, 41, 58, 59, 44, 93, 278,
+ 63, -1, -1, -1, 283, 284, -1, -1, -1, -1,
+ -1, 58, 59, 292, 293, -1, 63, -1, 297, 298,
+ 299, 300, 301, -1, -1, 304, -1, -1, -1, -1,
+ 93, -1, -1, -1, -1, 269, 270, 271, 272, 41,
+ -1, -1, 44, -1, 278, -1, 93, -1, -1, 283,
+ 284, -1, -1, -1, -1, -1, 58, 59, 292, 293,
+ -1, 63, -1, 297, 298, 299, 300, 301, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 63, -1,
+ 269, 270, 271, 272, -1, -1, -1, -1, -1, 278,
+ -1, 93, -1, -1, 283, 284, -1, -1, -1, -1,
+ -1, -1, -1, 292, 293, -1, 91, -1, 297, 298,
+ 299, 300, 301, 269, 270, 271, 272, -1, -1, -1,
+ -1, -1, 278, -1, -1, -1, -1, 283, 284, -1,
+ -1, -1, -1, -1, -1, -1, 292, 293, 123, -1,
+ -1, 297, 298, 299, 300, 301, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 269, 270,
+ 271, 272, -1, -1, -1, -1, -1, 278, -1, -1,
+ -1, -1, 283, 284, 269, 270, 271, 272, -1, -1,
+ -1, 292, 293, 278, -1, -1, 297, 298, 299, 300,
+ 301, -1, -1, -1, -1, -1, -1, 292, 293, -1,
+ -1, -1, 297, 298, 299, 300, 269, 270, 271, 272,
+ -1, -1, -1, -1, -1, 278, -1, -1, -1, -1,
+ -1, 284, 269, 270, 271, 272, -1, -1, -1, 292,
+ 293, 278, -1, -1, 297, 298, 299, 300, 301, -1,
+ -1, -1, -1, -1, -1, 292, 293, -1, -1, -1,
+ 297, 298, 299, 300, 301, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 35, -1, 269, 270, 271,
+ 272, 41, 42, -1, -1, -1, 278, -1, 48, 49,
+ 50, 51, 52, 53, 54, -1, -1, 57, 58, -1,
+ 292, 293, -1, 278, -1, 297, 298, 299, 283, 284,
+ 285, 286, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 298, 299, 300, 301, -1, -1, 304,
+ 305, 91, -1, 308, -1, -1, 311, 312, 313, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 143, -1, -1, -1, -1, -1, -1,
+ -1, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 253, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 281,
+};
+#define YYFINAL 1
+#ifndef YYDEBUG
+#define YYDEBUG 0
+#endif
+#define YYMAXTOKEN 313
+#if YYDEBUG
+dEXT char * yyname[] = {
+"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+"'!'",0,0,"'$'","'%'","'&'",0,"'('","')'","'*'","'+'","','","'-'",0,0,0,0,0,0,0,
+0,0,0,0,0,"':'","';'",0,0,0,"'?'","'@'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,"'['",0,"']'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,"'{'",0,"'}'","'~'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"WORD","METHOD","FUNCMETH","THING",
+"PMFUNC","PRIVATEREF","LABEL","FORMAT","SUB","ANONSUB","PACKAGE","USE","WHILE",
+"UNTIL","IF","UNLESS","ELSE","ELSIF","CONTINUE","FOR","LOOPEX","DOTDOT","FUNC0",
+"FUNC1","FUNC","FUNC0SUB","RELOP","EQOP","MULOP","ADDOP","DOLSHARP","DO",
+"LOCAL","HASHBRACK","NOAMP","OROP","ANDOP","NOTOP","LSTOP","LSTOPSUB",
+"ASSIGNOP","OROR","ANDAND","BITOROP","BITANDOP","UNIOP","UNIOPSUB","SHIFTOP",
+"MATCHOP","UMINUS","REFGEN","POWOP","PREINC","PREDEC","POSTINC","POSTDEC",
+"ARROW",
+};
+dEXT char * yyrule[] = {
+"$accept : prog",
+"$$1 :",
+"prog : $$1 lineseq",
+"block : '{' remember lineseq '}'",
+"remember :",
+"lineseq :",
+"lineseq : lineseq decl",
+"lineseq : lineseq line",
+"line : label cond",
+"line : loop",
+"line : label ';'",
+"line : label sideff ';'",
+"sideff : error",
+"sideff : expr",
+"sideff : expr IF expr",
+"sideff : expr UNLESS expr",
+"sideff : expr WHILE expr",
+"sideff : expr UNTIL expr",
+"else :",
+"else : ELSE block",
+"else : ELSIF '(' expr ')' block else",
+"cond : IF '(' expr ')' block else",
+"cond : UNLESS '(' expr ')' block else",
+"cond : IF block block else",
+"cond : UNLESS block block else",
+"cont :",
+"cont : CONTINUE block",
+"loop : label WHILE '(' texpr ')' block cont",
+"loop : label UNTIL '(' expr ')' block cont",
+"loop : label WHILE block block cont",
+"loop : label UNTIL block block cont",
+"loop : label FOR scalar '(' expr ')' block cont",
+"loop : label FOR '(' expr ')' block cont",
+"loop : label FOR '(' nexpr ';' texpr ';' nexpr ')' block",
+"loop : label block cont",
+"nexpr :",
+"nexpr : sideff",
+"texpr :",
+"texpr : expr",
+"label :",
+"label : LABEL",
+"decl : format",
+"decl : subrout",
+"decl : package",
+"decl : use",
+"format : FORMAT startsub WORD block",
+"format : FORMAT startsub block",
+"subrout : SUB startsub WORD proto block",
+"subrout : SUB startsub WORD proto ';'",
+"proto :",
+"proto : THING",
+"startsub :",
+"package : PACKAGE WORD ';'",
+"package : PACKAGE ';'",
+"use : USE WORD listexpr ';'",
+"expr : expr ANDOP expr",
+"expr : expr OROP expr",
+"expr : NOTOP expr",
+"expr : argexpr",
+"argexpr : argexpr ','",
+"argexpr : argexpr ',' term",
+"argexpr : term",
+"listop : LSTOP indirob argexpr",
+"listop : FUNC '(' indirob expr ')'",
+"listop : term ARROW method '(' listexprcom ')'",
+"listop : METHOD indirob listexpr",
+"listop : FUNCMETH indirob '(' listexprcom ')'",
+"listop : LSTOP listexpr",
+"listop : FUNC '(' listexprcom ')'",
+"listop : LSTOPSUB startsub block listexpr",
+"method : METHOD",
+"method : scalar",
+"term : term ASSIGNOP term",
+"term : term POWOP term",
+"term : term MULOP term",
+"term : term ADDOP term",
+"term : term SHIFTOP term",
+"term : term RELOP term",
+"term : term EQOP term",
+"term : term BITANDOP term",
+"term : term BITOROP term",
+"term : term DOTDOT term",
+"term : term ANDAND term",
+"term : term OROR term",
+"term : term '?' term ':' term",
+"term : term MATCHOP term",
+"term : '-' term",
+"term : '+' term",
+"term : '!' term",
+"term : '~' term",
+"term : REFGEN term",
+"term : term POSTINC",
+"term : term POSTDEC",
+"term : PREINC term",
+"term : PREDEC term",
+"term : LOCAL term",
+"term : '(' expr ')'",
+"term : '(' ')'",
+"term : '[' expr ']'",
+"term : '[' ']'",
+"term : HASHBRACK expr ';' '}'",
+"term : HASHBRACK ';' '}'",
+"term : ANONSUB startsub proto block",
+"term : scalar",
+"term : star",
+"term : scalar '[' expr ']'",
+"term : term ARROW '[' expr ']'",
+"term : term '[' expr ']'",
+"term : hsh",
+"term : ary",
+"term : arylen",
+"term : scalar '{' expr ';' '}'",
+"term : term ARROW '{' expr ';' '}'",
+"term : term '{' expr ';' '}'",
+"term : '(' expr ')' '[' expr ']'",
+"term : '(' ')' '[' expr ']'",
+"term : ary '[' expr ']'",
+"term : ary '{' expr ';' '}'",
+"term : THING",
+"term : amper",
+"term : amper '(' ')'",
+"term : amper '(' expr ')'",
+"term : NOAMP WORD listexpr",
+"term : DO term",
+"term : DO block",
+"term : DO WORD '(' ')'",
+"term : DO WORD '(' expr ')'",
+"term : DO scalar '(' ')'",
+"term : DO scalar '(' expr ')'",
+"term : LOOPEX",
+"term : LOOPEX term",
+"term : UNIOP",
+"term : UNIOP block",
+"term : UNIOP term",
+"term : UNIOPSUB term",
+"term : FUNC0",
+"term : FUNC0 '(' ')'",
+"term : FUNC0SUB",
+"term : FUNC1 '(' ')'",
+"term : FUNC1 '(' expr ')'",
+"term : PMFUNC '(' term ')'",
+"term : PMFUNC '(' term ',' term ')'",
+"term : WORD",
+"term : listop",
+"listexpr :",
+"listexpr : argexpr",
+"listexprcom :",
+"listexprcom : expr",
+"listexprcom : expr ','",
+"amper : '&' indirob",
+"scalar : '$' indirob",
+"ary : '@' indirob",
+"hsh : '%' indirob",
+"arylen : DOLSHARP indirob",
+"star : '*' indirob",
+"indirob : WORD",
+"indirob : scalar",
+"indirob : block",
+"indirob : PRIVATEREF",
+};
+#endif
+#define yyclearin (yychar=(-1))
+#define yyerrok (yyerrflag=0)
+#ifdef YYSTACKSIZE
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
+#endif
+#else
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
+#else
+#define YYSTACKSIZE 500
+#define YYMAXDEPTH 500
+#endif
+#endif
+dEXT int yydebug;
+dEXT int yynerrs;
+dEXT int yyerrflag;
+dEXT int yychar;
+dEXT YYSTYPE yyval;
+dEXT YYSTYPE yylval;
+#line 562 "perly.y"
+ /* PROGRAM */
+#line 1307 "y.tab.c"
+#define YYABORT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
+
+struct ysv {
+ short* yyss;
+ YYSTYPE* yyvs;
+ int oldyydebug;
+ int oldyynerrs;
+ int oldyyerrflag;
+ int oldyychar;
+ YYSTYPE oldyyval;
+ YYSTYPE oldyylval;
+};
+
+void
+yydestruct(ptr)
+void* ptr;
+{
+ struct ysv* ysave = (struct ysv*)ptr;
+ if (ysave->yyss) Safefree(ysave->yyss);
+ if (ysave->yyvs) Safefree(ysave->yyvs);
+ yydebug = ysave->oldyydebug;
+ yynerrs = ysave->oldyynerrs;
+ yyerrflag = ysave->oldyyerrflag;
+ yychar = ysave->oldyychar;
+ yyval = ysave->oldyyval;
+ yylval = ysave->oldyylval;
+ Safefree(ysave);
+}
+
+int
+yyparse()
+{
+ register int yym, yyn, yystate;
+ register short *yyssp;
+ register YYSTYPE *yyvsp;
+ short* yyss;
+ YYSTYPE* yyvs;
+ unsigned yystacksize = YYSTACKSIZE;
+ int retval = 0;
+#if YYDEBUG
+ register char *yys;
+ extern char *getenv();
+#endif
+
+ struct ysv *ysave = (struct ysv*)safemalloc(sizeof(struct ysv));
+ SAVEDESTRUCTOR(yydestruct, ysave);
+ ysave->oldyydebug = yydebug;
+ ysave->oldyynerrs = yynerrs;
+ ysave->oldyyerrflag = yyerrflag;
+ ysave->oldyychar = yychar;
+ ysave->oldyyval = yyval;
+ ysave->oldyylval = yylval;
+
+#if YYDEBUG
+ if (yys = getenv("YYDEBUG"))
+ {
+ yyn = *yys;
+ if (yyn >= '0' && yyn <= '9')
+ yydebug = yyn - '0';
+ }
+#endif
+
+ yynerrs = 0;
+ yyerrflag = 0;
+ yychar = (-1);
+
+ /*
+ ** Initialize private stacks (yyparse may be called from an action)
+ */
+ ysave->yyss = yyss = (short*)safemalloc(yystacksize*sizeof(short));
+ ysave->yyvs = yyvs = (YYSTYPE*)safemalloc(yystacksize*sizeof(YYSTYPE));
+ if (!yyvs || !yyss)
+ goto yyoverflow;
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+ *yyssp = yystate = 0;
+
+yyloop:
+ if (yyn = yydefred[yystate]) goto yyreduce;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ fprintf(stderr, "yydebug: state %d, reading %d (%s)\n", yystate,
+ yychar, yys);
+ }
+#endif
+ }
+ if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+#if YYDEBUG
+ if (yydebug)
+ fprintf(stderr, "yydebug: state %d, shifting to state %d\n",
+ yystate, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /*
+ ** reallocate and recover. Note that pointers
+ ** have to be reset, or bad things will happen
+ */
+ int yyps_index = (yyssp - yyss);
+ int yypv_index = (yyvsp - yyvs);
+ yystacksize += YYSTACKSIZE;
+ ysave->yyvs = yyvs =
+ (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
+ ysave->yyss = yyss =
+ (short*)realloc((char*)yyss,yystacksize * sizeof(short));
+ if (!yyvs || !yyss)
+ goto yyoverflow;
+ yyssp = yyss + yyps_index;
+ yyvsp = yyvs + yypv_index;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ yychar = (-1);
+ if (yyerrflag > 0) --yyerrflag;
+ goto yyloop;
+ }
+ if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+ yyn = yytable[yyn];
+ goto yyreduce;
+ }
+ if (yyerrflag) goto yyinrecovery;
+#ifdef lint
+ goto yynewerror;
+#endif
+yynewerror:
+ yyerror("syntax error");
+#ifdef lint
+ goto yyerrlab;
+#endif
+yyerrlab:
+ ++yynerrs;
+yyinrecovery:
+ if (yyerrflag < 3)
+ {
+ yyerrflag = 3;
+ for (;;)
+ {
+ if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
+ {
+#if YYDEBUG
+ if (yydebug)
+ fprintf(stderr,
+ "yydebug: state %d, error recovery shifting to state %d\n",
+ *yyssp, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /*
+ ** reallocate and recover. Note that pointers
+ ** have to be reset, or bad things will happen
+ */
+ int yyps_index = (yyssp - yyss);
+ int yypv_index = (yyvsp - yyvs);
+ yystacksize += YYSTACKSIZE;
+ ysave->yyvs = yyvs = (YYSTYPE*)realloc((char*)yyvs,
+ yystacksize * sizeof(YYSTYPE));
+ ysave->yyss = yyss = (short*)realloc((char*)yyss,
+ yystacksize * sizeof(short));
+ if (!yyvs || !yyss)
+ goto yyoverflow;
+ yyssp = yyss + yyps_index;
+ yyvsp = yyvs + yypv_index;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ goto yyloop;
+ }
+ else
+ {
+#if YYDEBUG
+ if (yydebug)
+ fprintf(stderr,
+ "yydebug: error recovery discarding state %d\n",
+ *yyssp);
+#endif
+ if (yyssp <= yyss) goto yyabort;
+ --yyssp;
+ --yyvsp;
+ }
+ }
+ }
+ else
+ {
+ if (yychar == 0) goto yyabort;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ fprintf(stderr,
+ "yydebug: state %d, error recovery discards token %d (%s)\n",
+ yystate, yychar, yys);
+ }
+#endif
+ yychar = (-1);
+ goto yyloop;
+ }
+yyreduce:
+#if YYDEBUG
+ if (yydebug)
+ fprintf(stderr, "yydebug: state %d, reducing by rule %d (%s)\n",
+ yystate, yyn, yyrule[yyn]);
+#endif
+ yym = yylen[yyn];
+ yyval = yyvsp[1-yym];
+ switch (yyn)
+ {
+case 1:
+#line 83 "perly.y"
+{
+#if defined(YYDEBUG) && defined(DEBUGGING)
+ yydebug = (debug & 1);
+#endif
+ expect = XSTATE;
+ }
+break;
+case 2:
+#line 90 "perly.y"
+{ newPROG(yyvsp[0].opval); }
+break;
+case 3:
+#line 94 "perly.y"
+{ yyval.opval = block_end(yyvsp[-3].ival,yyvsp[-2].ival,yyvsp[-1].opval); }
+break;
+case 4:
+#line 98 "perly.y"
+{ yyval.ival = block_start(); }
+break;
+case 5:
+#line 102 "perly.y"
+{ yyval.opval = Nullop; }
+break;
+case 6:
+#line 104 "perly.y"
+{ yyval.opval = yyvsp[-1].opval; }
+break;
+case 7:
+#line 106 "perly.y"
+{ yyval.opval = append_list(OP_LINESEQ,
+ (LISTOP*)yyvsp[-1].opval, (LISTOP*)yyvsp[0].opval);
+ pad_reset_pending = TRUE;
+ if (yyvsp[-1].opval && yyvsp[0].opval) hints |= HINT_BLOCK_SCOPE; }
+break;
+case 8:
+#line 113 "perly.y"
+{ yyval.opval = newSTATEOP(0, yyvsp[-1].pval, yyvsp[0].opval); }
+break;
+case 10:
+#line 116 "perly.y"
+{ if (yyvsp[-1].pval != Nullch) {
+ yyval.opval = newSTATEOP(0, yyvsp[-1].pval, newOP(OP_NULL, 0));
+ }
+ else {
+ yyval.opval = Nullop;
+ copline = NOLINE;
+ }
+ expect = XSTATE; }
+break;
+case 11:
+#line 125 "perly.y"
+{ yyval.opval = newSTATEOP(0, yyvsp[-2].pval, yyvsp[-1].opval);
+ expect = XSTATE; }
+break;
+case 12:
+#line 130 "perly.y"
+{ yyval.opval = Nullop; }
+break;
+case 13:
+#line 132 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+case 14:
+#line 134 "perly.y"
+{ yyval.opval = newLOGOP(OP_AND, 0, yyvsp[0].opval, yyvsp[-2].opval); }
+break;
+case 15:
+#line 136 "perly.y"
+{ yyval.opval = newLOGOP(OP_OR, 0, yyvsp[0].opval, yyvsp[-2].opval); }
+break;
+case 16:
+#line 138 "perly.y"
+{ yyval.opval = newLOOPOP(OPf_PARENS, 1, scalar(yyvsp[0].opval), yyvsp[-2].opval); }
+break;
+case 17:
+#line 140 "perly.y"
+{ yyval.opval = newLOOPOP(OPf_PARENS, 1, invert(scalar(yyvsp[0].opval)), yyvsp[-2].opval);}
+break;
+case 18:
+#line 144 "perly.y"
+{ yyval.opval = Nullop; }
+break;
+case 19:
+#line 146 "perly.y"
+{ yyval.opval = scope(yyvsp[0].opval); }
+break;
+case 20:
+#line 148 "perly.y"
+{ copline = yyvsp[-5].ival;
+ yyval.opval = newSTATEOP(0, 0,
+ newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval));
+ hints |= HINT_BLOCK_SCOPE; }
+break;
+case 21:
+#line 155 "perly.y"
+{ copline = yyvsp[-5].ival;
+ yyval.opval = newCONDOP(0, yyvsp[-3].opval, scope(yyvsp[-1].opval), yyvsp[0].opval); }
+break;
+case 22:
+#line 158 "perly.y"
+{ copline = yyvsp[-5].ival;
+ yyval.opval = newCONDOP(0,
+ invert(scalar(yyvsp[-3].opval)), scope(yyvsp[-1].opval), yyvsp[0].opval); }
+break;
+case 23:
+#line 162 "perly.y"
+{ copline = yyvsp[-3].ival;
+ deprecate("if BLOCK BLOCK");
+ yyval.opval = newCONDOP(0, scope(yyvsp[-2].opval), scope(yyvsp[-1].opval), yyvsp[0].opval); }
+break;
+case 24:
+#line 166 "perly.y"
+{ copline = yyvsp[-3].ival;
+ deprecate("unless BLOCK BLOCK");
+ yyval.opval = newCONDOP(0, invert(scalar(scope(yyvsp[-2].opval))),
+ scope(yyvsp[-1].opval), yyvsp[0].opval); }
+break;
+case 25:
+#line 173 "perly.y"
+{ yyval.opval = Nullop; }
+break;
+case 26:
+#line 175 "perly.y"
+{ yyval.opval = scope(yyvsp[0].opval); }
+break;
+case 27:
+#line 179 "perly.y"
+{ copline = yyvsp[-5].ival;
+ yyval.opval = newSTATEOP(0, yyvsp[-6].pval,
+ newWHILEOP(0, 1, (LOOP*)Nullop,
+ yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval) ); }
+break;
+case 28:
+#line 184 "perly.y"
+{ copline = yyvsp[-5].ival;
+ yyval.opval = newSTATEOP(0, yyvsp[-6].pval,
+ newWHILEOP(0, 1, (LOOP*)Nullop,
+ invert(scalar(yyvsp[-3].opval)), yyvsp[-1].opval, yyvsp[0].opval) ); }
+break;
+case 29:
+#line 189 "perly.y"
+{ copline = yyvsp[-3].ival;
+ yyval.opval = newSTATEOP(0, yyvsp[-4].pval,
+ newWHILEOP(0, 1, (LOOP*)Nullop,
+ scope(yyvsp[-2].opval), yyvsp[-1].opval, yyvsp[0].opval) ); }
+break;
+case 30:
+#line 194 "perly.y"
+{ copline = yyvsp[-3].ival;
+ yyval.opval = newSTATEOP(0, yyvsp[-4].pval,
+ newWHILEOP(0, 1, (LOOP*)Nullop,
+ invert(scalar(scope(yyvsp[-2].opval))), yyvsp[-1].opval, yyvsp[0].opval)); }
+break;
+case 31:
+#line 199 "perly.y"
+{ yyval.opval = newFOROP(0, yyvsp[-7].pval, yyvsp[-6].ival, mod(yyvsp[-5].opval, OP_ENTERLOOP),
+ yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval); }
+break;
+case 32:
+#line 202 "perly.y"
+{ yyval.opval = newFOROP(0, yyvsp[-6].pval, yyvsp[-5].ival, Nullop, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval); }
+break;
+case 33:
+#line 205 "perly.y"
+{ copline = yyvsp[-8].ival;
+ yyval.opval = append_elem(OP_LINESEQ,
+ newSTATEOP(0, yyvsp[-9].pval, scalar(yyvsp[-6].opval)),
+ newSTATEOP(0, yyvsp[-9].pval,
+ newWHILEOP(0, 1, (LOOP*)Nullop,
+ scalar(yyvsp[-4].opval), yyvsp[0].opval, scalar(yyvsp[-2].opval)) )); }
+break;
+case 34:
+#line 212 "perly.y"
+{ yyval.opval = newSTATEOP(0,
+ yyvsp[-2].pval, newWHILEOP(0, 1, (LOOP*)Nullop,
+ Nullop, yyvsp[-1].opval, yyvsp[0].opval)); }
+break;
+case 35:
+#line 218 "perly.y"
+{ yyval.opval = Nullop; }
+break;
+case 37:
+#line 223 "perly.y"
+{ (void)scan_num("1"); yyval.opval = yylval.opval; }
+break;
+case 39:
+#line 228 "perly.y"
+{ yyval.pval = Nullch; }
+break;
+case 41:
+#line 233 "perly.y"
+{ yyval.ival = 0; }
+break;
+case 42:
+#line 235 "perly.y"
+{ yyval.ival = 0; }
+break;
+case 43:
+#line 237 "perly.y"
+{ yyval.ival = 0; }
+break;
+case 44:
+#line 239 "perly.y"
+{ yyval.ival = 0; }
+break;
+case 45:
+#line 243 "perly.y"
+{ newFORM(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); }
+break;
+case 46:
+#line 245 "perly.y"
+{ newFORM(yyvsp[-1].ival, Nullop, yyvsp[0].opval); }
+break;
+case 47:
+#line 249 "perly.y"
+{ newSUB(yyvsp[-3].ival, yyvsp[-2].opval, yyvsp[-1].opval, yyvsp[0].opval); }
+break;
+case 48:
+#line 251 "perly.y"
+{ newSUB(yyvsp[-3].ival, yyvsp[-2].opval, yyvsp[-1].opval, Nullop); expect = XSTATE; }
+break;
+case 49:
+#line 255 "perly.y"
+{ yyval.opval = Nullop; }
+break;
+case 51:
+#line 260 "perly.y"
+{ yyval.ival = start_subparse(); }
+break;
+case 52:
+#line 264 "perly.y"
+{ package(yyvsp[-1].opval); }
+break;
+case 53:
+#line 266 "perly.y"
+{ package(Nullop); }
+break;
+case 54:
+#line 270 "perly.y"
+{ utilize(yyvsp[-3].ival, yyvsp[-2].opval, yyvsp[-1].opval); }
+break;
+case 55:
+#line 274 "perly.y"
+{ yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); }
+break;
+case 56:
+#line 276 "perly.y"
+{ yyval.opval = newLOGOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, yyvsp[0].opval); }
+break;
+case 57:
+#line 278 "perly.y"
+{ yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); }
+break;
+case 59:
+#line 283 "perly.y"
+{ yyval.opval = yyvsp[-1].opval; }
+break;
+case 60:
+#line 285 "perly.y"
+{ yyval.opval = append_elem(OP_LIST, yyvsp[-2].opval, yyvsp[0].opval); }
+break;
+case 62:
+#line 290 "perly.y"
+{ yyval.opval = convert(yyvsp[-2].ival, OPf_STACKED,
+ prepend_elem(OP_LIST, newGVREF(yyvsp[-2].ival,yyvsp[-1].opval), yyvsp[0].opval) ); }
+break;
+case 63:
+#line 293 "perly.y"
+{ yyval.opval = convert(yyvsp[-4].ival, OPf_STACKED,
+ prepend_elem(OP_LIST, newGVREF(yyvsp[-4].ival,yyvsp[-2].opval), yyvsp[-1].opval) ); }
+break;
+case 64:
+#line 296 "perly.y"
+{ yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST,
+ prepend_elem(OP_LIST, yyvsp[-5].opval, yyvsp[-1].opval),
+ newUNOP(OP_METHOD, 0, yyvsp[-3].opval))); }
+break;
+case 65:
+#line 301 "perly.y"
+{ yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST,
+ prepend_elem(OP_LIST, yyvsp[-1].opval, yyvsp[0].opval),
+ newUNOP(OP_METHOD, 0, yyvsp[-2].opval))); }
+break;
+case 66:
+#line 306 "perly.y"
+{ yyval.opval = convert(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST,
+ prepend_elem(OP_LIST, yyvsp[-3].opval, yyvsp[-1].opval),
+ newUNOP(OP_METHOD, 0, yyvsp[-4].opval))); }
+break;
+case 67:
+#line 311 "perly.y"
+{ yyval.opval = convert(yyvsp[-1].ival, 0, yyvsp[0].opval); }
+break;
+case 68:
+#line 313 "perly.y"
+{ yyval.opval = convert(yyvsp[-3].ival, 0, yyvsp[-1].opval); }
+break;
+case 69:
+#line 315 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST,
+ prepend_elem(OP_LIST, newANONSUB(yyvsp[-2].ival, 0, yyvsp[-1].opval), yyvsp[0].opval),
+ yyvsp[-3].ival)); }
+break;
+case 72:
+#line 326 "perly.y"
+{ yyval.opval = newASSIGNOP(OPf_STACKED, yyvsp[-2].opval, yyvsp[-1].ival, yyvsp[0].opval); }
+break;
+case 73:
+#line 328 "perly.y"
+{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
+break;
+case 74:
+#line 330 "perly.y"
+{ if (yyvsp[-1].ival != OP_REPEAT)
+ scalar(yyvsp[-2].opval);
+ yyval.opval = newBINOP(yyvsp[-1].ival, 0, yyvsp[-2].opval, scalar(yyvsp[0].opval)); }
+break;
+case 75:
+#line 334 "perly.y"
+{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
+break;
+case 76:
+#line 336 "perly.y"
+{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
+break;
+case 77:
+#line 338 "perly.y"
+{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
+break;
+case 78:
+#line 340 "perly.y"
+{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
+break;
+case 79:
+#line 342 "perly.y"
+{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
+break;
+case 80:
+#line 344 "perly.y"
+{ yyval.opval = newBINOP(yyvsp[-1].ival, 0, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval)); }
+break;
+case 81:
+#line 346 "perly.y"
+{ yyval.opval = newRANGE(yyvsp[-1].ival, scalar(yyvsp[-2].opval), scalar(yyvsp[0].opval));}
+break;
+case 82:
+#line 348 "perly.y"
+{ yyval.opval = newLOGOP(OP_AND, 0, yyvsp[-2].opval, yyvsp[0].opval); }
+break;
+case 83:
+#line 350 "perly.y"
+{ yyval.opval = newLOGOP(OP_OR, 0, yyvsp[-2].opval, yyvsp[0].opval); }
+break;
+case 84:
+#line 352 "perly.y"
+{ yyval.opval = newCONDOP(0, yyvsp[-4].opval, yyvsp[-2].opval, yyvsp[0].opval); }
+break;
+case 85:
+#line 354 "perly.y"
+{ yyval.opval = bind_match(yyvsp[-1].ival, yyvsp[-2].opval, yyvsp[0].opval); }
+break;
+case 86:
+#line 357 "perly.y"
+{ yyval.opval = newUNOP(OP_NEGATE, 0, scalar(yyvsp[0].opval)); }
+break;
+case 87:
+#line 359 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+case 88:
+#line 361 "perly.y"
+{ yyval.opval = newUNOP(OP_NOT, 0, scalar(yyvsp[0].opval)); }
+break;
+case 89:
+#line 363 "perly.y"
+{ yyval.opval = newUNOP(OP_COMPLEMENT, 0, scalar(yyvsp[0].opval));}
+break;
+case 90:
+#line 365 "perly.y"
+{ yyval.opval = newUNOP(OP_REFGEN, 0, mod(yyvsp[0].opval,OP_REFGEN)); }
+break;
+case 91:
+#line 367 "perly.y"
+{ yyval.opval = newUNOP(OP_POSTINC, 0,
+ mod(scalar(yyvsp[-1].opval), OP_POSTINC)); }
+break;
+case 92:
+#line 370 "perly.y"
+{ yyval.opval = newUNOP(OP_POSTDEC, 0,
+ mod(scalar(yyvsp[-1].opval), OP_POSTDEC)); }
+break;
+case 93:
+#line 373 "perly.y"
+{ yyval.opval = newUNOP(OP_PREINC, 0,
+ mod(scalar(yyvsp[0].opval), OP_PREINC)); }
+break;
+case 94:
+#line 376 "perly.y"
+{ yyval.opval = newUNOP(OP_PREDEC, 0,
+ mod(scalar(yyvsp[0].opval), OP_PREDEC)); }
+break;
+case 95:
+#line 379 "perly.y"
+{ yyval.opval = localize(yyvsp[0].opval,yyvsp[-1].ival); }
+break;
+case 96:
+#line 381 "perly.y"
+{ yyval.opval = sawparens(yyvsp[-1].opval); }
+break;
+case 97:
+#line 383 "perly.y"
+{ yyval.opval = sawparens(newNULLLIST()); }
+break;
+case 98:
+#line 385 "perly.y"
+{ yyval.opval = newANONLIST(yyvsp[-1].opval); }
+break;
+case 99:
+#line 387 "perly.y"
+{ yyval.opval = newANONLIST(Nullop); }
+break;
+case 100:
+#line 389 "perly.y"
+{ yyval.opval = newANONHASH(yyvsp[-2].opval); }
+break;
+case 101:
+#line 391 "perly.y"
+{ yyval.opval = newANONHASH(Nullop); }
+break;
+case 102:
+#line 393 "perly.y"
+{ yyval.opval = newANONSUB(yyvsp[-2].ival, yyvsp[-1].opval, yyvsp[0].opval); }
+break;
+case 103:
+#line 395 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+case 104:
+#line 397 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+case 105:
+#line 399 "perly.y"
+{ yyval.opval = newBINOP(OP_AELEM, 0, oopsAV(yyvsp[-3].opval), scalar(yyvsp[-1].opval)); }
+break;
+case 106:
+#line 401 "perly.y"
+{ yyval.opval = newBINOP(OP_AELEM, 0,
+ ref(newAVREF(yyvsp[-4].opval),OP_RV2AV),
+ scalar(yyvsp[-1].opval));}
+break;
+case 107:
+#line 405 "perly.y"
+{ assertref(yyvsp[-3].opval); yyval.opval = newBINOP(OP_AELEM, 0,
+ ref(newAVREF(yyvsp[-3].opval),OP_RV2AV),
+ scalar(yyvsp[-1].opval));}
+break;
+case 108:
+#line 409 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+case 109:
+#line 411 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+case 110:
+#line 413 "perly.y"
+{ yyval.opval = newUNOP(OP_AV2ARYLEN, 0, ref(yyvsp[0].opval, OP_AV2ARYLEN));}
+break;
+case 111:
+#line 415 "perly.y"
+{ yyval.opval = newBINOP(OP_HELEM, 0, oopsHV(yyvsp[-4].opval), jmaybe(yyvsp[-2].opval));
+ expect = XOPERATOR; }
+break;
+case 112:
+#line 418 "perly.y"
+{ yyval.opval = newBINOP(OP_HELEM, 0,
+ ref(newHVREF(yyvsp[-5].opval),OP_RV2HV),
+ jmaybe(yyvsp[-2].opval));
+ expect = XOPERATOR; }
+break;
+case 113:
+#line 423 "perly.y"
+{ assertref(yyvsp[-4].opval); yyval.opval = newBINOP(OP_HELEM, 0,
+ ref(newHVREF(yyvsp[-4].opval),OP_RV2HV),
+ jmaybe(yyvsp[-2].opval));
+ expect = XOPERATOR; }
+break;
+case 114:
+#line 428 "perly.y"
+{ yyval.opval = newSLICEOP(0, yyvsp[-1].opval, yyvsp[-4].opval); }
+break;
+case 115:
+#line 430 "perly.y"
+{ yyval.opval = newSLICEOP(0, yyvsp[-1].opval, Nullop); }
+break;
+case 116:
+#line 432 "perly.y"
+{ yyval.opval = prepend_elem(OP_ASLICE,
+ newOP(OP_PUSHMARK, 0),
+ newLISTOP(OP_ASLICE, 0,
+ list(yyvsp[-1].opval),
+ ref(yyvsp[-3].opval, OP_ASLICE))); }
+break;
+case 117:
+#line 438 "perly.y"
+{ yyval.opval = prepend_elem(OP_HSLICE,
+ newOP(OP_PUSHMARK, 0),
+ newLISTOP(OP_HSLICE, 0,
+ list(yyvsp[-2].opval),
+ ref(oopsHV(yyvsp[-4].opval), OP_HSLICE)));
+ expect = XOPERATOR; }
+break;
+case 118:
+#line 445 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+case 119:
+#line 447 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, 0,
+ scalar(yyvsp[0].opval)); }
+break;
+case 120:
+#line 450 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar(yyvsp[-2].opval)); }
+break;
+case 121:
+#line 452 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST, yyvsp[-1].opval, scalar(yyvsp[-3].opval))); }
+break;
+case 122:
+#line 455 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST,
+ yyvsp[0].opval, newCVREF(scalar(yyvsp[-1].opval)))); }
+break;
+case 123:
+#line 459 "perly.y"
+{ yyval.opval = newUNOP(OP_DOFILE, 0, scalar(yyvsp[0].opval)); }
+break;
+case 124:
+#line 461 "perly.y"
+{ yyval.opval = newUNOP(OP_NULL, OPf_SPECIAL, scope(yyvsp[0].opval)); }
+break;
+case 125:
+#line 463 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
+ prepend_elem(OP_LIST,
+ scalar(newCVREF(scalar(yyvsp[-2].opval))), Nullop)); dep();}
+break;
+case 126:
+#line 467 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
+ append_elem(OP_LIST,
+ yyvsp[-1].opval,
+ scalar(newCVREF(scalar(yyvsp[-3].opval))))); dep();}
+break;
+case 127:
+#line 472 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
+ prepend_elem(OP_LIST,
+ scalar(newCVREF(scalar(yyvsp[-2].opval))), Nullop)); dep();}
+break;
+case 128:
+#line 476 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
+ prepend_elem(OP_LIST,
+ yyvsp[-1].opval,
+ scalar(newCVREF(scalar(yyvsp[-3].opval))))); dep();}
+break;
+case 129:
+#line 481 "perly.y"
+{ yyval.opval = newOP(yyvsp[0].ival, OPf_SPECIAL);
+ hints |= HINT_BLOCK_SCOPE; }
+break;
+case 130:
+#line 484 "perly.y"
+{ yyval.opval = newLOOPEX(yyvsp[-1].ival,yyvsp[0].opval); }
+break;
+case 131:
+#line 486 "perly.y"
+{ yyval.opval = newOP(yyvsp[0].ival, 0); }
+break;
+case 132:
+#line 488 "perly.y"
+{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); }
+break;
+case 133:
+#line 490 "perly.y"
+{ yyval.opval = newUNOP(yyvsp[-1].ival, 0, yyvsp[0].opval); }
+break;
+case 134:
+#line 492 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST, yyvsp[0].opval, scalar(yyvsp[-1].ival))); }
+break;
+case 135:
+#line 495 "perly.y"
+{ yyval.opval = newOP(yyvsp[0].ival, 0); }
+break;
+case 136:
+#line 497 "perly.y"
+{ yyval.opval = newOP(yyvsp[-2].ival, 0); }
+break;
+case 137:
+#line 499 "perly.y"
+{ yyval.opval = newUNOP(OP_ENTERSUB, 0,
+ scalar(yyvsp[0].ival)); }
+break;
+case 138:
+#line 502 "perly.y"
+{ yyval.opval = newOP(yyvsp[-2].ival, OPf_SPECIAL); }
+break;
+case 139:
+#line 504 "perly.y"
+{ yyval.opval = newUNOP(yyvsp[-3].ival, 0, yyvsp[-1].opval); }
+break;
+case 140:
+#line 506 "perly.y"
+{ yyval.opval = pmruntime(yyvsp[-3].opval, yyvsp[-1].opval, Nullop); }
+break;
+case 141:
+#line 508 "perly.y"
+{ yyval.opval = pmruntime(yyvsp[-5].opval, yyvsp[-3].opval, yyvsp[-1].opval); }
+break;
+case 144:
+#line 514 "perly.y"
+{ yyval.opval = Nullop; }
+break;
+case 145:
+#line 516 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+case 146:
+#line 520 "perly.y"
+{ yyval.opval = Nullop; }
+break;
+case 147:
+#line 522 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+case 148:
+#line 524 "perly.y"
+{ yyval.opval = yyvsp[-1].opval; }
+break;
+case 149:
+#line 528 "perly.y"
+{ yyval.opval = newCVREF(yyvsp[0].opval); }
+break;
+case 150:
+#line 532 "perly.y"
+{ yyval.opval = newSVREF(yyvsp[0].opval); }
+break;
+case 151:
+#line 536 "perly.y"
+{ yyval.opval = newAVREF(yyvsp[0].opval); }
+break;
+case 152:
+#line 540 "perly.y"
+{ yyval.opval = newHVREF(yyvsp[0].opval); }
+break;
+case 153:
+#line 544 "perly.y"
+{ yyval.opval = newAVREF(yyvsp[0].opval); }
+break;
+case 154:
+#line 548 "perly.y"
+{ yyval.opval = newGVREF(0,yyvsp[0].opval); }
+break;
+case 155:
+#line 552 "perly.y"
+{ yyval.opval = scalar(yyvsp[0].opval); }
+break;
+case 156:
+#line 554 "perly.y"
+{ yyval.opval = scalar(yyvsp[0].opval); }
+break;
+case 157:
+#line 556 "perly.y"
+{ yyval.opval = scope(yyvsp[0].opval); }
+break;
+case 158:
+#line 559 "perly.y"
+{ yyval.opval = yyvsp[0].opval; }
+break;
+#line 2139 "y.tab.c"
+ }
+ yyssp -= yym;
+ yystate = *yyssp;
+ yyvsp -= yym;
+ yym = yylhs[yyn];
+ if (yystate == 0 && yym == 0)
+ {
+#if YYDEBUG
+ if (yydebug)
+ fprintf(stderr,
+ "yydebug: after reduction, shifting from state 0 to state %d\n",
+ YYFINAL);
+#endif
+ yystate = YYFINAL;
+ *++yyssp = YYFINAL;
+ *++yyvsp = yyval;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ fprintf(stderr, "yydebug: state %d, reading %d (%s)\n",
+ YYFINAL, yychar, yys);
+ }
+#endif
+ }
+ if (yychar == 0) goto yyaccept;
+ goto yyloop;
+ }
+ if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
+ yystate = yytable[yyn];
+ else
+ yystate = yydgoto[yym];
+#if YYDEBUG
+ if (yydebug)
+ fprintf(stderr,
+ "yydebug: after reduction, shifting from state %d to state %d\n",
+ *yyssp, yystate);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /*
+ ** reallocate and recover. Note that pointers
+ ** have to be reset, or bad things will happen
+ */
+ int yyps_index = (yyssp - yyss);
+ int yypv_index = (yyvsp - yyvs);
+ yystacksize += YYSTACKSIZE;
+ ysave->yyvs = yyvs =
+ (YYSTYPE*)realloc((char*)yyvs,yystacksize * sizeof(YYSTYPE));
+ ysave->yyss = yyss =
+ (short*)realloc((char*)yyss,yystacksize * sizeof(short));
+ if (!yyvs || !yyss)
+ goto yyoverflow;
+ yyssp = yyss + yyps_index;
+ yyvsp = yyvs + yypv_index;
+ }
+ *++yyssp = yystate;
+ *++yyvsp = yyval;
+ goto yyloop;
+yyoverflow:
+ yyerror("Out of memory for yacc stack");
+yyabort:
+ retval = 1;
+yyaccept:
+ return retval;
+}
diff --git a/vms/perly_h.vms b/vms/perly_h.vms
new file mode 100644
index 0000000000..17a3769ef4
--- /dev/null
+++ b/vms/perly_h.vms
@@ -0,0 +1,68 @@
+#define WORD 257
+#define METHOD 258
+#define FUNCMETH 259
+#define THING 260
+#define PMFUNC 261
+#define PRIVATEREF 262
+#define LABEL 263
+#define FORMAT 264
+#define SUB 265
+#define ANONSUB 266
+#define PACKAGE 267
+#define USE 268
+#define WHILE 269
+#define UNTIL 270
+#define IF 271
+#define UNLESS 272
+#define ELSE 273
+#define ELSIF 274
+#define CONTINUE 275
+#define FOR 276
+#define LOOPEX 277
+#define DOTDOT 278
+#define FUNC0 279
+#define FUNC1 280
+#define FUNC 281
+#define FUNC0SUB 282
+#define RELOP 283
+#define EQOP 284
+#define MULOP 285
+#define ADDOP 286
+#define DOLSHARP 287
+#define DO 288
+#define LOCAL 289
+#define HASHBRACK 290
+#define NOAMP 291
+#define OROP 292
+#define ANDOP 293
+#define NOTOP 294
+#define LSTOP 295
+#define LSTOPSUB 296
+#define ASSIGNOP 297
+#define OROR 298
+#define ANDAND 299
+#define BITOROP 300
+#define BITANDOP 301
+#define UNIOP 302
+#define UNIOPSUB 303
+#define SHIFTOP 304
+#define MATCHOP 305
+#define UMINUS 306
+#define REFGEN 307
+#define POWOP 308
+#define PREINC 309
+#define PREDEC 310
+#define POSTINC 311
+#define POSTDEC 312
+#define ARROW 313
+typedef union {
+ I32 ival;
+ char *pval;
+ OP *opval;
+ GV *gvval;
+} YYSTYPE;
+#ifndef vax11c
+ extern YYSTYPE yylval;
+#else
+ globalref YYSTYPE yylval;
+#endif
diff --git a/vms/sockadapt.c b/vms/sockadapt.c
index 9867d536a1..69f5def785 100644
--- a/vms/sockadapt.c
+++ b/vms/sockadapt.c
@@ -1,7 +1,7 @@
/* sockadapt.c
*
* Author: Charles Bailey bailey@genetics.upenn.edu
- * Last Revised: 08-Feb-1995
+ * Last Revised: 17-Mar-1995
*
* This file should contain stubs for any of the TCP/IP functions perl5
* requires which are not supported by your TCP/IP stack. These stubs
@@ -11,22 +11,24 @@
* This version is set up for perl5 with socketshr 0.9D TCP/IP support.
*/
-#include "sockadapt.h"
+#include "EXTERN.h"
+#include "perl.h"
-#ifdef __STDC__
-#define STRINGIFY(a) #a /* config-skip */
-#else
-#define STRINGIFY(a) "a" /* config-skip */
-#endif
-
-#define FATALSTUB(func) \
- void func() {\
- croak("Function %s not implemented in this version of perl",\
- STRINGIFY(func));\
- }
-
-FATALSTUB(endnetent);
-FATALSTUB(getnetbyaddr);
-FATALSTUB(getnetbyname);
-FATALSTUB(getnetent);
-FATALSTUB(setnetent);
+void endnetent() {
+ croak("Function \"endnetent\" not implemented in this version of perl");
+}
+struct netent *getnetbyaddr( long net, int type) {
+ croak("Function \"getnetbyaddr\" not implemented in this version of perl");
+ return (struct netent *)NULL; /* Avoid MISSINGRETURN warning, not reached */
+}
+struct netent *getnetbyname( char *name) {
+ croak("Function \"getnetbyname\" not implemented in this version of perl");
+ return (struct netent *)NULL; /* Avoid MISSINGRETURN warning, not reached */
+}
+struct netent *getnetent() {
+ croak("Function \"getnetent\" not implemented in this version of perl");
+ return (struct netent *)NULL; /* Avoid MISSINGRETURN warning, not reached */
+}
+void setnetent() {
+ croak("Function \"setnetent\" not implemented in this version of perl");
+}
diff --git a/vms/sockadapt.h b/vms/sockadapt.h
index 0d56285750..18f4002f12 100644
--- a/vms/sockadapt.h
+++ b/vms/sockadapt.h
@@ -2,7 +2,7 @@
*
* Authors: Charles Bailey bailey@genetics.upenn.edu
* David Denholm denholm@conmat.phys.soton.ac.uk
- * Last Revised: 24-Feb-1995
+ * Last Revised: 17-Mar-1995
*
* This file should include any other header files and procide any
* declarations, typedefs, and prototypes needed by perl for TCP/IP
@@ -11,7 +11,18 @@
* This version is set up for perl5 with socketshr 0.9D TCP/IP support.
*/
-#include <socketshr.h>
+/* SocketShr doesn't support these routines, but the DECC RTL contains
+ * stubs with these names, designed to be used with the UCX socket
+ * library. We avoid linker collisions by substituting new names.
+ */
+#define getnetbyaddr no_getnetbyaddr
+#define getnetbyname no_getnetbyname
+#define getnetent no_getnetent
+#define setnetent no_setnetent
+#define endnetent no_endnetent
+
+
+#ifdef __GNU_CC__
/* we may not have netdb.h etc, so lets just do this here - div */
/* no harm doing this for all .c files - needed only by pp_sys.c */
@@ -50,6 +61,16 @@ struct sockaddr {
char sa_data[14]; /* up to 14 bytes of direct address */
};
+/*
+ * Socket address, internet style.
+ */
+struct sockaddr_in {
+ short sin_family;
+ unsigned short sin_port;
+ struct in_addr sin_addr;
+ char sin_zero[8];
+};
+
struct timeval {
long tv_sec;
long tv_usec;
@@ -61,3 +82,61 @@ struct netent {
int n_addrtype;
long n_net;
};
+
+/* Since socketshr.h won't declare function prototypes unless it thinks
+ * the system headers have already been included, we convince it that
+ * this is the case.
+ */
+
+#ifndef AF_INET
+# define AF_INET 2
+#endif
+#ifndef IPPROTO_TCP
+# define IPPROTO_TCP 6
+#endif
+#ifndef __INET_LOADED
+# define __INET_LOADED
+#endif
+#ifndef __NETDB_LOADED
+# define __NETDB_LOADED
+#endif
+
+/* Finally, we provide prototypes for routines not supported by SocketShr,
+ * so that the stubs in sockadapt.c won't cause complaints about
+ * undeclared routines.
+ */
+
+struct netent *getnetbyaddr( long net, int type);
+struct netent *getnetbyname( char *name);
+struct netent *getnetent();
+void setnetent();
+void endnetent();
+
+#else /* !__GNU_CC__ */
+
+/* DECC and VAXC have socket headers in the system set; they're for UCX, but
+ * we'll assume that the actual calling sequence is identical across the
+ * various TCP/IP stacks; these routines are pretty standard.
+ */
+#include <socket.h>
+#include <in.h>
+#include <inet.h>
+#include <netdb.h>
+/* However, we don't have these two in the system headers. */
+void setnetent();
+void endnetent();
+
+#endif
+
+#include <socketshr.h>
+/* socketshr.h from SocketShr 0.9D doesn't alias fileno; it's comments say
+ * that the CRTL version works OK. This isn't the case, at least with
+ * VAXC, so we use the SocketShr version.
+ * N.B. This means that sockadapt.h must be included *after* stdio.h.
+ * This is presently the case for Perl.
+ */
+#ifdef fileno
+# undef fileno
+#endif
+#define fileno si_fileno
+int si_fileno(FILE *);
diff --git a/vms/test.com b/vms/test.com
index a23245057f..43034a5cc9 100644
--- a/vms/test.com
+++ b/vms/test.com
@@ -5,13 +5,7 @@ $! Charles Bailey bailey@genetics.upenn.edu
$
$! A little basic setup
$ On Error Then Goto wrapup
-$ olddef = F$Environment("Default")
-$ If F$TrnLNm("Perl_Root").nes.""
-$ Then
-$ Set Default Perl_Root:[t]
-$ Else
-$ Set Default [.t]
-$ EndIf
+$ Set Default [.t]
$
$! Pick up a copy of perl to use for the tests
$ Delete/Log/NoConfirm Perl.;*
@@ -185,5 +179,5 @@ print sprintf("u=%g s=%g cu=%g cs=%g files=%d tests=%d\n",
$$END-OF-TEST$$
$ wrapup:
$ If F$Search("Echo.Exe").nes."" Then Delete/Log/NoConfirm Echo.Exe;*
-$ Set Default &olddef
+$ Set Default [-]
$ Exit
diff --git a/vms/vms.c b/vms/vms.c
index fd4ec3a760..fef054ae4c 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -2,7 +2,8 @@
*
* VMS-specific routines for perl5
*
- * Last revised: 09-Mar-1995 by Charles Bailey bailey@genetics.upenn.edu
+ * Last revised: 5-Jun-1995 by Charles Bailey bailey@genetics.upenn.edu
+ * Version: 5.1.5
*/
#include <acedef.h>
@@ -279,8 +280,21 @@ int my_utime(char *file, struct utimbuf *utimes)
char vmsspec[NAM$C_MAXRSS+1], rsa[NAM$C_MAXRSS], esa[NAM$C_MAXRSS];
struct FAB myfab = cc$rms_fab;
struct NAM mynam = cc$rms_nam;
+#if defined (__DECC) && defined (__VAX)
+ /* VAX DEC C atrdef.h has unsigned type for pointer member atr$l_addr,
+ * at least through VMS V6.1, which causes a type-conversion warning.
+ */
+# pragma message save
+# pragma message disable cvtdiftypes
+#endif
struct atrdef myatr[2] = {{sizeof bintime, ATR$C_REVDATE, bintime}, {0,0,0}};
struct fibdef myfib;
+#if defined (__DECC) && defined (__VAX)
+ /* This should be right after the declaration of myatr, but due
+ * to a bug in VAX DEC C, this takes effect a statement early.
+ */
+# pragma message restore
+#endif
struct dsc$descriptor fibdsc = {sizeof(myfib), DSC$K_DTYPE_Z, DSC$K_CLASS_S,(char *) &myfib},
devdsc = {0,DSC$K_DTYPE_T, DSC$K_CLASS_S,0},
fnmdsc = {0,DSC$K_DTYPE_T, DSC$K_CLASS_S,0};
@@ -686,12 +700,22 @@ static char *do_fileify_dirspec(char *dir,char *buf,int ts)
dirlen -= 1; /* to last element */
lastdir = strrchr(dir,'/');
}
- else if (strstr(trndir,"..") != NULL) {
- /* If we have a relative path, let do_tovmsspec figure it out,
- * rather than repeating the code here */
- if (do_tovmsspec(trndir,vmsdir,0) == NULL) return NULL;
- if (do_fileify_dirspec(vmsdir,trndir,0) == NULL) return NULL;
- return do_tounixspec(trndir,buf,ts);
+ else if ((cp1 = strstr(trndir,"/.")) != NULL) {
+ do {
+ if (*(cp1+2) == '.') cp1++;
+ if (*(cp1+2) == '/' || *(cp1+2) == '\0') {
+ addmfd = 1;
+ break;
+ }
+ cp1++;
+ } while ((cp1 = strstr(cp1,"/.")) != NULL);
+ /* If we have a relative path, VMSify it and let the VMS code
+ * below expand it, rather than repeating the code here */
+ if (addmfd) {
+ if (do_tovmsspec(trndir,vmsdir,0) == NULL) return NULL;
+ if (do_fileify_dirspec(vmsdir,trndir,0) == NULL) return NULL;
+ return do_tounixspec(trndir,buf,ts);
+ }
}
else {
if (!(lastdir = cp1 = strrchr(dir,'/'))) cp1 = dir;
@@ -726,7 +750,7 @@ static char *do_fileify_dirspec(char *dir,char *buf,int ts)
}
}
}
- retlen = dirlen + addmfd ? 13 : 6;
+ retlen = dirlen + (addmfd ? 13 : 6);
if (buf) retspec = buf;
else if (ts) New(7009,retspec,retlen+6,char);
else retspec = __fileify_retbuf;
@@ -827,22 +851,30 @@ static char *do_fileify_dirspec(char *dir,char *buf,int ts)
}
retlen = dirnam.nam$b_esl - 9; /* esa - '][' - '].DIR;1' */
if (buf) retspec = buf;
- else if (ts) New(7012,retspec,retlen+7,char);
+ else if (ts) New(7012,retspec,retlen+14,char);
else retspec = __fileify_retbuf;
cp1 = strstr(esa,"][");
dirlen = cp1 - esa;
memcpy(retspec,esa,dirlen);
if (!strncmp(cp1+2,"000000]",7)) {
retspec[dirlen-1] = '\0';
- for (cp1 = retspec+dirlen-1; *cp1 != '.'; cp1--) ;
- *cp1 = ']';
+ for (cp1 = retspec+dirlen-1; *cp1 != '.' && *cp1 != '['; cp1--) ;
+ if (*cp1 == '.') *cp1 = ']';
+ else {
+ memmove(cp1+8,cp1+1,retspec+dirlen-cp1);
+ memcpy(cp1+1,"000000]",7);
+ }
}
else {
memcpy(retspec+dirlen,cp1+2,retlen-dirlen);
retspec[retlen] = '\0';
/* Convert last '.' to ']' */
- for (cp1 = retspec+retlen-1; *cp1 != '.'; cp1--) ;
- *cp1 = ']';
+ for (cp1 = retspec+retlen-1; *cp1 != '.' && *cp1 != '['; cp1--) ;
+ if (*cp1 == '.') *cp1 = ']';
+ else {
+ memmove(cp1+8,cp1+1,retspec+dirlen-cp1);
+ memcpy(cp1+1,"000000]",7);
+ }
}
}
else { /* This is a top-level dir. Add the MFD to the path. */
@@ -1146,13 +1178,18 @@ static char *do_tovmsspec(char *path, char *buf, int ts) {
infront = 0;
}
else if (!infront && *cp2 == '.') {
- if (*(cp2+1) == '/') cp2++; /* skip over "./" - it's redundant */
+ if (*(cp2+1) == '/') cp2++; /* skip over "./" - it's redundant */
+ else if (*(cp2+1) == '\0') { cp2++; break; }
else if (*(cp2+1) == '.' && (*(cp2+2) == '/' || *(cp2+2) == '\0')) {
if (*(cp1-1) == '-' || *(cp1-1) == '[') *(cp1++) = '-'; /* handle "../" */
else if (*(cp1-2) == '[') *(cp1-1) = '-';
else { /* back up over previous directory name */
cp1--;
while (*(cp1-1) != '.' && *(cp1-1) != '[') cp1--;
+ if (*(cp1-1) == '[') {
+ memcpy(cp1,"000000.",7);
+ cp1 += 7;
+ }
}
cp2 += 2;
if (cp2 == dirend) {
@@ -1922,11 +1959,29 @@ readdir(DIR *dd)
res.dsc$w_length = sizeof buff - 2;
res.dsc$b_dtype = DSC$K_DTYPE_T;
res.dsc$b_class = DSC$K_CLASS_S;
- dd->count++;
tmpsts = lib$find_file(&dd->pat, &res, &dd->context);
- if ( tmpsts == RMS$_NMF || tmpsts == RMS$_FNF ||
- dd->context == 0) return NULL; /* None left. */
-
+ if ( tmpsts == RMS$_NMF || dd->context == 0) return NULL; /* None left. */
+ if (!(tmpsts & 1)) {
+ set_vaxc_errno(tmpsts);
+ switch (tmpsts) {
+ case RMS$_PRV:
+ set_errno(EACCES);
+ break;
+ case RMS$_DEV:
+ set_errno(ENODEV);
+ break;
+ case RMS$_DIR:
+ set_errno(ENOTDIR);
+ break;
+ case RMS$_FNF:
+ set_errno(ENOENT);
+ break;
+ default:
+ set_errno(EVMSERR);
+ }
+ return NULL;
+ }
+ dd->count++;
/* Force the buffer to end with a NUL, and downcase name to match C convention. */
buff[sizeof buff - 1] = '\0';
for (p = buff; !isspace(*p); p++) *p = _tolower(*p);
@@ -2027,19 +2082,37 @@ my_vfork()
}
/*}}}*/
+
+static struct dsc$descriptor_s VMScmd = {0,DSC$K_DTYPE_T,DSC$K_CLASS_S,Nullch};
+
static void
-setup_argstr(SV *really, SV **mark, SV **sp, char **argstr)
+vms_execfree() {
+ if (Cmd) {
+ safefree(Cmd);
+ Cmd = Nullch;
+ }
+ if (VMScmd.dsc$a_pointer) {
+ Safefree(VMScmd.dsc$a_pointer);
+ VMScmd.dsc$w_length = 0;
+ VMScmd.dsc$a_pointer = Nullch;
+ }
+}
+
+static char *
+setup_argstr(SV *really, SV **mark, SV **sp)
{
- char *tmps, *junk;
+ char *junk, *tmps = Nullch;
register size_t cmdlen = 0;
size_t rlen;
register SV **idx;
idx = mark;
- tmps = SvPV(really,rlen);
- if (really && *tmps) {
- cmdlen += rlen + 1;
- idx++;
+ if (really) {
+ tmps = SvPV(really,rlen);
+ if (*tmps) {
+ cmdlen += rlen + 1;
+ idx++;
+ }
}
for (idx++; idx <= sp; idx++) {
@@ -2048,24 +2121,26 @@ setup_argstr(SV *really, SV **mark, SV **sp, char **argstr)
cmdlen += rlen ? rlen + 1 : 0;
}
}
- New(401,*argstr,cmdlen, char);
+ New(401,Cmd,cmdlen,char);
- if (*tmps) {
- strcpy(*argstr,tmps);
+ if (tmps && *tmps) {
+ strcpy(Cmd,tmps);
mark++;
}
- else **argstr = '\0';
+ else *Cmd = '\0';
while (++mark <= sp) {
if (*mark) {
- strcat(*argstr," ");
- strcat(*argstr,SvPVx(*mark,na));
+ strcat(Cmd," ");
+ strcat(Cmd,SvPVx(*mark,na));
}
}
+ return Cmd;
} /* end of setup_argstr() */
+
static unsigned long int
-setup_cmddsc(char *cmd, struct dsc$descriptor_s *cmddsc, int check_img)
+setup_cmddsc(char *cmd, int check_img)
{
char resspec[NAM$C_MAXRSS+1];
$DESCRIPTOR(defdsc,".EXE");
@@ -2090,8 +2165,9 @@ setup_cmddsc(char *cmd, struct dsc$descriptor_s *cmddsc, int check_img)
}
else isdcl = 1;
if (isdcl) { /* It's a DCL command, just do it. */
- cmddsc->dsc$a_pointer = cmd;
- cmddsc->dsc$w_length = strlen(cmd);
+ VMScmd.dsc$a_pointer = cmd;
+ VMScmd.dsc$w_length = strlen(cmd);
+ if (cmd == Cmd) Cmd = Nullch; /* clear Cmd so vms_execfree isok */
}
else { /* assume first token is an image spec */
cmd = s;
@@ -2100,19 +2176,23 @@ setup_cmddsc(char *cmd, struct dsc$descriptor_s *cmddsc, int check_img)
imgdsc.dsc$a_pointer = cmd;
imgdsc.dsc$w_length = s - cmd;
retsts = lib$find_file(&imgdsc,&resdsc,&cxt,&defdsc,0,0,&flags);
- if ((retsts & STS$M_CODE) == (SHR$_NOWILD & STS$M_CODE)) return retsts;
+ if (!(retsts & 1)) {
+ /* just hand off status values likely to be due to user error */
+ if (retsts == RMS$_FNF || retsts == RMS$_DNF ||
+ retsts == RMS$_DEV || retsts == RMS$_DIR || retsts == RMS$_SYN ||
+ (retsts & STS$M_CODE) == (SHR$_NOWILD & STS$M_CODE)) return retsts;
+ else { _ckvmssts(retsts); }
+ }
else {
- _ckvmssts(retsts);
_ckvmssts(lib$find_file_end(&cxt));
s = resspec;
while (*s && !isspace(*s)) s++;
*s = '\0';
- New(402,Cmd,6 + s - resspec + (rest ? strlen(rest) : 0),char);
- strcpy(Cmd,"$ MCR ");
- strcat(Cmd,resspec);
- if (rest) strcat(Cmd,rest);
- cmddsc->dsc$a_pointer = Cmd;
- cmddsc->dsc$w_length = strlen(Cmd);
+ New(402,VMScmd.dsc$a_pointer,6 + s - resspec + (rest ? strlen(rest) : 0),char);
+ strcpy(VMScmd.dsc$a_pointer,"$ MCR ");
+ strcat(VMScmd.dsc$a_pointer,resspec);
+ if (rest) strcat(VMScmd.dsc$a_pointer,rest);
+ VMScmd.dsc$w_length = strlen(VMScmd.dsc$a_pointer);
}
}
@@ -2123,7 +2203,6 @@ setup_cmddsc(char *cmd, struct dsc$descriptor_s *cmddsc, int check_img)
bool
vms_do_aexec(SV *really,SV **mark,SV **sp)
{
-
if (sp > mark) {
if (vfork_called) { /* this follows a vfork - act Unixish */
vfork_called--;
@@ -2133,10 +2212,9 @@ vms_do_aexec(SV *really,SV **mark,SV **sp)
}
else return do_aexec(really,mark,sp);
}
+ /* no vfork - act VMSish */
+ return vms_do_exec(setup_argstr(really,mark,sp));
- /* no vfork - act VMSish */
- setup_argstr(really,mark,sp,Argv);
- return vms_do_exec(*Argv);
}
return FALSE;
@@ -2158,17 +2236,16 @@ vms_do_exec(char *cmd)
}
{ /* no vfork - act VMSish */
- struct dsc$descriptor_s cmddsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
unsigned long int retsts;
- if ((retsts = setup_cmddsc(cmd,&cmddsc,1)) & 1)
- retsts = lib$do_command(&cmddsc);
+ if ((retsts = setup_cmddsc(cmd,1)) & 1)
+ retsts = lib$do_command(&VMScmd);
set_errno(EVMSERR);
set_vaxc_errno(retsts);
if (dowarn)
- warn("Can't exec \"%s\": %s", cmddsc.dsc$a_pointer, Strerror(errno));
- do_execfree();
+ warn("Can't exec \"%s\": %s", VMScmd.dsc$a_pointer, Strerror(errno));
+ vms_execfree();
}
return FALSE;
@@ -2182,11 +2259,7 @@ unsigned long int do_spawn(char *);
unsigned long int
do_aspawn(SV *really,SV **mark,SV **sp)
{
-
- if (sp > mark) {
- setup_argstr(really,mark,sp,Argv);
- return do_spawn(*Argv);
- }
+ if (sp > mark) return do_spawn(setup_argstr(really,mark,sp));
return SS$_ABORT;
} /* end of do_aspawn() */
@@ -2196,14 +2269,14 @@ do_aspawn(SV *really,SV **mark,SV **sp)
unsigned long int
do_spawn(char *cmd)
{
- struct dsc$descriptor_s cmddsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
- unsigned long int substs;
+ unsigned long int substs, hadcmd = 1;
if (!cmd || !*cmd) {
- _ckvmssts(lib$spawn(0,0,0,0,0,&substs,0,0,0,0,0));
+ hadcmd = 0;
+ _ckvmssts(lib$spawn(0,0,0,0,0,0,&substs,0,0,0,0,0,0));
}
- else if ((substs = setup_cmddsc(cmd,&cmddsc,0)) & 1) {
- _ckvmssts(lib$spawn(&cmddsc,0,0,0,0,&substs,0,0,0,0,0));
+ else if ((substs = setup_cmddsc(cmd,0)) & 1) {
+ _ckvmssts(lib$spawn(&VMScmd,0,0,0,0,0,&substs,0,0,0,0,0,0));
}
if (!(substs&1)) {
@@ -2211,8 +2284,9 @@ do_spawn(char *cmd)
set_vaxc_errno(substs);
if (dowarn)
warn("Can't exec \"%s\": %s",
- (cmd && *cmd) ? cmddsc.dsc$a_pointer : "", Strerror(errno));
+ hadcmd ? VMScmd.dsc$a_pointer : "", Strerror(errno));
}
+ vms_execfree();
return substs;
} /* end of do_spawn() */
@@ -2292,8 +2366,8 @@ my_fwrite(void *src, size_t itmsz, size_t nitm, FILE *dest)
(uic).uic$v_member != UIC$K_WILD_MEMBER && \
(uic).uic$v_group != UIC$K_WILD_GROUP)
-static const char __empty[]= "";
-static const struct passwd __passwd_empty=
+static char __empty[]= "";
+static struct passwd __passwd_empty=
{(char *) __empty, (char *) __empty, 0, 0,
(char *) __empty, (char *) __empty, (char *) __empty, (char *) __empty};
static int contxt= 0;
@@ -2334,7 +2408,7 @@ static int fillpasswd (const char *name, struct passwd *pwd)
struct dsc$descriptor_s name_desc;
int status;
- static const struct itmlst_3 itmlst[]= {
+ static struct itmlst_3 itmlst[]= {
{UAI$S_OWNER+1, UAI$_OWNER, &owner, &lowner},
{sizeof(uic), UAI$_UIC, &uic, &luic},
{UAI$S_DEFDEV+1, UAI$_DEFDEV, &defdev, &ldefdev},
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;
diff --git a/vms/vmsish.h b/vms/vmsish.h
index ce6829060e..5e2bfbb13b 100644
--- a/vms/vmsish.h
+++ b/vms/vmsish.h
@@ -13,6 +13,15 @@
#include <rmsdef.h> /* at which errno and vaxc$errno are */
#include <ssdef.h> /* explicitly set in the perl source code */
+/* Suppress compiler warnings from DECC for VMS-specific extensions:
+ * GLOBALEXT, NOSHAREEXT: global[dr]ef declarations
+ * ADDRCONSTEXT: initialization of data with non-constant values
+ * (e.g. pointer fields of descriptors)
+ */
+#ifdef __DECC
+# pragma message disable (GLOBALEXT,NOSHAREEXT,ADDRCONSTEXT)
+#endif
+
/* DEC's C compilers and gcc use incompatible definitions of _to(upp|low)er() */
#ifdef _toupper
# undef _toupper
@@ -22,6 +31,14 @@
# undef _tolower
#endif
#define _tolower(c) (((c) < 'A' || (c) > 'Z') ? (c) : (c) | 040)
+/* DECC 1.3 has a funny definition of abs; it's fixed in DECC 4.0, so this
+ * can go away once DECC 1.3 isn't in use any more. */
+#if defined(__ALPHA) && defined(__DECC)
+#undef abs
+#define abs(__x) __ABS(__x)
+#undef labs
+#define labs(__x) __LABS(__x)
+#endif /* __ALPHA && __DECC */
/* Assorted things to look like Unix */
#ifdef __GNUC__