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 | |
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
-rw-r--r-- | NetWare/nw5.c | 6 | ||||
-rw-r--r-- | NetWare/nwperlhost.h | 4 | ||||
-rw-r--r-- | NetWare/nwperlsys.h | 4 | ||||
-rw-r--r-- | NetWare/nwstdio.h | 2 | ||||
-rw-r--r-- | djgpp/djgpp.c | 4 | ||||
-rw-r--r-- | os2/OS2/REXX/REXX.xs | 4 | ||||
-rw-r--r-- | os2/os2.c | 26 | ||||
-rw-r--r-- | util.c | 2 | ||||
-rw-r--r-- | vmesa/vmesa.c | 8 | ||||
-rw-r--r-- | vms/ext/Stdio/Stdio.xs | 20 | ||||
-rw-r--r-- | vms/vms.c | 30 | ||||
-rw-r--r-- | win32/perlhost.h | 4 | ||||
-rw-r--r-- | win32/win32.c | 52 | ||||
-rw-r--r-- | win32/wince.c | 40 |
14 files changed, 103 insertions, 103 deletions
diff --git a/NetWare/nw5.c b/NetWare/nw5.c index aac80317d4..552106af4d 100644 --- a/NetWare/nw5.c +++ b/NetWare/nw5.c @@ -318,7 +318,7 @@ nw_crypt(const char *txt, const char *salt) return des_fcrypt(txt, salt, w32_crypt_buffer); #else Perl_croak(aTHX_ "The crypt() function is not implemented on NetWare\n"); - return Nullch; + return NULL; #endif } @@ -1001,7 +1001,7 @@ do_spawn2(char *cmd, int exectype) if (*s) *s++ = '\0'; } - *a = Nullch; + *a = NULL; if (argv[0]) { switch (exectype) { case EXECF_SPAWN: @@ -1031,7 +1031,7 @@ do_spawn2(char *cmd, int exectype) while (++i < nw_perlshell_items) argv[i] = nw_perlshell_vec[i]; argv[i++] = cmd; - argv[i] = Nullch; + argv[i] = NULL; switch (exectype) { case EXECF_SPAWN: status = nw_spawnvp(P_WAIT, argv[0], (char **)argv); diff --git a/NetWare/nwperlhost.h b/NetWare/nwperlhost.h index ff3fdee158..e257dd94bb 100644 --- a/NetWare/nwperlhost.h +++ b/NetWare/nwperlhost.h @@ -448,7 +448,7 @@ PerlStdIOGetBase(struct IPerlStdIO* piPerl, PerlIO* pf) FILE *f = (FILE*)pf; return FILE_base(f); #else - return Nullch; + return NULL; #endif } @@ -481,7 +481,7 @@ PerlStdIOGetPtr(struct IPerlStdIO* piPerl, PerlIO* pf) FILE *f = (FILE*)pf; return FILE_ptr(f); #else - return Nullch; + return NULL; #endif } diff --git a/NetWare/nwperlsys.h b/NetWare/nwperlsys.h index ed1b632e11..932b06664c 100644 --- a/NetWare/nwperlsys.h +++ b/NetWare/nwperlsys.h @@ -342,7 +342,7 @@ PerlStdIOGetBase(struct IPerlStdIO* piPerl, FILE* pf) FILE *f = pf; return FILE_base(f); #else - return Nullch; + return NULL; #endif } @@ -375,7 +375,7 @@ PerlStdIOGetPtr(struct IPerlStdIO* piPerl, FILE* pf) FILE *f = pf; return FILE_ptr(f); #else - return Nullch; + return NULL; #endif } diff --git a/NetWare/nwstdio.h b/NetWare/nwstdio.h index 1ddadb550b..4aabb0a815 100644 --- a/NetWare/nwstdio.h +++ b/NetWare/nwstdio.h @@ -52,7 +52,7 @@ #ifdef HAS_SETLINEBUF #define PerlIO_setlinebuf(f) (*PL_StdIO->pSetlinebuf)(PL_StdIO, (f)) #else -#define PerlIO_setlinebuf(f) setvbuf(f, Nullch, _IOLBF, 0) +#define PerlIO_setlinebuf(f) setvbuf(f, NULL, _IOLBF, 0) #endif #define PerlIO_isutf8(f) 0 diff --git a/djgpp/djgpp.c b/djgpp/djgpp.c index caa4640363..9370a2901c 100644 --- a/djgpp/djgpp.c +++ b/djgpp/djgpp.c @@ -129,7 +129,7 @@ do_aspawn (pTHX_ SV *really,SV **mark,SV **sp) *a++ = SvPVx(*mark, n_a); else *a++ = ""; - *a = Nullch; + *a = NULL; if (argv[0][0] != '/' && argv[0][0] != '\\' && !(argv[0][0] && argv[0][1] == ':' @@ -204,7 +204,7 @@ doshell: if (*s) *s++='\0'; } - *a=Nullch; + *a=NULL; if (!PL_Argv[0]) return -1; diff --git a/os2/OS2/REXX/REXX.xs b/os2/OS2/REXX/REXX.xs index 2d1fa6ea21..428dfd57f5 100644 --- a/os2/OS2/REXX/REXX.xs +++ b/os2/OS2/REXX/REXX.xs @@ -223,7 +223,7 @@ PERLSTART(PCSZ name, ULONG argc, PRXSTRING argv, PCSZ queue, PRXSTRING ret) static ULONG PERLCALL(PCSZ name, ULONG argc, PRXSTRING argv, PCSZ queue, PRXSTRING ret) { - return PERLCALLcv(name, Nullsv, argc, argv, queue, ret); + return PERLCALLcv(name, NULL, argc, argv, queue, ret); } RexxFunctionHandler* PF = &PERLSTART; @@ -556,7 +556,7 @@ _REXX_eval_with(cmd,...) Newx(names, n, char*); Newx(cvs, n, SV*); /* XXX Unfinished... */ - RETVAL = Nullsv; + RETVAL = NULL; Safefree(names); Safefree(cvs); } @@ -998,7 +998,7 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag) if (flag == P_WAIT) flag = P_NOWAIT; if (really && !*(real_name = SvPV(really, n_a))) - really = Nullsv; + really = NULL; retry: if (strEQ(PL_Argv[0],"/bin/sh")) @@ -1265,7 +1265,7 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag) /* XXXX This is good only until we refuse quoted arguments... */ PL_Argv[0] = inicmd; - PL_Argv[1] = Nullch; + PL_Argv[1] = NULL; } } else if (!buf[0] && inicmd) { /* No file */ /* Start with the original cmdline. */ @@ -1273,7 +1273,7 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag) quoted arguments... */ PL_Argv[0] = inicmd; - PL_Argv[1] = Nullch; + PL_Argv[1] = NULL; nargs = 2; /* shell -c */ } @@ -1458,7 +1458,7 @@ do_spawn3(pTHX_ char *cmd, int execf, int flag) if (*s) *s++ = '\0'; } - *a = Nullch; + *a = NULL; if (PL_Argv[0]) rc = do_spawn_ve(aTHX_ NULL, flag, execf, cmd, mergestderr); else @@ -1500,7 +1500,7 @@ os2_aspawn_4(pTHX_ SV *really, register SV **args, I32 cnt, int execing) else *a++ = ""; } - *a = Nullch; + *a = NULL; if ( flag_set && (a == PL_Argv + 1) && !really && execing == ASPAWN_WAIT ) { /* One arg? */ @@ -1573,7 +1573,7 @@ my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args) taint_proper("Insecure %s%s", "EXEC"); } if (pipe(p) < 0) - return Nullfp; + return NULL; /* Now we need to spawn the child. */ if (p[this] == (*mode == 'r')) { /* if fh 0/1 was initially closed. */ int new = dup(p[this]); @@ -1592,7 +1592,7 @@ my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args) closepipes: close(p[0]); close(p[1]); - return Nullfp; + return NULL; } } else fh_fl = fcntl(*mode == 'r', F_GETFD); @@ -1605,7 +1605,7 @@ my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args) if (newfd != -1) fcntl(newfd, F_SETFD, FD_CLOEXEC); if (cnt) { /* Args: "Real cmd", before first arg, the last, execing */ - pid = os2_aspawn_4(aTHX_ Nullsv, args, cnt, ASPAWN_NOWAIT); + pid = os2_aspawn_4(aTHX_ NULL, args, cnt, ASPAWN_NOWAIT); } else pid = do_spawn_nowait(aTHX_ cmd); if (newfd == -1) @@ -1620,7 +1620,7 @@ my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args) close(p[that]); if (pid == -1) { close(p[this]); - return Nullfp; + return NULL; } if (p[that] < p[this]) { /* Make fh as small as possible */ dup2(p[this], p[that]); @@ -1879,8 +1879,8 @@ XS(XS_OS2_replaceModule) Perl_croak(aTHX_ "Usage: OS2::replaceModule(target [, source [, backup]])"); { char * target = (char *)SvPV_nolen(ST(0)); - char * source = (items < 2) ? Nullch : (char *)SvPV_nolen(ST(1)); - char * backup = (items < 3) ? Nullch : (char *)SvPV_nolen(ST(2)); + char * source = (items < 2) ? NULL : (char *)SvPV_nolen(ST(1)); + char * backup = (items < 3) ? NULL : (char *)SvPV_nolen(ST(2)); if (!replaceModule(target, source, backup)) croak_with_os2error("replaceModule() error"); @@ -2159,7 +2159,7 @@ dllname2buffer(pTHX_ char *buf, STRLEN l) { char *o; STRLEN ll; - SV *dll = Nullsv; + SV *dll = NULL; dll = module_name(mod_name_full); o = SvPV(dll, ll); @@ -4099,7 +4099,7 @@ XS(XS_OS2_pipe) int connect = 0, count, message_r = 0, message = 0, b = 0; ULONG ulInbufLength, ulOutbufLength, ulPipeMode, ulTimeout, rc; STRLEN len; - char *s, buf[10], *s1, *perltype = Nullch; + char *s, buf[10], *s1, *perltype = NULL; PerlIO *perlio; double timeout; @@ -2343,7 +2343,7 @@ Perl_my_popen_list(pTHX_ char *mode, int n, SV **args) return PerlIO_fdopen(p[This], mode); #else # ifdef OS2 /* Same, without fork()ing and all extra overhead... */ - return my_syspopen4(aTHX_ Nullch, mode, n, args); + return my_syspopen4(aTHX_ NULL, mode, n, args); # else Perl_croak(aTHX_ "List form of piped open not implemented"); return (PerlIO *) NULL; diff --git a/vmesa/vmesa.c b/vmesa/vmesa.c index 7e3635f357..59dd19b6c1 100644 --- a/vmesa/vmesa.c +++ b/vmesa/vmesa.c @@ -136,7 +136,7 @@ do_aspawn(SV* really, SV **mark, SV **sp) fdMap[STDOUT_FILENO] = Perl_stdout_fd; fdMap[STDERR_FILENO] = STDERR_FILENO; nFd = 3; - *a = Nullch; + *a = NULL; /*-----------------------------------------------------*/ /* Will execvp() use PATH? */ /*-----------------------------------------------------*/ @@ -272,7 +272,7 @@ do_spawn(char *cmd, int execf) if (*s) *s++ = '\0'; } - *a = Nullch; + *a = NULL; fdMap[STDIN_FILENO] = Perl_stdin_fd; fdMap[STDOUT_FILENO] = Perl_stdout_fd; fdMap[STDERR_FILENO] = STDERR_FILENO; @@ -421,7 +421,7 @@ my_popen(char *cmd, char *mode) close(pFd[that]); } else - fd = Nullfp; + fd = NULL; } else { @@ -434,7 +434,7 @@ my_popen(char *cmd, char *mode) } } else - fd = Nullfp; + fd = NULL; return (fd); } 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; diff --git a/win32/perlhost.h b/win32/perlhost.h index 9974fd8b4b..b9d4e1e4ab 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -623,7 +623,7 @@ PerlStdIOGetBase(struct IPerlStdIO* piPerl, FILE* pf) FILE *f = pf; return FILE_base(f); #else - return Nullch; + return NULL; #endif } @@ -656,7 +656,7 @@ PerlStdIOGetPtr(struct IPerlStdIO* piPerl, FILE* pf) FILE *f = pf; return FILE_ptr(f); #else - return Nullch; + return NULL; #endif } diff --git a/win32/win32.c b/win32/win32.c index 55ab70e667..d459c94c09 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -268,7 +268,7 @@ get_regstr_from(HKEY hkey, const char *valuename, SV **svp) HKEY handle; DWORD type; const char *subkey = "Software\\Perl"; - char *str = Nullch; + char *str = NULL; long retval; retval = RegOpenKeyEx(hkey, subkey, 0, KEY_READ, &handle); @@ -366,7 +366,7 @@ get_emd_part(SV **prev_pathp, char *trailing_path, ...) return SvPVX(*prev_pathp); } - return Nullch; + return NULL; } char * @@ -375,7 +375,7 @@ win32_get_privlib(const char *pl) dTHX; char *stdlib = "lib"; char buffer[MAX_PATH+1]; - SV *sv = Nullsv; + SV *sv = NULL; /* $stdlib = $HKCU{"lib-$]"} || $HKLM{"lib-$]"} || $HKCU{"lib"} || $HKLM{"lib"} || ""; */ sprintf(buffer, "%s-%s", stdlib, pl); @@ -383,7 +383,7 @@ win32_get_privlib(const char *pl) (void)get_regstr(stdlib, &sv); /* $stdlib .= ";$EMD/../../lib" */ - return get_emd_part(&sv, stdlib, ARCHNAME, "bin", Nullch); + return get_emd_part(&sv, stdlib, ARCHNAME, "bin", NULL); } static char * @@ -392,8 +392,8 @@ win32_get_xlib(const char *pl, const char *xlib, const char *libname) dTHX; char regstr[40]; char pathstr[MAX_PATH+1]; - SV *sv1 = Nullsv; - SV *sv2 = Nullsv; + SV *sv1 = NULL; + SV *sv2 = NULL; /* $HKCU{"$xlib-$]"} || $HKLM{"$xlib-$]"} . ---; */ sprintf(regstr, "%s-%s", xlib, pl); @@ -402,7 +402,7 @@ win32_get_xlib(const char *pl, const char *xlib, const char *libname) /* $xlib .= * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/$libname/$]/lib"; */ sprintf(pathstr, "%s/%s/lib", libname, pl); - (void)get_emd_part(&sv1, pathstr, ARCHNAME, "bin", pl, Nullch); + (void)get_emd_part(&sv1, pathstr, ARCHNAME, "bin", pl, NULL); /* $HKCU{$xlib} || $HKLM{$xlib} . ---; */ (void)get_regstr(xlib, &sv2); @@ -410,10 +410,10 @@ win32_get_xlib(const char *pl, const char *xlib, const char *libname) /* $xlib .= * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/$libname/lib"; */ sprintf(pathstr, "%s/lib", libname); - (void)get_emd_part(&sv2, pathstr, ARCHNAME, "bin", pl, Nullch); + (void)get_emd_part(&sv2, pathstr, ARCHNAME, "bin", pl, NULL); if (!sv1 && !sv2) - return Nullch; + return NULL; if (!sv1) return SvPVX(sv2); if (!sv2) @@ -549,7 +549,7 @@ win32_getpid(void) static long tokenize(const char *str, char **dest, char ***destv) { - char *retstart = Nullch; + char *retstart = NULL; char **retvstart = 0; int items = -1; if (str) { @@ -584,7 +584,7 @@ tokenize(const char *str, char **dest, char ***destv) ++items; ret++; } - retvstart[items] = Nullch; + retvstart[items] = NULL; *ret++ = '\0'; *ret = '\0'; } @@ -728,7 +728,7 @@ do_spawn2(pTHX_ const char *cmd, int exectype) if (*s) *s++ = '\0'; } - *a = Nullch; + *a = NULL; if (argv[0]) { switch (exectype) { case EXECF_SPAWN: @@ -757,7 +757,7 @@ do_spawn2(pTHX_ const char *cmd, int exectype) while (++i < w32_perlshell_items) argv[i] = w32_perlshell_vec[i]; argv[i++] = (char *)cmd; - argv[i] = Nullch; + argv[i] = NULL; switch (exectype) { case EXECF_SPAWN: status = win32_spawnvp(P_WAIT, argv[0], @@ -1550,7 +1550,7 @@ win32_longpath(char *path) char *start = path; char sep; if (!path) - return Nullch; + return NULL; /* drive prefix */ if (isALPHA(path[0]) && path[1] == ':') { @@ -1614,14 +1614,14 @@ win32_longpath(char *path) else { FindClose(fhand); errno = ERANGE; - return Nullch; + return NULL; } } else { /* failed a step, just return without side effects */ /*PerlIO_printf(Perl_debug_log, "Failed to find %s\n", path);*/ errno = EINVAL; - return Nullch; + return NULL; } } strcpy(path,tmpbuf); @@ -1698,7 +1698,7 @@ win32_getenv(const char *name) { dTHX; DWORD needlen; - SV *curitem = Nullsv; + SV *curitem = NULL; needlen = GetEnvironmentVariableA(name,NULL,0); if (needlen != 0) { @@ -1719,7 +1719,7 @@ win32_getenv(const char *name) if (curitem && SvCUR(curitem)) return SvPVX(curitem); - return Nullch; + return NULL; } DllExport int @@ -2390,7 +2390,7 @@ win32_crypt(const char *txt, const char *salt) return des_fcrypt(txt, salt, w32_crypt_buffer); #else Perl_croak(aTHX_ "The crypt() function is unimplemented due to excessive paranoia."); - return Nullch; + return NULL; #endif } @@ -3269,7 +3269,7 @@ win32_rename(const char *oname, const char *newname) int retval = 0; char szTmpName[MAX_PATH+1]; char dname[MAX_PATH+1]; - char *endname = Nullch; + char *endname = NULL; STRLEN tmplen = 0; DWORD from_attr, to_attr; @@ -3328,7 +3328,7 @@ win32_rename(const char *oname, const char *newname) retval = rename(szOldName, szNewName); /* if we created a temporary file before ... */ - if (endname != Nullch) { + if (endname != NULL) { /* ...and rename succeeded, delete temporary file/directory */ if (retval == 0) DeleteFile(szTmpName); @@ -3910,7 +3910,7 @@ qualified_path(const char *cmd) int has_slash = 0; if (!cmd) - return Nullch; + return NULL; fullcmd = (char*)cmd; while (*fullcmd) { if (*fullcmd == '/' || *fullcmd == '\\') @@ -3984,7 +3984,7 @@ qualified_path(const char *cmd) } Safefree(fullcmd); - return Nullch; + return NULL; } /* The following are just place holders. @@ -4071,7 +4071,7 @@ win32_spawnvp(int mode, const char *cmdname, const char *const *argv) PROCESS_INFORMATION ProcessInformation; DWORD create = 0; char *cmd; - char *fullcmd = Nullch; + char *fullcmd = NULL; char *cname = (char *)cmdname; STRLEN clen = 0; @@ -4886,7 +4886,7 @@ Perl_sys_intern_init(pTHX) { int i; - w32_perlshell_tokens = Nullch; + w32_perlshell_tokens = NULL; w32_perlshell_vec = (char**)NULL; w32_perlshell_items = 0; w32_fdpid = newAV(); @@ -4956,7 +4956,7 @@ Perl_sys_intern_clear(pTHX) void Perl_sys_intern_dup(pTHX_ struct interp_intern *src, struct interp_intern *dst) { - dst->perlshell_tokens = Nullch; + dst->perlshell_tokens = NULL; dst->perlshell_vec = (char**)NULL; dst->perlshell_items = 0; dst->fdpid = newAV(); diff --git a/win32/wince.c b/win32/wince.c index 2926803bb9..60a6809664 100644 --- a/win32/wince.c +++ b/win32/wince.c @@ -135,7 +135,7 @@ get_regstr_from(HKEY hkey, const char *valuename, SV **svp) HKEY handle; DWORD type; const char *subkey = "Software\\Perl"; - char *str = Nullch; + char *str = NULL; long retval; retval = XCERegOpenKeyExA(hkey, subkey, 0, KEY_READ, &handle); @@ -231,7 +231,7 @@ get_emd_part(SV **prev_pathp, char *trailing_path, ...) return SvPVX(*prev_pathp); } - return Nullch; + return NULL; } char * @@ -240,7 +240,7 @@ win32_get_privlib(const char *pl) dTHX; char *stdlib = "lib"; char buffer[MAX_PATH+1]; - SV *sv = Nullsv; + SV *sv = NULL; /* $stdlib = $HKCU{"lib-$]"} || $HKLM{"lib-$]"} || $HKCU{"lib"} || $HKLM{"lib"} || ""; */ sprintf(buffer, "%s-%s", stdlib, pl); @@ -248,7 +248,7 @@ win32_get_privlib(const char *pl) (void)get_regstr(stdlib, &sv); /* $stdlib .= ";$EMD/../../lib" */ - return get_emd_part(&sv, stdlib, ARCHNAME, "bin", Nullch); + return get_emd_part(&sv, stdlib, ARCHNAME, "bin", NULL); } static char * @@ -259,8 +259,8 @@ win32_get_xlib(const char *pl, const char *xlib, const char *libname) char pathstr[MAX_PATH+1]; DWORD datalen; int len, newsize; - SV *sv1 = Nullsv; - SV *sv2 = Nullsv; + SV *sv1 = NULL; + SV *sv2 = NULL; /* $HKCU{"$xlib-$]"} || $HKLM{"$xlib-$]"} . ---; */ sprintf(regstr, "%s-%s", xlib, pl); @@ -269,7 +269,7 @@ win32_get_xlib(const char *pl, const char *xlib, const char *libname) /* $xlib .= * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/$libname/$]/lib"; */ sprintf(pathstr, "%s/%s/lib", libname, pl); - (void)get_emd_part(&sv1, pathstr, ARCHNAME, "bin", pl, Nullch); + (void)get_emd_part(&sv1, pathstr, ARCHNAME, "bin", pl, NULL); /* $HKCU{$xlib} || $HKLM{$xlib} . ---; */ (void)get_regstr(xlib, &sv2); @@ -277,10 +277,10 @@ win32_get_xlib(const char *pl, const char *xlib, const char *libname) /* $xlib .= * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/$libname/lib"; */ sprintf(pathstr, "%s/lib", libname); - (void)get_emd_part(&sv2, pathstr, ARCHNAME, "bin", pl, Nullch); + (void)get_emd_part(&sv2, pathstr, ARCHNAME, "bin", pl, NULL); if (!sv1 && !sv2) - return Nullch; + return NULL; if (!sv1) return SvPVX(sv2); if (!sv2) @@ -406,7 +406,7 @@ win32_getpid(void) static long tokenize(const char *str, char **dest, char ***destv) { - char *retstart = Nullch; + char *retstart = NULL; char **retvstart = 0; int items = -1; if (str) { @@ -441,7 +441,7 @@ tokenize(const char *str, char **dest, char ***destv) ++items; ret++; } - retvstart[items] = Nullch; + retvstart[items] = NULL; *ret++ = '\0'; *ret = '\0'; } @@ -551,7 +551,7 @@ do_spawn2(pTHX_ char *cmd, int exectype) if (*s) *s++ = '\0'; } - *a = Nullch; + *a = NULL; if (argv[0]) { switch (exectype) { case EXECF_SPAWN: @@ -580,7 +580,7 @@ do_spawn2(pTHX_ char *cmd, int exectype) while (++i < w32_perlshell_items) argv[i] = w32_perlshell_vec[i]; argv[i++] = cmd; - argv[i] = Nullch; + argv[i] = NULL; switch (exectype) { case EXECF_SPAWN: status = win32_spawnvp(P_WAIT, argv[0], @@ -1248,7 +1248,7 @@ win32_crypt(const char *txt, const char *salt) return des_fcrypt(txt, salt, w32_crypt_buffer); #else Perl_croak(aTHX_ "The crypt() function is unimplemented due to excessive paranoia."); - return Nullch; + return NULL; #endif } @@ -1814,7 +1814,7 @@ qualified_path(const char *cmd) int has_slash = 0; if (!cmd) - return Nullch; + return NULL; fullcmd = (char*)cmd; while (*fullcmd) { if (*fullcmd == '/' || *fullcmd == '\\') @@ -1889,7 +1889,7 @@ qualified_path(const char *cmd) } Safefree(fullcmd); - return Nullch; + return NULL; } /* The following are just place holders. @@ -1975,7 +1975,7 @@ win32_spawnvp(int mode, const char *cmdname, const char *const *argv) PROCESS_INFORMATION ProcessInformation; DWORD create = 0; char *cmd; - char *fullcmd = Nullch; + char *fullcmd = NULL; char *cname = (char *)cmdname; STRLEN clen = 0; @@ -2612,7 +2612,7 @@ Perl_init_os_extras(void) char *file = __FILE__; dXSUB_SYS; - w32_perlshell_tokens = Nullch; + w32_perlshell_tokens = NULL; w32_perlshell_items = -1; w32_fdpid = newAV(); /* XX needs to be in Perl_win32_init()? */ Newx(w32_children, 1, child_tab); @@ -2782,7 +2782,7 @@ void Perl_sys_intern_init(pTHX) { int i; - w32_perlshell_tokens = Nullch; + w32_perlshell_tokens = NULL; w32_perlshell_vec = (char**)NULL; w32_perlshell_items = 0; w32_fdpid = newAV(); @@ -2819,7 +2819,7 @@ Perl_sys_intern_clear(pTHX) void Perl_sys_intern_dup(pTHX_ struct interp_intern *src, struct interp_intern *dst) { - dst->perlshell_tokens = Nullch; + dst->perlshell_tokens = NULL; dst->perlshell_vec = (char**)NULL; dst->perlshell_items = 0; dst->fdpid = newAV(); |