diff options
author | Steve Peters <steve@fisharerojo.org> | 2007-12-23 00:39:17 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2007-12-23 00:39:17 +0000 |
commit | 4e205ed637fa853d115099170e6e11407ca49619 (patch) | |
tree | 25ca3fcb48f529227c43cd5a88703764ce2c1039 /vms | |
parent | dfe169eecccf8121d08f5b1eedd95ae222cf7b9e (diff) | |
download | perl-4e205ed637fa853d115099170e6e11407ca49619.tar.gz |
Nullch and others were still alive and well in some of the operating
system specific directories. I think I've chainsawed all of them now,
but I can't guarantee that it compiles anywhere from win32.
p4raw-id: //depot/perl@32713
Diffstat (limited to 'vms')
-rw-r--r-- | vms/ext/Stdio/Stdio.xs | 20 | ||||
-rw-r--r-- | vms/vms.c | 30 |
2 files changed, 25 insertions, 25 deletions
diff --git a/vms/ext/Stdio/Stdio.xs b/vms/ext/Stdio/Stdio.xs index bb475e7746..e92b0fd416 100644 --- a/vms/ext/Stdio/Stdio.xs +++ b/vms/ext/Stdio/Stdio.xs @@ -93,10 +93,10 @@ newFH(PerlIO *fp, char type) { * equivalent to gv_fetchpv("VMS::Stdio::__FH__",TRUE,SVt_PVIO), * with a little less overhead, and good exercise for me. :-) */ stashp = (GV **)hv_fetch(PL_defstash,"VMS::",5,TRUE); - if (!stashp || *stashp == (GV *)&PL_sv_undef) return Nullsv; + if (!stashp || *stashp == (GV *)&PL_sv_undef) return NULL; if (!(stash = GvHV(*stashp))) stash = GvHV(*stashp) = newHV(); stashp = (GV **)hv_fetch(GvHV(*stashp),"Stdio::",7,TRUE); - if (!stashp || *stashp == (GV *)&PL_sv_undef) return Nullsv; + if (!stashp || *stashp == (GV *)&PL_sv_undef) return NULL; if (!(stash = GvHV(*stashp))) stash = GvHV(*stashp) = newHV(); /* Set up GV to point to IO, and then take reference */ @@ -131,14 +131,14 @@ binmode(fh) SV *name; IO *io; char iotype; - char filespec[NAM$C_MAXRSS], *acmode, *s, *colon, *dirend = Nullch; + char filespec[NAM$C_MAXRSS], *acmode, *s, *colon, *dirend = NULL; 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) { + if (fp == NULL || strchr(">was+-|",iotype) == NULL) { set_errno(EBADF); set_vaxc_errno(SS$_IVCHAN); XSRETURN_UNDEF; } if (!PerlIO_getname(fp,filespec)) XSRETURN_UNDEF; @@ -152,7 +152,7 @@ binmode(fh) } /* If we've got a non-file-structured device, clip off the trailing * junk, and don't lose sleep if we can't get a stream position. */ - if (dirend == Nullch) *(colon+1) = '\0'; + if (dirend == NULL) *(colon+1) = '\0'; if (iotype != '-' && (ret = PerlIO_getpos(fp, &pos)) == -1 && dirend) XSRETURN_UNDEF; switch (iotype) { @@ -174,7 +174,7 @@ binmode(fh) } /* appearances to the contrary, this is an freopen substitute */ name = sv_2mortal(newSVpvn(filespec,strlen(filespec))); - if (PerlIO_openn(aTHX_ Nullch,acmode,-1,0,0,fp,1,&name) == Nullfp) XSRETURN_UNDEF; + if (PerlIO_openn(aTHX_ NULL,acmode,-1,0,0,fp,1,&name) == NULL) XSRETURN_UNDEF; if (iotype != '-' && ret != -1 && PerlIO_setpos(fp,&pos) == -1) XSRETURN_UNDEF; if (ret == -1) { set_errno(saverrno); set_vaxc_errno(savevmserrno); } XSRETURN_YES; @@ -349,7 +349,7 @@ vmsopen(spec,...) fp = fopen(spec,mode,args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]); break; } - if (fp != Null(FILE*)) { + if (!fp) { pio_fp = PerlIO_fdopen(fileno(fp),mode); fh = newFH(pio_fp,(mode[1] ? '+' : (mode[0] == 'r' ? '<' : (mode[0] == 'a' ? 'a' : '>')))); ST(0) = (fh ? sv_2mortal(fh) : &PL_sv_undef); @@ -408,7 +408,7 @@ vmssysopen(spec,mode,perm,...) } i = mode & 3; if (fd >= 0 && - ((pio_fp = PerlIO_fdopen(fd, &("r\000w\000r+"[2*i]))) != Null(PerlIO*))) { + ((pio_fp = PerlIO_fdopen(fd, &("r\000w\000r+"[2*i]))) != NULL)) { fh = newFH(pio_fp,"<>++"[i]); ST(0) = (fh ? sv_2mortal(fh) : &PL_sv_undef); } @@ -433,10 +433,10 @@ writeof(mysv) struct dsc$descriptor devdsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, devnam}; IO *io = sv_2io(mysv); PerlIO *fp = io ? IoOFP(io) : NULL; - if (fp == NULL || strchr(">was+-|",IoTYPE(io)) == Nullch) { + if (fp == NULL || strchr(">was+-|",IoTYPE(io)) == NULL) { set_errno(EBADF); set_vaxc_errno(SS$_IVCHAN); XSRETURN_UNDEF; } - if (PerlIO_getname(fp,devnam) == Nullch) { ST(0) = &PL_sv_undef; XSRETURN(1); } + if (PerlIO_getname(fp,devnam) == NULL) { ST(0) = &PL_sv_undef; XSRETURN(1); } if ((cp = strrchr(devnam,':')) != NULL) *(cp+1) = '\0'; devdsc.dsc$w_length = strlen(devnam); retsts = sys$assign(&devdsc,&chan,0,0); @@ -1178,7 +1178,7 @@ Perl_my_getenv(pTHX_ const char *lnm, bool sys) * for an optional name, and this "error" often shows up as the * (bogus) exit status for a die() call later on. */ if (sys && vaxc$errno == SS$_NOLOGNAM) SETERRNO(saverr,savvmserr); - return success ? eqv : Nullch; + return success ? eqv : NULL; } } /* end of my_getenv() */ @@ -1284,7 +1284,7 @@ Perl_my_getenv_len(pTHX_ const char *lnm, unsigned long *len, bool sys) * for an optional name, and this "error" often shows up as the * (bogus) exit status for a die() call later on. */ if (sys && vaxc$errno == SS$_NOLOGNAM) SETERRNO(saverr,savvmserr); - return *len ? buf : Nullch; + return *len ? buf : NULL; } } /* end of my_getenv_len() */ @@ -1304,7 +1304,7 @@ prime_env_iter(void) static int primed = 0; HV *seenhv = NULL, *envhv; SV *sv = NULL; - char cmd[LNM$C_NAMLENGTH+24], mbxnam[LNM$C_NAMLENGTH], *buf = Nullch; + char cmd[LNM$C_NAMLENGTH+24], mbxnam[LNM$C_NAMLENGTH], *buf = NULL; unsigned short int chan; #ifndef CLI$M_TRUSTED # define CLI$M_TRUSTED 0x40 /* Missing from VAXC headers */ @@ -3599,7 +3599,7 @@ store_pipelocs(pTHX) temp[1] = '\0'; } - if ((tounixpath_utf8(temp, unixdir, NULL)) != Nullch) { + if ((tounixpath_utf8(temp, unixdir, NULL)) != NULL) { p = (pPLOC) PerlMem_malloc(sizeof(PLOC)); if (p == NULL) _ckvmssts(SS$_INSFMEM); p->next = head_PLOC; @@ -3622,7 +3622,7 @@ store_pipelocs(pTHX) if (SvROK(dirsv)) continue; dir = SvPVx(dirsv,n_a); if (strcmp(dir,".") == 0) continue; - if ((tounixpath_utf8(dir, unixdir, NULL)) == Nullch) + if ((tounixpath_utf8(dir, unixdir, NULL)) == NULL) continue; p = (pPLOC) PerlMem_malloc(sizeof(PLOC)); @@ -3635,7 +3635,7 @@ store_pipelocs(pTHX) /* most likely spot (ARCHLIB) put first in the list */ #ifdef ARCHLIB_EXP - if ((tounixpath_utf8(ARCHLIB_EXP, unixdir, NULL)) != Nullch) { + if ((tounixpath_utf8(ARCHLIB_EXP, unixdir, NULL)) != NULL) { p = (pPLOC) PerlMem_malloc(sizeof(PLOC)); if (p == NULL) _ckvmssts(SS$_INSFMEM); p->next = head_PLOC; @@ -4013,7 +4013,7 @@ static PerlIO * create_forked_xterm(pTHX_ const char *cmd, const char *mode) info->in = 0; info->out = 0; info->err = 0; - info->fp = Nullfp; + info->fp = NULL; info->useFILE = 0; info->waiting = 0; info->in_done = TRUE; @@ -4098,7 +4098,7 @@ safe_popen(pTHX_ const char *cmd, const char *in_mode, int *psts) PerlIO * xterm_fd; xterm_fd = create_forked_xterm(aTHX_ cmd, in_mode); - if (xterm_fd != Nullfp) + if (xterm_fd != NULL) return xterm_fd; } @@ -4142,7 +4142,7 @@ safe_popen(pTHX_ const char *cmd, const char *in_mode, int *psts) if (ckWARN(WARN_PIPE)) { Perl_warner(aTHX_ packWARN(WARN_PIPE),"unable to find VMSPIPE.COM for i/o piping"); } - return Nullfp; + return NULL; } fgetname(tpipe,tfilebuf+1,1); } @@ -4174,7 +4174,7 @@ safe_popen(pTHX_ const char *cmd, const char *in_mode, int *psts) Perl_warner(aTHX_ packWARN(WARN_PIPE),"Can't pipe \"%*s\": %s", strlen(cmd), cmd, Strerror(errno)); } *psts = sts; - return Nullfp; + return NULL; } n = sizeof(Info); _ckvmssts(lib$get_vm(&n, &info)); @@ -4187,7 +4187,7 @@ safe_popen(pTHX_ const char *cmd, const char *in_mode, int *psts) info->in = 0; info->out = 0; info->err = 0; - info->fp = Nullfp; + info->fp = NULL; info->useFILE = 0; info->waiting = 0; info->in_done = TRUE; @@ -4250,7 +4250,7 @@ safe_popen(pTHX_ const char *cmd, const char *in_mode, int *psts) n = sizeof(Info); _ckvmssts(lib$free_vm(&n, &info)); *psts = RMS$_FNF; - return Nullfp; + return NULL; } info->err = pipe_mbxtofd_setup(aTHX_ fileno(stderr), err); @@ -4314,7 +4314,7 @@ safe_popen(pTHX_ const char *cmd, const char *in_mode, int *psts) n = sizeof(Info); _ckvmssts(lib$free_vm(&n, &info)); *psts = RMS$_FNF; - return Nullfp; + return NULL; } @@ -8903,7 +8903,7 @@ pipe_and_fork(pTHX_ char **cmargv) *p = '\0'; fp = safe_popen(aTHX_ subcmd,"wbF",&sts); - if (fp == Nullfp) { + if (fp == NULL) { PerlIO_printf(Perl_debug_log,"Can't open output pipe (status %d)",sts); } } @@ -9788,7 +9788,7 @@ vms_execfree(struct dsc$descriptor_s *vmscmd) static char * setup_argstr(pTHX_ SV *really, SV **mark, SV **sp) { - char *junk, *tmps = Nullch; + char *junk, *tmps = NULL; register size_t cmdlen = 0; size_t rlen; register SV **idx; |