diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1998-12-01 11:08:16 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1998-12-01 11:08:16 +0000 |
commit | 0fbecbbf53e77b8d40c396f3fae3f94dd3efd35d (patch) | |
tree | afc655e6b661d80a249fda0bbb8c2850231870d9 /vms | |
parent | c7404c214c8382be08fc3c8ba7390a940642c871 (diff) | |
parent | db4a4bfef3d0670c19c876489f6c14478d1740b8 (diff) | |
download | perl-0fbecbbf53e77b8d40c396f3fae3f94dd3efd35d.tar.gz |
Integrate from _54 mainperl modulo the NetBSD ifdef in util.c.
p4raw-id: //depot/cfgperl@2428
Diffstat (limited to 'vms')
-rw-r--r-- | vms/ext/Stdio/Stdio.xs | 9 | ||||
-rw-r--r-- | vms/perly_c.vms | 24 | ||||
-rw-r--r-- | vms/vms.c | 34 |
3 files changed, 40 insertions, 27 deletions
diff --git a/vms/ext/Stdio/Stdio.xs b/vms/ext/Stdio/Stdio.xs index 6fa1b29bbe..53b491575d 100644 --- a/vms/ext/Stdio/Stdio.xs +++ b/vms/ext/Stdio/Stdio.xs @@ -164,11 +164,12 @@ setdef(...) struct FAB deffab = cc$rms_fab; struct NAM defnam = cc$rms_nam; struct dsc$descriptor_s dirdsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0}; + STRLEN n_a; if (items) { SV *defsv = ST(items-1); /* mimic chdir() */ ST(0) = &PL_sv_undef; if (!SvPOK(defsv)) { SETERRNO(EINVAL,LIB$_INVARG); XSRETURN(1); } - if (tovmsspec(SvPV(defsv,PL_na),vmsdef) == NULL) { XSRETURN(1); } + if (tovmsspec(SvPV(defsv,n_a),vmsdef) == NULL) { XSRETURN(1); } deffab.fab$l_fna = vmsdef; deffab.fab$b_fns = strlen(vmsdef); } else { @@ -232,6 +233,7 @@ vmsopen(spec,...) char *args[8],mode[3] = {'r','\0','\0'}, type = '<'; register int i, myargc; FILE *fp; + STRLEN n_a; if (!spec || !*spec) { SETERRNO(EINVAL,LIB$_INVARG); @@ -250,7 +252,7 @@ vmsopen(spec,...) } else if (*spec == '<') spec++; myargc = items - 1; - for (i = 0; i < myargc; i++) args[i] = SvPV(ST(i+1),PL_na); + for (i = 0; i < myargc; i++) args[i] = SvPV(ST(i+1),n_a); /* This hack brought to you by C's opaque arglist management */ switch (myargc) { case 0: @@ -298,13 +300,14 @@ vmssysopen(spec,mode,perm,...) int i, myargc, fd; FILE *fp; SV *fh; + STRLEN n_a; if (!spec || !*spec) { SETERRNO(EINVAL,LIB$_INVARG); XSRETURN_UNDEF; } if (items > 11) croak("too many args"); myargc = items - 3; - for (i = 0; i < myargc; i++) args[i] = SvPV(ST(i+3),PL_na); + for (i = 0; i < myargc; i++) args[i] = SvPV(ST(i+3),n_a); /* More fun with C calls; can't combine with above because args 2,3 of different types in fopen() and open() */ switch (myargc) { diff --git a/vms/perly_c.vms b/vms/perly_c.vms index db1f255c56..3a4ef8b3cb 100644 --- a/vms/perly_c.vms +++ b/vms/perly_c.vms @@ -31,7 +31,7 @@ dep(void) #line 30 "perly.y" #define YYERRCODE 256 -dEXT short yylhs[] = { -1, +static short yylhs[] = { -1, 45, 0, 9, 7, 10, 8, 11, 11, 11, 12, 12, 12, 12, 24, 24, 24, 24, 24, 24, 24, 15, 15, 15, 14, 14, 42, 42, 13, 13, 13, @@ -51,7 +51,7 @@ dEXT short yylhs[] = { -1, 34, 34, 34, 2, 2, 43, 23, 18, 19, 20, 21, 22, 35, 35, 35, 35, }; -dEXT short yylen[] = { 2, +static short yylen[] = { 2, 0, 2, 4, 0, 4, 0, 0, 2, 2, 2, 1, 2, 3, 1, 1, 3, 3, 3, 3, 3, 0, 2, 6, 7, 7, 0, 2, 8, 8, 10, @@ -71,7 +71,7 @@ dEXT short yylen[] = { 2, 0, 1, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, }; -dEXT short yydefred[] = { 1, +static short yydefred[] = { 1, 0, 7, 0, 45, 56, 54, 0, 54, 8, 46, 9, 11, 0, 47, 48, 49, 0, 0, 0, 63, 64, 14, 4, 157, 0, 0, 130, 0, 152, 0, @@ -110,14 +110,14 @@ dEXT short yydefred[] = { 1, 22, 0, 0, 0, 31, 5, 0, 30, 0, 0, 33, 0, 23, }; -dEXT short yydgoto[] = { 1, +static short yydgoto[] = { 1, 9, 66, 10, 18, 95, 17, 86, 339, 89, 328, 3, 11, 12, 68, 344, 263, 70, 71, 72, 73, 74, 75, 76, 269, 78, 270, 259, 261, 264, 272, 260, 262, 113, 198, 91, 79, 238, 81, 83, 179, 250, 142, 267, 13, 2, 14, 15, 16, 85, 256, }; -dEXT short yysindex[] = { 0, +static short yysindex[] = { 0, 0, 0, -66, 0, 0, 0, -48, 0, 0, 0, 0, 0, 645, 0, 0, 0, -232, -227, -27, 0, 0, 0, 0, 0, -23, -23, 0, -6, 0, 2099, @@ -156,7 +156,7 @@ dEXT short yysindex[] = { 0, 0, 2099, -206, 256, 0, 0, 259, 0, 92, 92, 0, -238, 0, }; -dEXT short yyrindex[] = { 0, +static short yyrindex[] = { 0, 0, 0, 249, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -195,7 +195,7 @@ dEXT short yyrindex[] = { 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0, 154, 0, }; -dEXT short yygindex[] = { 0, +static short yygindex[] = { 0, 0, 0, 0, 374, 351, 0, -12, 0, 946, 413, -83, 0, 0, 0, -311, -13, 4007, 2893, 0, 0, 0, 0, 0, 372, -8, 0, 0, 246, -131, 43, @@ -203,7 +203,7 @@ dEXT short yygindex[] = { 0, 0, -271, 0, 0, 0, 0, 0, 0, 0, 0, }; #define YYTABLESIZE 4293 -dEXT short yytable[] = { 69, +static short yytable[] = { 69, 207, 62, 181, 104, 168, 102, 104, 204, 168, 248, 20, 208, 62, 253, 58, 285, 274, 170, 298, 345, 104, 104, 172, 202, 80, 104, 311, 148, 149, 82, @@ -635,7 +635,7 @@ dEXT short yytable[] = { 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 317, }; -dEXT short yycheck[] = { 13, +static short yycheck[] = { 13, 41, 36, 86, 41, 91, 40, 44, 59, 91, 59, 59, 93, 36, 183, 59, 59, 41, 91, 41, 331, 58, 59, 91, 40, 257, 63, 41, 297, 298, 257, @@ -1073,7 +1073,7 @@ dEXT short yycheck[] = { 13, #endif #define YYMAXTOKEN 314 #if YYDEBUG -dEXT char * yyname[] = { +static 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, @@ -1090,7 +1090,7 @@ dEXT char * yyname[] = { "SHIFTOP","MATCHOP","UMINUS","REFGEN","POWOP","PREINC","PREDEC","POSTINC", "POSTDEC","ARROW", }; -dEXT char * yyrule[] = { +static char *yyrule[] = { "$accept : prog", "$$1 :", "prog : $$1 lineseq", @@ -1775,7 +1775,7 @@ case 56: break; case 57: #line 302 "perly.y" -{ char *name = SvPV(((SVOP*)yyvsp[0].opval)->op_sv, PL_na); +{ STRLEN n_a; char *name = SvPV(((SVOP*)yyvsp[0].opval)->op_sv, n_a); if (strEQ(name, "BEGIN") || strEQ(name, "END") || strEQ(name, "INIT")) CvUNIQUE_on(PL_compcv); @@ -2848,6 +2848,7 @@ setup_argstr(SV *really, SV **mark, SV **sp) register size_t cmdlen = 0; size_t rlen; register SV **idx; + STRLEN n_a; idx = mark; if (really) { @@ -2874,7 +2875,7 @@ setup_argstr(SV *really, SV **mark, SV **sp) while (++mark <= sp) { if (*mark) { strcat(PL_Cmd," "); - strcat(PL_Cmd,SvPVx(*mark,PL_na)); + strcat(PL_Cmd,SvPVx(*mark,n_a)); } } return PL_Cmd; @@ -4407,12 +4408,13 @@ rmsexpand_fromperl(CV *cv) { dXSARGS; char *fspec, *defspec = NULL, *rslt; + STRLEN n_a; if (!items || items > 2) croak("Usage: VMS::Filespec::rmsexpand(spec[,defspec])"); - fspec = SvPV(ST(0),PL_na); + fspec = SvPV(ST(0),n_a); if (!fspec || !*fspec) XSRETURN_UNDEF; - if (items == 2) defspec = SvPV(ST(1),PL_na); + if (items == 2) defspec = SvPV(ST(1),n_a); rslt = do_rmsexpand(fspec,NULL,1,defspec,0); ST(0) = sv_newmortal(); @@ -4425,9 +4427,10 @@ vmsify_fromperl(CV *cv) { dXSARGS; char *vmsified; + STRLEN n_a; if (items != 1) croak("Usage: VMS::Filespec::vmsify(spec)"); - vmsified = do_tovmsspec(SvPV(ST(0),PL_na),NULL,1); + vmsified = do_tovmsspec(SvPV(ST(0),n_a),NULL,1); ST(0) = sv_newmortal(); if (vmsified != NULL) sv_usepvn(ST(0),vmsified,strlen(vmsified)); XSRETURN(1); @@ -4438,9 +4441,10 @@ unixify_fromperl(CV *cv) { dXSARGS; char *unixified; + STRLEN n_a; if (items != 1) croak("Usage: VMS::Filespec::unixify(spec)"); - unixified = do_tounixspec(SvPV(ST(0),PL_na),NULL,1); + unixified = do_tounixspec(SvPV(ST(0),n_a),NULL,1); ST(0) = sv_newmortal(); if (unixified != NULL) sv_usepvn(ST(0),unixified,strlen(unixified)); XSRETURN(1); @@ -4451,9 +4455,10 @@ fileify_fromperl(CV *cv) { dXSARGS; char *fileified; + STRLEN n_a; if (items != 1) croak("Usage: VMS::Filespec::fileify(spec)"); - fileified = do_fileify_dirspec(SvPV(ST(0),PL_na),NULL,1); + fileified = do_fileify_dirspec(SvPV(ST(0),n_a),NULL,1); ST(0) = sv_newmortal(); if (fileified != NULL) sv_usepvn(ST(0),fileified,strlen(fileified)); XSRETURN(1); @@ -4464,9 +4469,10 @@ pathify_fromperl(CV *cv) { dXSARGS; char *pathified; + STRLEN n_a; if (items != 1) croak("Usage: VMS::Filespec::pathify(spec)"); - pathified = do_pathify_dirspec(SvPV(ST(0),PL_na),NULL,1); + pathified = do_pathify_dirspec(SvPV(ST(0),n_a),NULL,1); ST(0) = sv_newmortal(); if (pathified != NULL) sv_usepvn(ST(0),pathified,strlen(pathified)); XSRETURN(1); @@ -4477,9 +4483,10 @@ vmspath_fromperl(CV *cv) { dXSARGS; char *vmspath; + STRLEN n_a; if (items != 1) croak("Usage: VMS::Filespec::vmspath(spec)"); - vmspath = do_tovmspath(SvPV(ST(0),PL_na),NULL,1); + vmspath = do_tovmspath(SvPV(ST(0),n_a),NULL,1); ST(0) = sv_newmortal(); if (vmspath != NULL) sv_usepvn(ST(0),vmspath,strlen(vmspath)); XSRETURN(1); @@ -4490,9 +4497,10 @@ unixpath_fromperl(CV *cv) { dXSARGS; char *unixpath; + STRLEN n_a; if (items != 1) croak("Usage: VMS::Filespec::unixpath(spec)"); - unixpath = do_tounixpath(SvPV(ST(0),PL_na),NULL,1); + unixpath = do_tounixpath(SvPV(ST(0),n_a),NULL,1); ST(0) = sv_newmortal(); if (unixpath != NULL) sv_usepvn(ST(0),unixpath,strlen(unixpath)); XSRETURN(1); @@ -4505,6 +4513,7 @@ candelete_fromperl(CV *cv) char fspec[NAM$C_MAXRSS+1], *fsp; SV *mysv; IO *io; + STRLEN n_a; if (items != 1) croak("Usage: VMS::Filespec::candelete(spec)"); @@ -4518,7 +4527,7 @@ candelete_fromperl(CV *cv) fsp = fspec; } else { - if (mysv != ST(0) || !(fsp = SvPV(mysv,PL_na)) || !*fsp) { + if (mysv != ST(0) || !(fsp = SvPV(mysv,n_a)) || !*fsp) { set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG); ST(0) = &PL_sv_no; XSRETURN(1); @@ -4540,6 +4549,7 @@ rmscopy_fromperl(CV *cv) unsigned long int sts; SV *mysv; IO *io; + STRLEN n_a; if (items < 2 || items > 3) croak("Usage: File::Copy::rmscopy(from,to[,date_flag])"); @@ -4554,7 +4564,7 @@ rmscopy_fromperl(CV *cv) inp = inspec; } else { - if (mysv != ST(0) || !(inp = SvPV(mysv,PL_na)) || !*inp) { + if (mysv != ST(0) || !(inp = SvPV(mysv,n_a)) || !*inp) { set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG); ST(0) = &PL_sv_no; XSRETURN(1); @@ -4570,7 +4580,7 @@ rmscopy_fromperl(CV *cv) outp = outspec; } else { - if (mysv != ST(1) || !(outp = SvPV(mysv,PL_na)) || !*outp) { + if (mysv != ST(1) || !(outp = SvPV(mysv,n_a)) || !*outp) { set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG); ST(0) = &PL_sv_no; XSRETURN(1); |