summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2007-12-23 00:39:17 +0000
committerSteve Peters <steve@fisharerojo.org>2007-12-23 00:39:17 +0000
commit4e205ed637fa853d115099170e6e11407ca49619 (patch)
tree25ca3fcb48f529227c43cd5a88703764ce2c1039 /win32/win32.c
parentdfe169eecccf8121d08f5b1eedd95ae222cf7b9e (diff)
downloadperl-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 'win32/win32.c')
-rw-r--r--win32/win32.c52
1 files changed, 26 insertions, 26 deletions
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();