[.t.lib]vmsish.t : [.vms.ext]vmsish.t
Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
+[.t.lib]vms_dclsym.t : [.vms.ext.DCLsym]test.pl
+ Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
+
+[.t.lib]vms_stdio.t : [.vms.ext.Stdio]test.pl
+ Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
+
check : test
@ Continue
-test : all [.t.lib]vmsfspec.t [.t.lib]vmsish.t
+test : all [.t.lib]vmsfspec.t [.t.lib]vmsish.t [.t.lib]vms_dclsym.t [.t.lib]vms_stdio.t
- @[.VMS]Test.Com "$(E)" "$(__DEBUG__)"
@ $(MINIPERL) -e "print ""Ran tests"";" > [.t]rantests.
- If F$Search("[...]*$(E)").nes."" Then Delete/NoConfirm/Log [...]*$(E);*
- If F$Search("[.vms]Perl_Setup.Com").nes."" Then Delete/NoConfirm/Log [.vms]Perl_Setup.Com;*
- If F$Search("[.t]rantests.").nes."" Then Delete/NoConfirm/Log [.t]rantests.;*
+ - If F$Search("[.t.lib]vmsfspec.t").nes."" Then Delete/NoConfirm/Log [.t.lib]vmsfspec.t;*
+ - If F$Search("[.t.lib]vmsish.t").nes."" Then Delete/NoConfirm/Log [.t.lib]vmsish.t;*
+ - If F$Search("[.t.lib]vms_dclsym.t").nes."" Then Delete/NoConfirm/Log [.t.lib]vms_dclsym.t;*
+ - If F$Search("[.t.lib]vms_stdio.t").nes."" Then Delete/NoConfirm/Log [.t.lib]vms_stdio.t;*
cleansrc : clean
!GROK!THIS!
SV * fh
PROTOTYPE: $
CODE:
- IO *io = sv_2io(fh);
- PerlIO *fp = io ? IoOFP(io) : NULL;
- char iotype = io ? IoTYPE(io) : '\0';
- char filespec[NAM$C_MAXRSS], *acmode, *s, *colon, *dirend = Nullch;
- int ret = 0, saverrno = errno, savevmserrno = vaxc$errno;
+ SV *name;
+ IO *io;
+ char iotype;
+ char filespec[NAM$C_MAXRSS], *acmode, *s, *colon, *dirend = Nullch;
+ int ret = 0, saverrno = errno, savevmserrno = vaxc$errno;
SV pos;
+ PerlIO *fp;
+ io = sv_2io(fh);
+ fp = io ? IoOFP(io) : NULL;
+ iotype = io ? IoTYPE(io) : '\0';
if (fp == NULL || strchr(">was+-|",iotype) == Nullch) {
set_errno(EBADF); set_vaxc_errno(SS$_IVCHAN); XSRETURN_UNDEF;
}
acmode = "rb+";
}
/* appearances to the contrary, this is an freopen substitute */
- SV *name = sv_2mortal(newSVpvn(filespec,strlen(filespec)));
+ name = sv_2mortal(newSVpvn(filespec,strlen(filespec)));
if (PerlIO_openn(Nullch,acmode,-1,0,0,fp,1,&name) == Nullfp) XSRETURN_UNDEF;
if (iotype != '-' && ret != -1 && PerlIO_setpos(fp,&pos) == -1) XSRETURN_UNDEF;
if (ret == -1) { set_errno(saverrno); set_vaxc_errno(savevmserrno); }
char *args[8],mode[3] = {'r','\0','\0'}, type = '<';
register int i, myargc;
FILE *fp;
+ SV *fh;
PerlIO *pio_fp;
STRLEN n_a;
}
if (fp != Null(FILE*)) {
pio_fp = PerlIO_importFILE(fp,0);
- SV *fh = newFH(pio_fp,(mode[1] ? '+' : (mode[0] == 'r' ? '<' : (mode[0] == 'a' ? 'a' : '>'))));
- ST(0) = (fh ? sv_2mortal(fh) : &PL_sv_undef);
+ fh = newFH(pio_fp,(mode[1] ? '+' : (mode[0] == 'r' ? '<' : (mode[0] == 'a' ? 'a' : '>'))));
+ ST(0) = (fh ? sv_2mortal(fh) : &PL_sv_undef);
}
else { ST(0) = &PL_sv_undef; }
if (fd >= 0 &&
((fp = fdopen(fd, &("r\000w\000r+"[2*i]))) != Null(FILE*))) {
pio_fp = PerlIO_importFILE(fp,0);
- SV *fh = newFH(pio_fp,"<>++"[i]);
- ST(0) = (fh ? sv_2mortal(fh) : &PL_sv_undef);
+ fh = newFH(pio_fp,"<>++"[i]);
+ ST(0) = (fh ? sv_2mortal(fh) : &PL_sv_undef);
}
else { ST(0) = &PL_sv_undef; }