summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--XSUB.h2
-rw-r--r--cop.h10
-rw-r--r--doio.c12
-rw-r--r--doop.c2
-rw-r--r--dump.c12
-rw-r--r--gv.c8
-rw-r--r--hv.c2
-rw-r--r--hv.h4
-rw-r--r--locale.c12
-rw-r--r--malloc.c10
-rw-r--r--mathoms.c4
-rw-r--r--mg.c10
-rw-r--r--op.c30
-rw-r--r--op.h4
-rw-r--r--pad.c2
-rw-r--r--perl.c40
-rw-r--r--perl.h2
-rw-r--r--perlio.c20
-rw-r--r--perlsdio.h2
-rw-r--r--pod/perlapi.pod16
-rw-r--r--pp_sort.c2
-rw-r--r--pp_sys.c32
-rw-r--r--regcomp.h2
-rw-r--r--regexec.c16
-rw-r--r--sv.c68
-rw-r--r--sv.h2
-rw-r--r--thrdvar.h2
-rw-r--r--toke.c46
-rw-r--r--util.c76
29 files changed, 225 insertions, 225 deletions
diff --git a/XSUB.h b/XSUB.h
index b3e586c8ae..b7df5e29fd 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -279,7 +279,7 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
# define XS_VERSION_BOOTCHECK \
STMT_START { \
SV *_sv; \
- const char *vn = Nullch, *module = SvPV_nolen_const(ST(0)); \
+ const char *vn = NULL, *module = SvPV_nolen_const(ST(0)); \
if (items >= 2) /* version supplied as bootstrap arg */ \
_sv = ST(1); \
else { \
diff --git a/cop.h b/cop.h
index 77b3c239f2..7deceb6040 100644
--- a/cop.h
+++ b/cop.h
@@ -176,21 +176,21 @@ struct cop {
# define CopSTASHPV(c) ((c)->cop_stashpv)
# ifdef NETWARE
-# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
+# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : NULL))
# else
# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = savesharedpv(pv))
# endif
# define CopSTASH(c) (CopSTASHPV(c) \
? gv_stashpv(CopSTASHPV(c),GV_ADD) : NULL)
-# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME_get(hv) : Nullch)
+# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME_get(hv) : NULL)
# define CopSTASH_eq(c,hv) ((hv) && stashpv_hvname_match(c,hv))
# ifdef NETWARE
# define CopSTASH_free(c) SAVECOPSTASH_FREE(c)
# define CopFILE_free(c) SAVECOPFILE_FREE(c)
# else
# define CopSTASH_free(c) PerlMemShared_free(CopSTASHPV(c))
-# define CopFILE_free(c) (PerlMemShared_free(CopFILE(c)),(CopFILE(c) = Nullch))
+# define CopFILE_free(c) (PerlMemShared_free(CopFILE(c)),(CopFILE(c) = NULL))
# endif
#else
# define CopFILEGV(c) ((c)->cop_filegv)
@@ -203,10 +203,10 @@ struct cop {
# else
# define CopFILEAVx(c) (GvAV(CopFILEGV(c)))
# endif
-# define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : Nullch)
+# define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : NULL)
# define CopSTASH(c) ((c)->cop_stash)
# define CopSTASH_set(c,hv) ((c)->cop_stash = (hv))
-# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME_get(CopSTASH(c)) : Nullch)
+# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME_get(CopSTASH(c)) : NULL)
/* cop_stash is not refcounted */
# define CopSTASHPV_set(c,pv) CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
# define CopSTASH_eq(c,hv) (CopSTASH(c) == (hv))
diff --git a/doio.c b/doio.c
index 495599cf67..1b04bc2382 100644
--- a/doio.c
+++ b/doio.c
@@ -179,7 +179,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
namesv = sv_2mortal(newSVpv(oname,0));
num_svs = 1;
svp = &namesv;
- type = Nullch;
+ type = NULL;
fp = PerlIO_openn(aTHX_ type, mode, -1, rawmode, rawperm, NULL, num_svs, svp);
}
else {
@@ -381,7 +381,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
fd = -1;
}
if (!num_svs)
- type = Nullch;
+ type = NULL;
if (that_fp) {
fp = PerlIO_fdupopen(aTHX_ that_fp, NULL, dodup);
}
@@ -412,7 +412,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
namesv = sv_2mortal(newSVpvn(type,tend - type));
num_svs = 1;
svp = &namesv;
- type = Nullch;
+ type = NULL;
}
fp = PerlIO_openn(aTHX_ type,mode,-1,0,0,NULL,num_svs,svp);
}
@@ -450,7 +450,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
namesv = sv_2mortal(newSVpvn(type,tend - type));
num_svs = 1;
svp = &namesv;
- type = Nullch;
+ type = NULL;
}
fp = PerlIO_openn(aTHX_ type,mode,-1,0,0,NULL,num_svs,svp);
}
@@ -542,7 +542,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
namesv = sv_2mortal(newSVpvn(type,tend - type));
num_svs = 1;
svp = &namesv;
- type = Nullch;
+ type = NULL;
}
fp = PerlIO_openn(aTHX_ type,mode,-1,0,0,NULL,num_svs,svp);
}
@@ -1427,7 +1427,7 @@ Perl_do_execfree(pTHX)
Safefree(PL_Argv);
PL_Argv = Null(char **);
Safefree(PL_Cmd);
- PL_Cmd = Nullch;
+ PL_Cmd = NULL;
}
#ifdef PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION
diff --git a/doop.c b/doop.c
index 1d81ca07f6..e84816ae2e 100644
--- a/doop.c
+++ b/doop.c
@@ -1390,7 +1390,7 @@ Perl_do_kv(pTHX)
if (PL_op->op_flags & OPf_MOD || LVRET) { /* lvalue */
if (SvTYPE(TARG) < SVt_PVLV) {
sv_upgrade(TARG, SVt_PVLV);
- sv_magic(TARG, Nullsv, PERL_MAGIC_nkeys, Nullch, 0);
+ sv_magic(TARG, Nullsv, PERL_MAGIC_nkeys, NULL, 0);
}
LvTYPE(TARG) = 'k';
if (LvTARG(TARG) != (SV*)keys) {
diff --git a/dump.c b/dump.c
index 3b7fca4e7c..088e86077f 100644
--- a/dump.c
+++ b/dump.c
@@ -87,7 +87,7 @@ Perl_dump_sub(pTHX_ const GV *gv)
{
SV * const sv = sv_newmortal();
- gv_fullname3(sv, gv, Nullch);
+ gv_fullname3(sv, gv, NULL);
Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nSUB %s = ", SvPVX_const(sv));
if (CvXSUB(GvCV(gv)))
Perl_dump_indent(aTHX_ 0, Perl_debug_log, "(xsub 0x%"UVxf" %d)\n",
@@ -104,7 +104,7 @@ Perl_dump_form(pTHX_ const GV *gv)
{
SV * const sv = sv_newmortal();
- gv_fullname3(sv, gv, Nullch);
+ gv_fullname3(sv, gv, NULL);
Perl_dump_indent(aTHX_ 0, Perl_debug_log, "\nFORMAT %s = ", SvPVX_const(sv));
if (CvROOT(GvFORM(gv)))
op_dump(CvROOT(GvFORM(gv)));
@@ -772,7 +772,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o)
SV *tmpsv = newSV(0);
ENTER;
SAVEFREESV(tmpsv);
- gv_fullname3(tmpsv, (GV*)cSVOPo->op_sv, Nullch);
+ gv_fullname3(tmpsv, (GV*)cSVOPo->op_sv, NULL);
Perl_dump_indent(aTHX_ level, file, "GV = %s\n",
SvPV_nolen_const(tmpsv));
LEAVE;
@@ -875,10 +875,10 @@ Perl_gv_dump(pTHX_ GV *gv)
}
sv = sv_newmortal();
PerlIO_printf(Perl_debug_log, "{\n");
- gv_fullname3(sv, gv, Nullch);
+ gv_fullname3(sv, gv, NULL);
Perl_dump_indent(aTHX_ 1, Perl_debug_log, "GV_NAME = %s", SvPVX_const(sv));
if (gv != GvEGV(gv)) {
- gv_efullname3(sv, GvEGV(gv), Nullch);
+ gv_efullname3(sv, GvEGV(gv), NULL);
Perl_dump_indent(aTHX_ 1, Perl_debug_log, "-> %s", SvPVX_const(sv));
}
PerlIO_putc(Perl_debug_log, '\n');
@@ -1650,7 +1650,7 @@ Perl_debop(pTHX_ const OP *o)
case OP_GV:
if (cGVOPo_gv) {
SV *sv = newSV(0);
- gv_fullname3(sv, cGVOPo_gv, Nullch);
+ gv_fullname3(sv, cGVOPo_gv, NULL);
PerlIO_printf(Perl_debug_log, "(%s)", SvPV_nolen_const(sv));
SvREFCNT_dec(sv);
}
diff --git a/gv.c b/gv.c
index 492c1f3f2f..251d86169d 100644
--- a/gv.c
+++ b/gv.c
@@ -204,7 +204,7 @@ Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi)
GvFILE(gv) = CopFILE(PL_curcop) ? CopFILE(PL_curcop) : (char *) "";
GvCVGEN(gv) = 0;
GvEGV(gv) = gv;
- sv_magic((SV*)gv, (SV*)gv, PERL_MAGIC_glob, Nullch, 0);
+ sv_magic((SV*)gv, (SV*)gv, PERL_MAGIC_glob, NULL, 0);
GvSTASH(gv) = stash;
if (stash)
Perl_sv_add_backref(aTHX_ (SV*)stash, (SV*)gv);
@@ -990,7 +990,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
if (strEQ(name2, "SA")) {
AV* const av = GvAVn(gv);
GvMULTI_on(gv);
- sv_magic((SV*)av, (SV*)gv, PERL_MAGIC_isa, Nullch, 0);
+ sv_magic((SV*)av, (SV*)gv, PERL_MAGIC_isa, NULL, 0);
/* NOTE: No support for tied ISA */
if ((add & GV_ADDMULTI) && strEQ(nambeg,"AnyDBM_File::ISA")
&& AvFILLp(av) == -1)
@@ -1133,7 +1133,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
case '-':
{
AV* const av = GvAVn(gv);
- sv_magic((SV*)av, Nullsv, PERL_MAGIC_regdata, Nullch, 0);
+ sv_magic((SV*)av, Nullsv, PERL_MAGIC_regdata, NULL, 0);
SvREADONLY_on(av);
goto magicalize;
}
@@ -1150,7 +1150,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
case '+':
{
AV* const av = GvAVn(gv);
- sv_magic((SV*)av, (SV*)av, PERL_MAGIC_regdata, Nullch, 0);
+ sv_magic((SV*)av, (SV*)av, PERL_MAGIC_regdata, NULL, 0);
SvREADONLY_on(av);
/* FALL THROUGH */
}
diff --git a/hv.c b/hv.c
index 1ede825073..05b3828835 100644
--- a/hv.c
+++ b/hv.c
@@ -1808,7 +1808,7 @@ Perl_hv_undef(pTHX_ HV *hv)
if ((name = HvNAME_get(hv))) {
if(PL_stashcache)
hv_delete(PL_stashcache, name, HvNAMELEN_get(hv), G_DISCARD);
- hv_name_set(hv, Nullch, 0, 0);
+ hv_name_set(hv, NULL, 0, 0);
}
SvFLAGS(hv) &= ~SVf_OOK;
Safefree(HvARRAY(hv));
diff --git a/hv.h b/hv.h
index fd0cf2eda2..8c78c7ad20 100644
--- a/hv.h
+++ b/hv.h
@@ -299,7 +299,7 @@ C<SV*>.
#define HePV(he,lp) ((HeKLEN(he) == HEf_SVKEY) ? \
SvPV(HeKEY_sv(he),lp) : \
(((lp = HeKLEN(he)) >= 0) ? \
- HeKEY(he) : Nullch))
+ HeKEY(he) : NULL))
#define HeSVKEY(he) ((HeKEY(he) && \
HeKLEN(he) == HEf_SVKEY) ? \
@@ -365,7 +365,7 @@ C<SV*>.
#define HV_ITERNEXT_WANTPLACEHOLDERS 0x01 /* Don't skip placeholders. */
#define hv_iternext(hv) hv_iternext_flags(hv, 0)
-#define hv_magic(hv, gv, how) sv_magic((SV*)(hv), (SV*)(gv), how, Nullch, 0)
+#define hv_magic(hv, gv, how) sv_magic((SV*)(hv), (SV*)(gv), how, NULL, 0)
/* available as a function in hv.c */
#define Perl_sharepvn(sv, len, hash) HEK_KEY(share_hek(sv, len, hash))
diff --git a/locale.c b/locale.c
index 55da8b1a2a..86b11c841f 100644
--- a/locale.c
+++ b/locale.c
@@ -286,7 +286,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
if (! (curctype =
setlocale(LC_CTYPE,
(!done && (lang || PerlEnv_getenv("LC_CTYPE")))
- ? "" : Nullch)))
+ ? "" : NULL)))
setlocale_failure = TRUE;
else
curctype = savepv(curctype);
@@ -295,7 +295,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
if (! (curcoll =
setlocale(LC_COLLATE,
(!done && (lang || PerlEnv_getenv("LC_COLLATE")))
- ? "" : Nullch)))
+ ? "" : NULL)))
setlocale_failure = TRUE;
else
curcoll = savepv(curcoll);
@@ -304,7 +304,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
if (! (curnum =
setlocale(LC_NUMERIC,
(!done && (lang || PerlEnv_getenv("LC_NUMERIC")))
- ? "" : Nullch)))
+ ? "" : NULL)))
setlocale_failure = TRUE;
else
curnum = savepv(curnum);
@@ -454,13 +454,13 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
#endif /* ! LC_ALL */
#ifdef USE_LOCALE_CTYPE
- curctype = savepv(setlocale(LC_CTYPE, Nullch));
+ curctype = savepv(setlocale(LC_CTYPE, NULL));
#endif /* USE_LOCALE_CTYPE */
#ifdef USE_LOCALE_COLLATE
- curcoll = savepv(setlocale(LC_COLLATE, Nullch));
+ curcoll = savepv(setlocale(LC_COLLATE, NULL));
#endif /* USE_LOCALE_COLLATE */
#ifdef USE_LOCALE_NUMERIC
- curnum = savepv(setlocale(LC_NUMERIC, Nullch));
+ curnum = savepv(setlocale(LC_NUMERIC, NULL));
#endif /* USE_LOCALE_NUMERIC */
}
else {
diff --git a/malloc.c b/malloc.c
index 63f6630678..94fcb15632 100644
--- a/malloc.c
+++ b/malloc.c
@@ -1173,7 +1173,7 @@ perl_get_emergency_buffer(IV *size)
}
SvPOK_off(sv);
- SvPV_set(sv, Nullch);
+ SvPV_set(sv, NULL);
SvCUR_set(sv, 0);
SvLEN_set(sv, 0);
*size = malloced_size(pv) + M_OVERHEAD;
@@ -1249,7 +1249,7 @@ emergency_sbrk(MEM_SIZE size)
if (emergency_buffer_size) {
add_to_chain(emergency_buffer, emergency_buffer_size, 0);
emergency_buffer_size = 0;
- emergency_buffer = Nullch;
+ emergency_buffer = NULL;
have = 1;
}
@@ -1276,7 +1276,7 @@ emergency_sbrk(MEM_SIZE size)
MALLOC_UNLOCK;
emergency_sbrk_croak("Out of memory during request for %"UVuf" bytes, total sbrk() is %"UVuf" bytes", (UV)size, (UV)(goodsbrk + sbrk_slack));
/* NOTREACHED */
- return Nullch;
+ return NULL;
}
#else /* !defined(PERL_EMERGENCY_SBRK) */
@@ -2141,7 +2141,7 @@ Perl_realloc(void *mp, size_t nbytes)
bad_free_warn = (pbf) ? atoi(pbf) : 1;
}
if (!bad_free_warn)
- return Nullch;
+ return NULL;
#ifdef RCHECK
#ifdef PERL_CORE
{
@@ -2169,7 +2169,7 @@ Perl_realloc(void *mp, size_t nbytes)
warn("%s", "Bad realloc() ignored");
#endif
#endif
- return Nullch; /* sanity */
+ return NULL; /* sanity */
}
onb = BUCKET_SIZE_REAL(bucket);
diff --git a/mathoms.c b/mathoms.c
index 2acdb420b4..1371667f37 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -65,7 +65,7 @@ Taint an SV. Use C<SvTAINTED_on> instead.
void
Perl_sv_taint(pTHX_ SV *sv)
{
- sv_magic((sv), Nullsv, PERL_MAGIC_taint, Nullch, 0);
+ sv_magic((sv), Nullsv, PERL_MAGIC_taint, NULL, 0);
}
/* sv_2iv() is now a macro using Perl_sv_2iv_flags();
@@ -491,7 +491,7 @@ Perl_hv_iternext(pTHX_ HV *hv)
void
Perl_hv_magic(pTHX_ HV *hv, GV *gv, int how)
{
- sv_magic((SV*)hv, (SV*)gv, how, Nullch, 0);
+ sv_magic((SV*)hv, (SV*)gv, how, NULL, 0);
}
#if 0 /* use the macro from hv.h instead */
diff --git a/mg.c b/mg.c
index c2775760d5..a6b4e2f6c1 100644
--- a/mg.c
+++ b/mg.c
@@ -1076,7 +1076,7 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg)
return 0;
}
}
- if ((cp = strchr(elt, ':')) != Nullch)
+ if ((cp = strchr(elt, ':')) != NULL)
*cp = '\0';
if (my_trnlnm(elt, eltbuf, j++))
elt = eltbuf;
@@ -1115,7 +1115,7 @@ int
Perl_magic_clearenv(pTHX_ SV *sv, MAGIC *mg)
{
PERL_UNUSED_ARG(sv);
- my_setenv(MgPV_nolen_const(mg),Nullch);
+ my_setenv(MgPV_nolen_const(mg),NULL);
return 0;
}
@@ -2206,12 +2206,12 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
break;
case '\011': /* ^I */ /* NOT \t in EBCDIC */
Safefree(PL_inplace);
- PL_inplace = SvOK(sv) ? savesvpv(sv) : Nullch;
+ PL_inplace = SvOK(sv) ? savesvpv(sv) : NULL;
break;
case '\017': /* ^O */
if (*(mg->mg_ptr+1) == '\0') {
Safefree(PL_osname);
- PL_osname = Nullch;
+ PL_osname = NULL;
if (SvOK(sv)) {
TAINT_PROPER("assigning to $^O");
PL_osname = savesvpv(sv);
@@ -2738,7 +2738,7 @@ Perl_sighandler(int sig)
(void)rsignal(sig, PL_csighandlerp);
#endif
#endif /* !PERL_MICRO */
- Perl_die(aTHX_ Nullch);
+ Perl_die(aTHX_ NULL);
}
cleanup:
if (flags & 1)
diff --git a/op.c b/op.c
index e7ed2920e3..6c9b53f575 100644
--- a/op.c
+++ b/op.c
@@ -162,7 +162,7 @@ STATIC const char*
S_gv_ename(pTHX_ GV *gv)
{
SV* const tmpsv = sv_newmortal();
- gv_efullname3(tmpsv, gv, Nullch);
+ gv_efullname3(tmpsv, gv, NULL);
return SvPV_nolen_const(tmpsv);
}
@@ -384,7 +384,7 @@ Perl_op_clear(pTHX_ OP *o)
}
else {
Safefree(cPVOPo->op_pv);
- cPVOPo->op_pv = Nullch;
+ cPVOPo->op_pv = NULL;
}
break;
case OP_SUBST:
@@ -3123,9 +3123,9 @@ Perl_utilize(pTHX_ int aver, I32 floor, OP *version, OP *idop, OP *arg)
Nullop,
append_elem(OP_LINESEQ,
append_elem(OP_LINESEQ,
- newSTATEOP(0, Nullch, newUNOP(OP_REQUIRE, 0, idop)),
- newSTATEOP(0, Nullch, veop)),
- newSTATEOP(0, Nullch, imop) ));
+ newSTATEOP(0, NULL, newUNOP(OP_REQUIRE, 0, idop)),
+ newSTATEOP(0, NULL, veop)),
+ newSTATEOP(0, NULL, imop) ));
/* The "did you use incorrect case?" warning used to be here.
* The problem is that on case-insensitive filesystems one
@@ -4311,7 +4311,7 @@ Perl_cv_ckproto(pTHX_ const CV *cv, const GV *gv, const char *p)
SV* name = Nullsv;
if (gv)
- gv_efullname3(name = sv_newmortal(), gv, Nullch);
+ gv_efullname3(name = sv_newmortal(), gv, NULL);
sv_setpv(msg, "Prototype mismatch:");
if (name)
Perl_sv_catpvf(aTHX_ msg, " sub %"SVf, name);
@@ -4471,14 +4471,14 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
const I32 gv_fetch_flags
= (block || attrs || (CvFLAGS(PL_compcv) & CVf_BUILTIN_ATTRS))
? GV_ADDMULTI : GV_ADDMULTI | GV_NOINIT;
- const char * const name = o ? SvPVx_nolen_const(cSVOPo->op_sv) : Nullch;
+ const char * const name = o ? SvPVx_nolen_const(cSVOPo->op_sv) : NULL;
if (proto) {
assert(proto->op_type == OP_CONST);
ps = SvPVx_const(((SVOP*)proto)->op_sv, ps_len);
}
else
- ps = Nullch;
+ ps = NULL;
if (!name && PERLDB_NAMEANON && CopLINE(PL_curcop)) {
SV * const sv = sv_newmortal();
@@ -4488,7 +4488,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
aname = SvPVX_const(sv);
}
else
- aname = Nullch;
+ aname = NULL;
gv = name ? gv_fetchsv(cSVOPo->op_sv, gv_fetch_flags, SVt_PVCV)
: gv_fetchpv(aname ? aname
@@ -4695,7 +4695,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
/* This makes sub {}; work as expected. */
if (block->op_type == OP_STUB) {
op_free(block);
- block = newSTATEOP(0, Nullch, 0);
+ block = newSTATEOP(0, NULL, 0);
}
CvROOT(cv) = newUNOP(OP_LEAVESUB, 0, scalarseq(block));
}
@@ -4729,7 +4729,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
Perl_sv_setpvf(aTHX_ sv, "%s:%ld-%ld",
CopFILE(PL_curcop),
(long)PL_subline, (long)CopLINE(PL_curcop));
- gv_efullname3(tmpstr, gv, Nullch);
+ gv_efullname3(tmpstr, gv, NULL);
hv_store(GvHV(PL_DBsub), SvPVX_const(tmpstr), SvCUR(tmpstr), sv, 0);
hv = GvHVn(db_postponed);
if (HvFILL(hv) > 0 && hv_exists(hv, SvPVX_const(tmpstr), SvCUR(tmpstr))) {
@@ -5413,7 +5413,7 @@ Perl_ck_rvconst(pTHX_ register OP *o)
if (SvROK(kidsv) && SvREADONLY(kidsv)) {
SV * const rsv = SvRV(kidsv);
const int svtype = SvTYPE(rsv);
- const char *badtype = Nullch;
+ const char *badtype = NULL;
switch (o->op_type) {
case OP_RV2SV:
@@ -5449,7 +5449,7 @@ Perl_ck_rvconst(pTHX_ register OP *o)
o->op_private &= ~HINT_STRICT_REFS;
}
if ((o->op_private & HINT_STRICT_REFS) && (kid->op_private & OPpCONST_BARE)) {
- const char *badthing = Nullch;
+ const char *badthing = NULL;
switch (o->op_type) {
case OP_RV2SV:
badthing = "a SCALAR";
@@ -5674,7 +5674,7 @@ Perl_ck_fun(pTHX_ OP *o)
/* is this op a FH constructor? */
if (is_handle_constructor(o,numargs)) {
- const char *name = Nullch;
+ const char *name = NULL;
STRLEN len = 0;
flags = 0;
@@ -6979,7 +6979,7 @@ Perl_peep(pTHX_ register OP *o)
if (SvTYPE(gv) == SVt_PVGV && GvCV(gv) && SvPVX_const(GvCV(gv))) {
/* XXX could check prototype here instead of just carping */
SV * const sv = sv_newmortal();
- gv_efullname3(sv, gv, Nullch);
+ gv_efullname3(sv, gv, NULL);
Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE),
"%"SVf"() called too early to check prototype",
sv);
diff --git a/op.h b/op.h
index 74bc179812..4e4aa47d7f 100644
--- a/op.h
+++ b/op.h
@@ -355,13 +355,13 @@ struct pmop {
# define PmopSTASHPV_set(o,pv) (PmopSTASHPV(o) = savesharedpv(pv))
# define PmopSTASH(o) (PmopSTASHPV(o) \
? gv_stashpv(PmopSTASHPV(o),GV_ADD) : NULL)
-# define PmopSTASH_set(o,hv) PmopSTASHPV_set(o, ((hv) ? HvNAME_get(hv) : Nullch))
+# define PmopSTASH_set(o,hv) PmopSTASHPV_set(o, ((hv) ? HvNAME_get(hv) : NULL))
# define PmopSTASH_free(o) PerlMemShared_free(PmopSTASHPV(o))
#else
# define PmopSTASH(o) ((o)->op_pmstash)
# define PmopSTASH_set(o,hv) ((o)->op_pmstash = (hv))
-# define PmopSTASHPV(o) (PmopSTASH(o) ? HvNAME_get(PmopSTASH(o)) : Nullch)
+# define PmopSTASHPV(o) (PmopSTASH(o) ? HvNAME_get(PmopSTASH(o)) : NULL)
/* op_pmstash is not refcounted */
# define PmopSTASHPV_set(o,pv) PmopSTASH_set((o), gv_stashpv(pv,GV_ADD))
# define PmopSTASH_free(o)
diff --git a/pad.c b/pad.c
index 4211b11f6c..c17bcf6190 100644
--- a/pad.c
+++ b/pad.c
@@ -1532,7 +1532,7 @@ Perl_cv_clone(pTHX_ CV *proto)
SV* const const_sv = op_const_sv(CvSTART(cv), cv);
if (const_sv) {
SvREFCNT_dec(cv);
- cv = newCONSTSUB(CvSTASH(proto), Nullch, const_sv);
+ cv = newCONSTSUB(CvSTASH(proto), NULL, const_sv);
}
else {
CvCONST_off(cv);
diff --git a/perl.c b/perl.c
index 9aa2a90ead..26382e9736 100644
--- a/perl.c
+++ b/perl.c
@@ -866,7 +866,7 @@ perl_destruct(pTHXx)
PL_unsafe = FALSE;
Safefree(PL_inplace);
- PL_inplace = Nullch;
+ PL_inplace = NULL;
SvREFCNT_dec(PL_patchlevel);
if (PL_e_script) {
@@ -889,7 +889,7 @@ perl_destruct(pTHXx)
PL_multiline = 0; /* $* */
Safefree(PL_osname); /* $^O */
- PL_osname = Nullch;
+ PL_osname = NULL;
SvREFCNT_dec(PL_statname);
PL_statname = Nullsv;
@@ -907,7 +907,7 @@ perl_destruct(pTHXx)
/* float buffer */
Safefree(PL_efloatbuf);
- PL_efloatbuf = Nullch;
+ PL_efloatbuf = NULL;
PL_efloatsize = 0;
/* startup and shutdown function lists */
@@ -970,12 +970,12 @@ perl_destruct(pTHXx)
/* free locale stuff */
#ifdef USE_LOCALE_COLLATE
Safefree(PL_collation_name);
- PL_collation_name = Nullch;
+ PL_collation_name = NULL;
#endif
#ifdef USE_LOCALE_NUMERIC
Safefree(PL_numeric_name);
- PL_numeric_name = Nullch;
+ PL_numeric_name = NULL;
SvREFCNT_dec(PL_numeric_radix_sv);
PL_numeric_radix_sv = Nullsv;
#endif
@@ -1213,7 +1213,7 @@ perl_destruct(pTHXx)
SvREADONLY_off(&PL_sv_undef);
Safefree(PL_origfilename);
- PL_origfilename = Nullch;
+ PL_origfilename = NULL;
Safefree(PL_reg_start_tmp);
PL_reg_start_tmp = (char**)NULL;
PL_reg_start_tmpl = 0;
@@ -1226,7 +1226,7 @@ perl_destruct(pTHXx)
Safefree(PL_psig_name);
PL_psig_name = (SV**)NULL;
Safefree(PL_bitcount);
- PL_bitcount = Nullch;
+ PL_bitcount = NULL;
Safefree(PL_psig_pend);
PL_psig_pend = (int*)NULL;
PL_formfeed = Nullsv;
@@ -1498,7 +1498,7 @@ setuid perl scripts securely.\n");
s = PL_origenviron[0];
while (*s) s++;
#endif
- my_setenv("NoNe SuCh", Nullch);
+ my_setenv("NoNe SuCh", NULL);
/* Force copy of environment. */
for (i = 1; PL_origenviron[i]; i++) {
if (PL_origenviron[i] == s + 1
@@ -1589,7 +1589,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
const char *validarg = "";
register SV *sv;
register char *s;
- const char *cddir = Nullch;
+ const char *cddir = NULL;
#ifdef USE_SITECUSTOMIZE
bool minus_f = FALSE;
#endif
@@ -1698,7 +1698,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
case 'I': /* -I handled both here and in moreswitches() */
forbid_setid("-I");
- if (!*++s && (s=argv[1]) != Nullch) {
+ if (!*++s && (s=argv[1]) != NULL) {
argc--,argv++;
}
if (s && *s) {
@@ -1951,7 +1951,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
PL_taint_warn = FALSE;
}
else {
- char *popt_copy = Nullch;
+ char *popt_copy = NULL;
while (s && *s) {
char *d;
while (isSPACE(*s))
@@ -2008,7 +2008,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
argc++,argv--;
scriptname = BIT_BUCKET; /* don't look for script or read stdin */
}
- else if (scriptname == Nullch) {
+ else if (scriptname == NULL) {
#ifdef MSDOS
if ( PerlLIO_isatty(PerlIO_fileno(PerlIO_stdin())) )
moreswitches("h");
@@ -3369,7 +3369,7 @@ Internet, point your browser at http://www.perl.org/, the Perl Home Page.\n\n");
default:
Perl_croak(aTHX_ "Can't emulate -%.1s on #! line",s);
}
- return Nullch;
+ return NULL;
}
/* compliments of Tom Christiansen */
@@ -3947,7 +3947,7 @@ S_validate_suid(pTHX_ const char *validarg, const char *scriptname)
PL_doswitches = FALSE; /* -s is insecure in suid */
/* PSz 13 Nov 03 But -s was caught elsewhere ... so unsetting it here is useless(?!) */
CopLINE_inc(PL_curcop);
- if (sv_gets(PL_linestr, PL_rsfp, 0) == Nullch)
+ if (sv_gets(PL_linestr, PL_rsfp, 0) == NULL)
Perl_croak(aTHX_ "No #! line");
linestr = SvPV_nolen_const(PL_linestr);
/* required even on Sys V */
@@ -4230,7 +4230,7 @@ S_find_beginning(pTHX)
/* Since the Mac OS does not honor #! arguments for us, we do it ourselves */
while (PL_doextract || gMacPerl_AlwaysExtract) {
- if ((s = sv_gets(PL_linestr, PL_rsfp, 0)) == Nullch) {
+ if ((s = sv_gets(PL_linestr, PL_rsfp, 0)) == NULL) {
if (!gMacPerl_AlwaysExtract)
Perl_croak(aTHX_ "No Perl script found in input\n");
@@ -4247,7 +4247,7 @@ S_find_beginning(pTHX)
}
#else
while (PL_doextract) {
- if ((s = sv_gets(PL_linestr, PL_rsfp, 0)) == Nullch)
+ if ((s = sv_gets(PL_linestr, PL_rsfp, 0)) == NULL)
Perl_croak(aTHX_ "No Perl script found in input\n");
#endif
s2 = s;
@@ -4613,7 +4613,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register
# endif
)
{
- environ[0] = Nullch;
+ environ[0] = NULL;
}
if (env) {
char** origenv = environ;
@@ -4847,14 +4847,14 @@ S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep,
}
}
- if ( usesep && (s = strchr(p, PERLLIB_SEP)) != Nullch ) {
+ if ( usesep && (s = strchr(p, PERLLIB_SEP)) != NULL ) {
sv_setpvn(libdir, PERLLIB_MANGLE(p, (STRLEN)(s - p)),
(STRLEN)(s - p));
p = s + 1;
}
else {
sv_setpv(libdir, PERLLIB_MANGLE(p, 0));
- p = Nullch; /* break out */
+ p = NULL; /* break out */
}
#ifdef MACOS_TRADITIONAL
if (!strchr(SvPVX(libdir), ':')) {
@@ -4978,7 +4978,7 @@ S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep,
char *unix;
STRLEN len;
- if ((unix = tounixspec_ts(SvPV(libdir,len),Nullch)) != Nullch) {
+ if ((unix = tounixspec_ts(SvPV(libdir,len),NULL)) != NULL) {
len = strlen(unix);
while (unix[len-1] == '/') len--; /* Cosmetic */
sv_usepvn(libdir,unix,len);
diff --git a/perl.h b/perl.h
index 04b070f48a..37ba21022e 100644
--- a/perl.h
+++ b/perl.h
@@ -422,7 +422,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
#define TAINT_NOT (PL_tainted = FALSE)
#define TAINT_IF(c) if (c) { PL_tainted = TRUE; }
#define TAINT_ENV() if (PL_tainting) { taint_env(); }
-#define TAINT_PROPER(s) if (PL_tainting) { taint_proper(Nullch, s); }
+#define TAINT_PROPER(s) if (PL_tainting) { taint_proper(NULL, s); }
/* XXX All process group stuff is handled in pp_sys.c. Should these
defines move there? If so, I could simplify this a lot. --AD 9/96.
diff --git a/perlio.c b/perlio.c
index cb7f62b623..bee91ee8dc 100644
--- a/perlio.c
+++ b/perlio.c
@@ -928,7 +928,7 @@ PerlIO_parse_layers(pTHX_ PerlIO_list_t *av, const char *names)
if (*s) {
STRLEN llen = 0;
const char *e = s;
- const char *as = Nullch;
+ const char *as = NULL;
STRLEN alen = 0;
if (!isIDFIRST(*s)) {
/*
@@ -1095,7 +1095,7 @@ PerlIO_default_layers(pTHX)
{
dVAR;
if (!PL_def_layerlist) {
- const char * const s = (PL_tainting) ? Nullch : PerlEnv_getenv("PERLIO");
+ const char * const s = (PL_tainting) ? NULL : PerlEnv_getenv("PERLIO");
PERLIO_FUNCS_DECL(*osLayer) = &PerlIO_unix;
PL_def_layerlist = PerlIO_list_alloc(aTHX);
PerlIO_define_layer(aTHX_ PERLIO_FUNCS_CAST(&PerlIO_unix));
@@ -1357,7 +1357,7 @@ PerlIO_binmode(pTHX_ PerlIO *f, int iotype, int mode, const char *names)
/* Legacy binmode is now _defined_ as being equivalent to pushing :raw
So code that used to be here is now in PerlIORaw_pushed().
*/
- return PerlIO_push(aTHX_ f, PERLIO_FUNCS_CAST(&PerlIO_raw), Nullch, Nullsv) ? TRUE : FALSE;
+ return PerlIO_push(aTHX_ f, PERLIO_FUNCS_CAST(&PerlIO_raw), NULL, Nullsv) ? TRUE : FALSE;
}
}
@@ -3229,7 +3229,7 @@ PerlIOStdio_setlinebuf(pTHX_ PerlIO *f)
#ifdef HAS_SETLINEBUF
PerlSIO_setlinebuf(PerlIOSelf(f, PerlIOStdio)->stdio);
#else
- PerlSIO_setvbuf(PerlIOSelf(f, PerlIOStdio)->stdio, Nullch, _IOLBF, 0);
+ PerlSIO_setvbuf(PerlIOSelf(f, PerlIOStdio)->stdio, NULL, _IOLBF, 0);
#endif
}
@@ -3461,7 +3461,7 @@ PerlIO_findFILE(PerlIO *f)
l = *PerlIONext(&l);
}
/* Uses fallback "mode" via PerlIO_modestr() in PerlIO_exportFILE */
- return PerlIO_exportFILE(f, Nullch);
+ return PerlIO_exportFILE(f, NULL);
}
/* Use this to reverse PerlIO_exportFILE calls. */
@@ -3555,7 +3555,7 @@ PerlIOBuf_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers,
#ifdef PERLIO_USING_CRLF
# ifdef PERLIO_IS_BINMODE_FD
if (PERLIO_IS_BINMODE_FD(fd))
- PerlIO_binmode(aTHX_ f, '<'/*not used*/, O_BINARY, Nullch);
+ PerlIO_binmode(aTHX_ f, '<'/*not used*/, O_BINARY, NULL);
else
# endif
/*
@@ -4792,7 +4792,7 @@ PerlIO_getname(PerlIO *f, char *buf)
PERL_UNUSED_ARG(f);
PERL_UNUSED_ARG(buf);
Perl_croak(aTHX_ "Don't know how to get file name");
- return Nullch;
+ return NULL;
#endif
}
@@ -4808,7 +4808,7 @@ PerlIO *
PerlIO_fdopen(int fd, const char *mode)
{
dTHX;
- return PerlIO_openn(aTHX_ Nullch, mode, fd, 0, 0, NULL, 0, NULL);
+ return PerlIO_openn(aTHX_ NULL, mode, fd, 0, 0, NULL, 0, NULL);
}
#undef PerlIO_open
@@ -4817,7 +4817,7 @@ PerlIO_open(const char *path, const char *mode)
{
dTHX;
SV *name = sv_2mortal(newSVpv(path, 0));
- return PerlIO_openn(aTHX_ Nullch, mode, -1, 0, 0, NULL, 1, &name);
+ return PerlIO_openn(aTHX_ NULL, mode, -1, 0, 0, NULL, 1, &name);
}
#undef Perlio_reopen
@@ -4826,7 +4826,7 @@ PerlIO_reopen(const char *path, const char *mode, PerlIO *f)
{
dTHX;
SV *name = sv_2mortal(newSVpv(path,0));
- return PerlIO_openn(aTHX_ Nullch, mode, -1, 0, 0, f, 1, &name);
+ return PerlIO_openn(aTHX_ NULL, mode, -1, 0, 0, f, 1, &name);
}
#undef PerlIO_getc
diff --git a/perlsdio.h b/perlsdio.h
index c35752abbd..480b024db1 100644
--- a/perlsdio.h
+++ b/perlsdio.h
@@ -87,7 +87,7 @@
#ifdef HAS_SETLINEBUF
#define PerlIO_setlinebuf(f) PerlSIO_setlinebuf(f);
#else
-#define PerlIO_setlinebuf(f) PerlSIO_setvbuf(f, Nullch, _IOLBF, 0);
+#define PerlIO_setlinebuf(f) PerlSIO_setvbuf(f, NULL, _IOLBF, 0);
#endif
/* Now our interface to Configure's FILE_xxx macros */
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index 5d807df536..a97032971e 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -2163,7 +2163,7 @@ Found in file util.c
X<fbm_instr>
Returns the location of the SV in the string delimited by C<str> and
-C<strend>. It returns C<Nullch> if the string can't be found. The C<sv>
+C<strend>. It returns C<NULL> if the string can't be found. The C<sv>
does not have to be fbm_compiled, but the search will not be as fast
then.
@@ -5399,7 +5399,7 @@ X<sv_setref_iv>
Copies an integer into a new SV, optionally blessing the SV. The C<rv>
argument will be upgraded to an RV. That RV will be modified to point to
the new SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<Nullch> to avoid the blessing. The new SV
+blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
will have a reference count of 1, and the RV will be returned.
SV* sv_setref_iv(SV* rv, const char* classname, IV iv)
@@ -5413,7 +5413,7 @@ X<sv_setref_nv>
Copies a double into a new SV, optionally blessing the SV. The C<rv>
argument will be upgraded to an RV. That RV will be modified to point to
the new SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<Nullch> to avoid the blessing. The new SV
+blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
will have a reference count of 1, and the RV will be returned.
SV* sv_setref_nv(SV* rv, const char* classname, NV nv)
@@ -5428,7 +5428,7 @@ Copies a pointer into a new SV, optionally blessing the SV. The C<rv>
argument will be upgraded to an RV. That RV will be modified to point to
the new SV. If the C<pv> argument is NULL then C<PL_sv_undef> will be placed
into the SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<Nullch> to avoid the blessing. The new SV
+blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
will have a reference count of 1, and the RV will be returned.
Do not use with other Perl types such as HV, AV, SV, CV, because those
@@ -5448,7 +5448,7 @@ Copies a string into a new SV, optionally blessing the SV. The length of the
string must be specified with C<n>. The C<rv> argument will be upgraded to
an RV. That RV will be modified to point to the new SV. The C<classname>
argument indicates the package for the blessing. Set C<classname> to
-C<Nullch> to avoid the blessing. The new SV will have a reference count
+C<NULL> to avoid the blessing. The new SV will have a reference count
of 1, and the RV will be returned.
Note that C<sv_setref_pv> copies the pointer while this copies the string.
@@ -5464,7 +5464,7 @@ X<sv_setref_uv>
Copies an unsigned integer into a new SV, optionally blessing the SV. The C<rv>
argument will be upgraded to an RV. That RV will be modified to point to
the new SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<Nullch> to avoid the blessing. The new SV
+blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
will have a reference count of 1, and the RV will be returned.
SV* sv_setref_uv(SV* rv, const char* classname, UV uv)
@@ -6502,11 +6502,11 @@ function. Calling C<croak> returns control directly to Perl,
sidestepping the normal C order of execution. See C<warn>.
If you want to throw an exception object, assign the object to
-C<$@> and then pass C<Nullch> to croak():
+C<$@> and then pass C<NULL> to croak():
errsv = get_sv("@", TRUE);
sv_setsv(errsv, exception_object);
- croak(Nullch);
+ croak(NULL);
void croak(const char* pat, ...)
diff --git a/pp_sort.c b/pp_sort.c
index 868d6ab1e4..aa363c622b 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1520,7 +1520,7 @@ PP(pp_sort)
}
else if (gv) {
SV *tmpstr = sv_newmortal();
- gv_efullname3(tmpstr, gv, Nullch);
+ gv_efullname3(tmpstr, gv, NULL);
DIE(aTHX_ "Undefined sort subroutine \"%"SVf"\" called",
tmpstr);
}
diff --git a/pp_sys.c b/pp_sys.c
index 4470aa6226..8b99106aeb 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -344,7 +344,7 @@ PP(pp_backtick)
SAVESPTR(PL_rs);
PL_rs = &PL_sv_undef;
sv_setpvn(TARG, "", 0); /* note that this preserves previous buffer */
- while (sv_gets(TARG, fp, SvCUR(TARG)) != Nullch)
+ while (sv_gets(TARG, fp, SvCUR(TARG)) != NULL)
;
LEAVE;
XPUSHs(TARG);
@@ -353,7 +353,7 @@ PP(pp_backtick)
else {
for (;;) {
SV * const sv = newSV(79);
- if (sv_gets(sv, fp, 0) == Nullch) {
+ if (sv_gets(sv, fp, 0) == NULL) {
SvREFCNT_dec(sv);
break;
}
@@ -477,7 +477,7 @@ PP(pp_die)
}
else {
tmpsv = TOPs;
- tmps = SvROK(tmpsv) ? Nullch : SvPV_const(tmpsv, len);
+ tmps = SvROK(tmpsv) ? NULL : SvPV_const(tmpsv, len);
}
if (!tmps || !len) {
SV * const error = ERRSV;
@@ -502,7 +502,7 @@ PP(pp_die)
sv_setsv(error,*PL_stack_sp--);
}
}
- DIE(aTHX_ Nullch);
+ DIE(aTHX_ NULL);
}
else {
if (SvPOK(error) && SvCUR(error))
@@ -511,7 +511,7 @@ PP(pp_die)
if (SvOK(tmpsv))
tmps = SvPV_const(tmpsv, len);
else
- tmps = Nullch;
+ tmps = NULL;
}
}
if (!tmps || !len)
@@ -761,11 +761,11 @@ PP(pp_binmode)
PUTBACK;
if (PerlIO_binmode(aTHX_ fp,IoTYPE(io),mode_from_discipline(discp),
- (discp) ? SvPV_nolen_const(discp) : Nullch)) {
+ (discp) ? SvPV_nolen_const(discp) : NULL)) {
if (IoOFP(io) && IoOFP(io) != IoIFP(io)) {
if (!PerlIO_binmode(aTHX_ IoOFP(io),IoTYPE(io),
mode_from_discipline(discp),
- (discp) ? SvPV_nolen_const(discp) : Nullch)) {
+ (discp) ? SvPV_nolen_const(discp) : NULL)) {
SPAGAIN;
RETPUSHUNDEF;
}
@@ -859,7 +859,7 @@ PP(pp_tie)
SvTYPE(varsv) == SVt_PVHV))
Perl_croak(aTHX_
"Self-ties of arrays and hashes are not supported");
- sv_magic(varsv, (SvRV(sv) == varsv ? Nullsv : sv), how, Nullch, 0);
+ sv_magic(varsv, (SvRV(sv) == varsv ? Nullsv : sv), how, NULL, 0);
}
LEAVE;
SP = PL_stack_base + markoff;
@@ -975,7 +975,7 @@ PP(pp_dbmopen)
if (sv_isobject(TOPs)) {
sv_unmagic((SV *) hv, PERL_MAGIC_tied);
- sv_magic((SV*)hv, TOPs, PERL_MAGIC_tied, Nullch, 0);
+ sv_magic((SV*)hv, TOPs, PERL_MAGIC_tied, NULL, 0);
}
LEAVE;
RETURN;
@@ -1172,7 +1172,7 @@ PP(pp_select)
else {
GV * const * const gvp = (GV**)hv_fetch(hv, GvNAME(egv), GvNAMELEN(egv), FALSE);
if (gvp && *gvp == egv) {
- gv_efullname4(TARG, PL_defoutgv, Nullch, TRUE);
+ gv_efullname4(TARG, PL_defoutgv, NULL, TRUE);
XPUSHTARG;
}
else {
@@ -1286,7 +1286,7 @@ PP(pp_enterwrite)
if (fgv) {
SV * const tmpsv = sv_newmortal();
const char *name;
- gv_efullname4(tmpsv, fgv, Nullch, FALSE);
+ gv_efullname4(tmpsv, fgv, NULL, FALSE);
name = SvPV_nolen_const(tmpsv);
if (name && *name)
DIE(aTHX_ "Undefined format \"%s\" called", name);
@@ -1375,7 +1375,7 @@ PP(pp_leavewrite)
if (!cv) {
SV * const sv = sv_newmortal();
const char *name;
- gv_efullname4(sv, fgv, Nullch, FALSE);
+ gv_efullname4(sv, fgv, NULL, FALSE);
name = SvPV_nolen_const(sv);
if (name && *name)
DIE(aTHX_ "Undefined top format \"%s\" called",name);
@@ -3218,7 +3218,7 @@ PP(pp_fttext)
(void)PerlIO_close(fp);
RETPUSHUNDEF;
}
- PerlIO_binmode(aTHX_ fp, '<', O_BINARY, Nullch);
+ PerlIO_binmode(aTHX_ fp, '<', O_BINARY, NULL);
len = PerlIO_read(fp, tbuf, sizeof(tbuf));
(void)PerlIO_close(fp);
if (len <= 0) {
@@ -3511,7 +3511,7 @@ S_dooneliner(pTHX_ const char *cmd, const char *filename)
/* Need to save/restore 'PL_rs' ?? */
s = sv_gets(tmpsv, myfp, 0);
(void)PerlProc_pclose(myfp);
- if (s != Nullch) {
+ if (s != NULL) {
int e;
for (e = 1;
#ifdef HAS_SYS_ERRLIST
@@ -4753,7 +4753,7 @@ PP(pp_gservent)
#ifdef HAS_GETSERVBYNAME
const char * const proto = POPpbytex;
const char * const name = POPpbytex;
- sent = PerlSock_getservbyname(name, (proto && !*proto) ? Nullch : proto);
+ sent = PerlSock_getservbyname(name, (proto && !*proto) ? NULL : proto);
#else
DIE(aTHX_ PL_no_sock_func, "getservbyname");
#endif
@@ -4765,7 +4765,7 @@ PP(pp_gservent)
#ifdef HAS_HTONS
port = PerlSock_htons(port);
#endif
- sent = PerlSock_getservbyport(port, (proto && !*proto) ? Nullch : proto);
+ sent = PerlSock_getservbyport(port, (proto && !*proto) ? NULL : proto);
#else
DIE(aTHX_ PL_no_sock_func, "getservbyport");
#endif
diff --git a/regcomp.h b/regcomp.h
index 6a2a22d94e..46a114d002 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -15,7 +15,7 @@ typedef OP OP_4tree; /* Will be redefined later. */
* compile to execute that permits the execute phase to run lots faster on
* simple cases. They are:
*
- * regstart sv that must begin a match; Nullch if none obvious
+ * regstart sv that must begin a match; NULL if none obvious
* reganch is the match anchored (at beginning-of-line only)?
* regmust string (pointer into program) that match must include, or NULL
* [regmust changed to SV* for bminstr()--law]
diff --git a/regexec.c b/regexec.c
index fa13a58d8a..66d99bc09c 100644
--- a/regexec.c
+++ b/regexec.c
@@ -405,8 +405,8 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
char *t;
const int do_utf8 = sv ? SvUTF8(sv) : 0; /* if no sv we have to assume bytes */
I32 ml_anch;
- register char *other_last = Nullch; /* other substr checked before this */
- char *check_at = Nullch; /* check substr found at this pos */
+ register char *other_last = NULL; /* other substr checked before this */
+ char *check_at = NULL; /* check substr found at this pos */
const I32 multiline = prog->reganch & PMf_MULTILINE;
#ifdef DEBUGGING
const char * const i_strpos = strpos;
@@ -957,7 +957,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
fail:
DEBUG_EXECUTE_r(PerlIO_printf(Perl_debug_log, "%sMatch rejected by optimizer%s\n",
PL_colors[4], PL_colors[5]));
- return Nullch;
+ return NULL;
}
/* We know what class REx starts with. Try to find this position... */
@@ -1992,7 +1992,7 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char *
last = strend - len + 1;
else if (!multiline)
last = memEQ(strend - len, little, len)
- ? strend - len : Nullch;
+ ? strend - len : NULL;
else
goto find_last;
} else {
@@ -2131,7 +2131,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
&& (mg = mg_find(PL_reg_sv, PERL_MAGIC_regex_global)))) {
/* prepare for quick setting of pos */
sv_magic(PL_reg_sv, (SV*)0,
- PERL_MAGIC_regex_global, Nullch, 0);
+ PERL_MAGIC_regex_global, NULL, 0);
mg = mg_find(PL_reg_sv, PERL_MAGIC_regex_global);
mg->mg_len = -1;
}
@@ -2167,7 +2167,7 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
RX_MATCH_COPIED_off(prog);
}
else
- PL_reg_oldsaved = Nullch;
+ PL_reg_oldsaved = NULL;
prog->subbeg = PL_bostr;
prog->sublen = PL_regeol - PL_bostr; /* strend may have been modified */
}
@@ -2385,7 +2385,7 @@ S_regmatch(pTHX_ regnode *prog)
function of same name */
register I32 n; /* no or next */
register I32 ln = 0; /* len or last */
- register char *s = Nullch; /* operand or save */
+ register char *s = NULL; /* operand or save */
register char *locinput = PL_reginput;
register I32 c1 = 0, c2 = 0, paren; /* case fold search, parenth */
int minmod = 0, sw = 0, logical = 0;
@@ -4600,7 +4600,7 @@ STATIC I32
S_regrepeat_hard(pTHX_ regnode *p, I32 max, I32 *lp)
{
dVAR;
- register char *scan = Nullch;
+ register char *scan = NULL;
register char *start;
register char *loceol = PL_regeol;
I32 l = 0;
diff --git a/sv.c b/sv.c
index df47226eba..8778904e81 100644
--- a/sv.c
+++ b/sv.c
@@ -242,7 +242,7 @@ S_more_sv(pTHX)
if (PL_nice_chunk) {
sv_add_arena(PL_nice_chunk, PL_nice_chunk_size, 0);
- PL_nice_chunk = Nullch;
+ PL_nice_chunk = NULL;
PL_nice_chunk_size = 0;
}
else {
@@ -599,7 +599,7 @@ Perl_sv_free_arenas(pTHX)
PL_body_roots[i] = 0;
Safefree(PL_nice_chunk);
- PL_nice_chunk = Nullch;
+ PL_nice_chunk = NULL;
PL_nice_chunk_size = 0;
PL_sv_arenaroot = 0;
PL_sv_root = 0;
@@ -2925,7 +2925,7 @@ S_glob_assign(pTHX_ SV *dstr, SV *sstr, const int dtype)
/* don't upgrade SVt_PVLV: it can hold a glob */
if (dtype != SVt_PVLV)
sv_upgrade(dstr, SVt_PVGV);
- sv_magic(dstr, dstr, PERL_MAGIC_glob, Nullch, 0);
+ sv_magic(dstr, dstr, PERL_MAGIC_glob, NULL, 0);
GvSTASH(dstr) = GvSTASH(sstr);
if (GvSTASH(dstr))
Perl_sv_add_backref(aTHX_ (SV*)GvSTASH(dstr), dstr);
@@ -3042,7 +3042,7 @@ S_pvgv_assign(pTHX_ SV *dstr, SV *sstr) {
}
if (!intro)
cv_ckproto(cv, (GV*)dstr,
- SvPOK(sref) ? SvPVX_const(sref) : Nullch);
+ SvPOK(sref) ? SvPVX_const(sref) : NULL);
}
GvCV(dstr) = (CV*)sref;
GvCVGEN(dstr) = 0; /* Switch off cacheness. */
@@ -3780,7 +3780,7 @@ Perl_sv_force_normal_flags(pTHX_ register SV *sv, U32 flags)
const STRLEN len = SvCUR(sv);
SvFAKE_off(sv);
SvREADONLY_off(sv);
- SvPV_set(sv, Nullch);
+ SvPV_set(sv, NULL);
SvLEN_set(sv, 0);
SvGROW(sv, len + 1);
Move(pvx,SvPVX(sv),len,char);
@@ -5416,7 +5416,7 @@ Perl_sv_eq(pTHX_ register SV *sv1, register SV *sv2)
const char *pv2;
STRLEN cur2;
I32 eq = 0;
- char *tpv = Nullch;
+ char *tpv = NULL;
SV* svrecode = Nullsv;
if (!sv1) {
@@ -5509,7 +5509,7 @@ Perl_sv_cmp(pTHX_ register SV *sv1, register SV *sv2)
dVAR;
STRLEN cur1, cur2;
const char *pv1, *pv2;
- char *tpv = Nullch;
+ char *tpv = NULL;
I32 cmp;
SV *svrecode = Nullsv;
@@ -6053,7 +6053,7 @@ screamer2:
}
return_string_or_null:
- return (SvCUR(sv) - append) ? SvPVX(sv) : Nullch;
+ return (SvCUR(sv) - append) ? SvPVX(sv) : NULL;
}
/*
@@ -6791,7 +6791,7 @@ Perl_sv_reset(pTHX_ register const char *s, HV *stash)
SvOK_off(sv);
if (SvTYPE(sv) >= SVt_PV) {
SvCUR_set(sv, 0);
- if (SvPVX_const(sv) != Nullch)
+ if (SvPVX_const(sv) != NULL)
*SvPVX(sv) = '\0';
SvTAINT(sv);
}
@@ -6931,7 +6931,7 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **st, GV **gvp, I32 lref)
SV *tmpsv;
ENTER;
tmpsv = newSV(0);
- gv_efullname3(tmpsv, gv, Nullch);
+ gv_efullname3(tmpsv, gv, NULL);
/* XXX this is probably not what they think they're getting.
* It has the same effect as "sub name;", i.e. just a forward
* declaration! */
@@ -7246,7 +7246,7 @@ Copies a pointer into a new SV, optionally blessing the SV. The C<rv>
argument will be upgraded to an RV. That RV will be modified to point to
the new SV. If the C<pv> argument is NULL then C<PL_sv_undef> will be placed
into the SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<Nullch> to avoid the blessing. The new SV
+blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
will have a reference count of 1, and the RV will be returned.
Do not use with other Perl types such as HV, AV, SV, CV, because those
@@ -7276,7 +7276,7 @@ Perl_sv_setref_pv(pTHX_ SV *rv, const char *classname, void *pv)
Copies an integer into a new SV, optionally blessing the SV. The C<rv>
argument will be upgraded to an RV. That RV will be modified to point to
the new SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<Nullch> to avoid the blessing. The new SV
+blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
will have a reference count of 1, and the RV will be returned.
=cut
@@ -7295,7 +7295,7 @@ Perl_sv_setref_iv(pTHX_ SV *rv, const char *classname, IV iv)
Copies an unsigned integer into a new SV, optionally blessing the SV. The C<rv>
argument will be upgraded to an RV. That RV will be modified to point to
the new SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<Nullch> to avoid the blessing. The new SV
+blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
will have a reference count of 1, and the RV will be returned.
=cut
@@ -7314,7 +7314,7 @@ Perl_sv_setref_uv(pTHX_ SV *rv, const char *classname, UV uv)
Copies a double into a new SV, optionally blessing the SV. The C<rv>
argument will be upgraded to an RV. That RV will be modified to point to
the new SV. The C<classname> argument indicates the package for the
-blessing. Set C<classname> to C<Nullch> to avoid the blessing. The new SV
+blessing. Set C<classname> to C<NULL> to avoid the blessing. The new SV
will have a reference count of 1, and the RV will be returned.
=cut
@@ -7334,7 +7334,7 @@ Copies a string into a new SV, optionally blessing the SV. The length of the
string must be specified with C<n>. The C<rv> argument will be upgraded to
an RV. That RV will be modified to point to the new SV. The C<classname>
argument indicates the package for the blessing. Set C<classname> to
-C<Nullch> to avoid the blessing. The new SV will have a reference count
+C<NULL> to avoid the blessing. The new SV will have a reference count
of 1, and the RV will be returned.
Note that C<sv_setref_pv> copies the pointer while this copies the string.
@@ -7800,7 +7800,7 @@ S_F0convert(NV nv, char *endbuf, STRLEN *len)
*len = endbuf - p;
return p;
}
- return Nullch;
+ return NULL;
}
@@ -7940,7 +7940,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
U8 utf8buf[UTF8_MAXBYTES+1];
STRLEN esignlen = 0;
- const char *eptr = Nullch;
+ const char *eptr = NULL;
STRLEN elen = 0;
SV *vecsv = Nullsv;
const U8 *vecstr = Null(U8*);
@@ -9030,7 +9030,7 @@ Perl_re_dup(pTHX_ const REGEXP *r, CLONE_PARAMS *param)
if (RX_MATCH_COPIED(ret))
ret->subbeg = SAVEPVN(r->subbeg, r->sublen);
else
- ret->subbeg = Nullch;
+ ret->subbeg = NULL;
#ifdef PERL_OLD_COPY_ON_WRITE
ret->saved_copy = Nullsv;
#endif
@@ -9572,7 +9572,7 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param)
}
}
else {
- SvPV_set(dstr, Nullch);
+ SvPV_set(dstr, NULL);
AvALLOC((AV*)dstr) = (SV**)NULL;
}
break;
@@ -9620,7 +9620,7 @@ Perl_sv_dup(pTHX_ const SV *sstr, CLONE_PARAMS* param)
}
}
else {
- SvPV_set(dstr, Nullch);
+ SvPV_set(dstr, NULL);
}
/* Record stashes for possible cloning in Perl_clone(). */
if(hvname)
@@ -10492,7 +10492,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
if (proto_perl->Iop_mask)
PL_op_mask = SAVEPVN(proto_perl->Iop_mask, PL_maxo);
else
- PL_op_mask = Nullch;
+ PL_op_mask = NULL;
/* PL_asserting = proto_perl->Iasserting; */
/* current interpreter roots */
@@ -10510,7 +10510,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_lastfd = proto_perl->Ilastfd;
PL_oldname = proto_perl->Ioldname; /* XXX not quite right */
PL_Argv = NULL;
- PL_Cmd = Nullch;
+ PL_Cmd = NULL;
PL_gensym = proto_perl->Igensym;
PL_preambled = proto_perl->Ipreambled;
PL_preambleav = av_dup_inc(proto_perl->Ipreambleav, param);
@@ -10747,7 +10747,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_glob_index = proto_perl->Iglob_index;
PL_srand_called = proto_perl->Isrand_called;
PL_uudmap['M'] = 0; /* reinits on demand */
- PL_bitcount = Nullch; /* reinits on demand */
+ PL_bitcount = NULL; /* reinits on demand */
if (proto_perl->Ipsig_pend) {
Newxz(PL_psig_pend, SIG_SIZE, int);
@@ -10883,7 +10883,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_sortstash = hv_dup(proto_perl->Tsortstash, param);
PL_firstgv = gv_dup(proto_perl->Tfirstgv, param);
PL_secondgv = gv_dup(proto_perl->Tsecondgv, param);
- PL_efloatbuf = Nullch; /* reinits on demand */
+ PL_efloatbuf = NULL; /* reinits on demand */
PL_efloatsize = 0; /* reinits on demand */
/* regex stuff */
@@ -10894,26 +10894,26 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_lastscream = Nullsv;
PL_watchaddr = NULL;
- PL_watchok = Nullch;
+ PL_watchok = NULL;
PL_regdummy = proto_perl->Tregdummy;
- PL_regprecomp = Nullch;
+ PL_regprecomp = NULL;
PL_regnpar = 0;
PL_regsize = 0;
PL_colorset = 0; /* reinits PL_colors[] */
/*PL_colors[6] = {0,0,0,0,0,0};*/
- PL_reginput = Nullch;
- PL_regbol = Nullch;
- PL_regeol = Nullch;
+ PL_reginput = NULL;
+ PL_regbol = NULL;
+ PL_regeol = NULL;
PL_regstartp = (I32*)NULL;
PL_regendp = (I32*)NULL;
PL_reglastparen = (U32*)NULL;
PL_reglastcloseparen = (U32*)NULL;
- PL_regtill = Nullch;
+ PL_regtill = NULL;
PL_reg_start_tmp = (char**)NULL;
PL_reg_start_tmpl = 0;
PL_regdata = (struct reg_data*)NULL;
- PL_bostr = Nullch;
+ PL_bostr = NULL;
PL_reg_flags = 0;
PL_reg_eval_set = 0;
PL_regnarrate = 0;
@@ -10922,21 +10922,21 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_regcc = (CURCUR*)NULL;
PL_reg_call_cc = (struct re_cc_state*)NULL;
PL_reg_re = (regexp*)NULL;
- PL_reg_ganch = Nullch;
+ PL_reg_ganch = NULL;
PL_reg_sv = Nullsv;
PL_reg_match_utf8 = FALSE;
PL_reg_magic = (MAGIC*)NULL;
PL_reg_oldpos = 0;
PL_reg_oldcurpm = (PMOP*)NULL;
PL_reg_curpm = (PMOP*)NULL;
- PL_reg_oldsaved = Nullch;
+ PL_reg_oldsaved = NULL;
PL_reg_oldsavedlen = 0;
#ifdef PERL_OLD_COPY_ON_WRITE
PL_nrs = Nullsv;
#endif
PL_reg_maxiter = 0;
PL_reg_leftiter = 0;
- PL_reg_poscache = Nullch;
+ PL_reg_poscache = NULL;
PL_reg_poscache_size= 0;
/* RE engine - function pointers */
diff --git a/sv.h b/sv.h
index d8597ad001..f72db8409d 100644
--- a/sv.h
+++ b/sv.h
@@ -1054,7 +1054,7 @@ Taints an SV if tainting is enabled.
=cut
*/
-#define sv_taint(sv) sv_magic((sv), Nullsv, PERL_MAGIC_taint, Nullch, 0)
+#define sv_taint(sv) sv_magic((sv), Nullsv, PERL_MAGIC_taint, NULL, 0)
#define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(sv))
#define SvTAINTED_on(sv) STMT_START{ if(PL_tainting){sv_taint(sv);} }STMT_END
diff --git a/thrdvar.h b/thrdvar.h
index e12e85f317..18c426ce2e 100644
--- a/thrdvar.h
+++ b/thrdvar.h
@@ -196,7 +196,7 @@ PERLVAR(Treg_oldsaved, char*) /* old saved substr during match */
PERLVAR(Treg_oldsavedlen, STRLEN) /* old length of saved substr during match */
PERLVAR(Treg_maxiter, I32) /* max wait until caching pos */
PERLVAR(Treg_leftiter, I32) /* wait until caching pos */
-PERLVARI(Treg_poscache, char *, Nullch) /* cache of pos of WHILEM */
+PERLVARI(Treg_poscache, char *, NULL) /* cache of pos of WHILEM */
PERLVAR(Treg_poscache_size, STRLEN) /* size of pos cache of WHILEM */
PERLVARI(Tpeepp, peep_t, MEMBER_TO_FPTR(Perl_peep))
diff --git a/toke.c b/toke.c
index 95f86fa372..db51dbcbec 100644
--- a/toke.c
+++ b/toke.c
@@ -288,7 +288,7 @@ S_tokereport(pTHX_ I32 rv)
{
dVAR;
if (DEBUG_T_TEST) {
- const char *name = Nullch;
+ const char *name = NULL;
enum token_type type = TOKENTYPE_NONE;
const struct debug_tokens *p;
SV* const report = newSVpvs("<== ");
@@ -623,7 +623,7 @@ Perl_lex_start(pTHX_ SV *line)
SvTEMP_off(PL_linestr);
PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = PL_linestart = SvPVX(PL_linestr);
PL_bufend = PL_bufptr + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
PL_rsfp = 0;
}
@@ -786,7 +786,7 @@ S_skipspace(pTHX_ register char *s)
/* try to recharge the buffer */
if ((s = filter_gets(PL_linestr, PL_rsfp,
- (prevlen = SvCUR(PL_linestr)))) == Nullch)
+ (prevlen = SvCUR(PL_linestr)))) == NULL)
{
/* end of file. Add on the -p or -n magic */
if (PL_minus_p) {
@@ -805,7 +805,7 @@ S_skipspace(pTHX_ register char *s)
PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = s = PL_linestart
= SvPVX(PL_linestr);
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
/* Close the filehandle. Could be from -P preprocessor,
* STDIN, or a regular file. If we were reading code from
@@ -1285,7 +1285,7 @@ S_sublex_push(pTHX)
PL_bufend = PL_bufptr = PL_oldbufptr = PL_oldoldbufptr = PL_linestart
= SvPVX(PL_linestr);
PL_bufend += SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
SAVEFREESV(PL_linestr);
PL_lex_dojoin = FALSE;
@@ -1336,7 +1336,7 @@ S_sublex_done(pTHX)
PL_lex_inpat = 0;
PL_bufend = PL_bufptr = PL_oldbufptr = PL_oldoldbufptr = PL_linestart = SvPVX(PL_linestr);
PL_bufend += SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
SAVEFREESV(PL_linestr);
PL_lex_dojoin = FALSE;
PL_lex_brackets = 0;
@@ -1788,7 +1788,7 @@ S_scan_const(pTHX_ char *start)
goto NUM_ESCAPE_INSERT;
}
res = newSVpvn(s + 1, e - s - 1);
- res = new_constant( Nullch, 0, "charnames",
+ res = new_constant( NULL, 0, "charnames",
res, Nullsv, "\\N{...}" );
if (has_utf8)
sv_utf8_upgrade(res);
@@ -2356,7 +2356,7 @@ S_filter_gets(pTHX_ register SV *sv, register PerlIO *fp, STRLEN append)
if (FILTER_READ(0, sv, 0) > 0)
return ( SvPVX(sv) ) ;
else
- return Nullch ;
+ return NULL ;
}
else
return (sv_gets(sv, fp, append));
@@ -2758,7 +2758,7 @@ Perl_yylex(pTHX)
sv_catpvs(PL_linestr, "\n");
PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
if (PERLDB_LINE && PL_curstash != PL_debstash) {
SV * const sv = newSV(0);
@@ -2772,7 +2772,7 @@ Perl_yylex(pTHX)
}
do {
bof = PL_rsfp ? TRUE : FALSE;
- if ((s = filter_gets(PL_linestr, PL_rsfp, 0)) == Nullch) {
+ if ((s = filter_gets(PL_linestr, PL_rsfp, 0)) == NULL) {
fake_eof:
if (PL_rsfp) {
if (PL_preprocess && !PL_in_eval)
@@ -2789,12 +2789,12 @@ Perl_yylex(pTHX)
? ";}continue{print;}" : ";}");
PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
PL_minus_n = PL_minus_p = 0;
goto retry;
}
PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
sv_setpvn(PL_linestr,"",0);
TOKEN(';'); /* not infinite loop because rsfp is NULL now */
}
@@ -2839,7 +2839,7 @@ Perl_yylex(pTHX)
sv_setpvn(PL_linestr, "", 0);
PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
PL_doextract = FALSE;
}
}
@@ -2856,13 +2856,13 @@ Perl_yylex(pTHX)
av_store(CopFILEAVx(PL_curcop),(I32)CopLINE(PL_curcop),sv);
}
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
if (CopLINE(PL_curcop) == 1) {
while (s < PL_bufend && isSPACE(*s))
s++;
if (*s == ':' && s[1] != ':') /* for csh execing sh scripts */
s++;
- d = Nullch;
+ d = NULL;
if (!PL_in_eval) {
if (*s == '#' && *(s+1) == '!')
d = s + 2;
@@ -2935,7 +2935,7 @@ Perl_yylex(pTHX)
}
}
if (d < ipath)
- d = Nullch;
+ d = NULL;
}
#endif
}
@@ -2954,7 +2954,7 @@ Perl_yylex(pTHX)
while (*c && !strchr("; \t\r\n\f\v#", *c))
c++;
if (c < d)
- d = Nullch; /* "perl" not in first word; ignore */
+ d = NULL; /* "perl" not in first word; ignore */
else
*s = '#'; /* Don't try to parse shebang line */
}
@@ -3026,7 +3026,7 @@ Perl_yylex(pTHX)
sv_setpvn(PL_linestr, "", 0);
PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
PL_preambled = FALSE;
if (PERLDB_LINE)
(void)gv_fetchfile(PL_origfilename);
@@ -9869,7 +9869,7 @@ S_scan_heredoc(pTHX_ register char *s)
sv_setsv(PL_linestr,herewas);
PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = s = PL_linestart = SvPVX(PL_linestr);
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
}
else
sv_setpvn(tmpstr,"",0); /* avoid "uninitialized" warning */
@@ -9881,7 +9881,7 @@ S_scan_heredoc(pTHX_ register char *s)
}
CopLINE_inc(PL_curcop);
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
#ifndef PERL_STRICT_CR
if (PL_bufend - PL_linestart >= 2) {
if ((PL_bufend[-2] == '\r' && PL_bufend[-1] == '\n') ||
@@ -10366,7 +10366,7 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
!(PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = filter_gets(PL_linestr, PL_rsfp, 0))) {
sv_free(sv);
CopLINE_set(PL_curcop, (line_t)PL_multi_start);
- return Nullch;
+ return NULL;
}
/* we read a line, so increment our line counter */
CopLINE_inc(PL_curcop);
@@ -10384,7 +10384,7 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
/* having changed the buffer, we must update PL_bufend */
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
}
/* at this point, we have successfully read the delimited string */
@@ -10877,7 +10877,7 @@ S_scan_formline(pTHX_ register char *s)
s = filter_gets(PL_linestr, PL_rsfp, 0);
PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = PL_linestart = SvPVX(PL_linestr);
PL_bufend = PL_bufptr + SvCUR(PL_linestr);
- PL_last_lop = PL_last_uni = Nullch;
+ PL_last_lop = PL_last_uni = NULL;
if (!s) {
s = PL_bufptr;
break;
diff --git a/util.c b/util.c
index 636b06d922..b70d3154a4 100644
--- a/util.c
+++ b/util.c
@@ -92,7 +92,7 @@ Perl_safesysmalloc(MEM_SIZE size)
ptr = (Malloc_t)PerlMem_malloc(size?size:1); /* malloc(0) is NASTY on our system */
PERL_ALLOC_CHECK(ptr);
DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05ld) malloc %ld bytes\n",PTR2UV(ptr),(long)PL_an++,(long)size));
- if (ptr != Nullch) {
+ if (ptr != NULL) {
#ifdef PERL_TRACK_MEMPOOL
((struct perl_memory_debug_header *)ptr)->interpreter = aTHX;
# ifdef PERL_POISON
@@ -104,7 +104,7 @@ Perl_safesysmalloc(MEM_SIZE size)
return ptr;
}
else if (PL_nomemok)
- return Nullch;
+ return NULL;
else {
return write_no_mem();
}
@@ -162,14 +162,14 @@ Perl_safesysrealloc(Malloc_t where,MEM_SIZE size)
DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05ld) rfree\n",PTR2UV(where),(long)PL_an++));
DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05ld) realloc %ld bytes\n",PTR2UV(ptr),(long)PL_an++,(long)size));
- if (ptr != Nullch) {
+ if (ptr != NULL) {
#ifdef PERL_TRACK_MEMPOOL
ptr = (Malloc_t)((char*)ptr+sTHX);
#endif
return ptr;
}
else if (PL_nomemok)
- return Nullch;
+ return NULL;
else {
return write_no_mem();
}
@@ -239,7 +239,7 @@ Perl_safesyscalloc(MEM_SIZE count, MEM_SIZE size)
ptr = (Malloc_t)PerlMem_malloc(size?size:1); /* malloc(0) is NASTY on our system */
PERL_ALLOC_CHECK(ptr);
DEBUG_m(PerlIO_printf(Perl_debug_log, "0x%"UVxf": (%05ld) calloc %ld x %ld bytes\n",PTR2UV(ptr),(long)PL_an++,(long)count,(long)size));
- if (ptr != Nullch) {
+ if (ptr != NULL) {
memset((void*)ptr, 0, size);
#ifdef PERL_TRACK_MEMPOOL
((struct perl_memory_debug_header *)ptr)->interpreter = aTHX;
@@ -252,7 +252,7 @@ Perl_safesyscalloc(MEM_SIZE count, MEM_SIZE size)
return ptr;
}
else if (PL_nomemok)
- return Nullch;
+ return NULL;
return write_no_mem();
}
@@ -334,7 +334,7 @@ Perl_instr(pTHX_ register const char *big, register const char *little)
continue;
for (x=big,s=little; *s; /**/ ) {
if (!*x)
- return Nullch;
+ return NULL;
if (*s != *x)
break;
else {
@@ -345,7 +345,7 @@ Perl_instr(pTHX_ register const char *big, register const char *little)
if (!*s)
return (char*)(big-1);
}
- return Nullch;
+ return NULL;
}
/* same as instr but allow embedded nulls */
@@ -370,7 +370,7 @@ Perl_ninstr(pTHX_ const char *big, const char *bigend, const char *little, const
return (char*)(big-1);
}
}
- return Nullch;
+ return NULL;
}
/* reverse of the above--find last substring */
@@ -401,7 +401,7 @@ Perl_rninstr(pTHX_ register const char *big, const char *bigend, const char *lit
if (s >= littleend)
return (char*)(big+1);
}
- return Nullch;
+ return NULL;
}
#define FBM_TABLE_OFFSET 2 /* Number of bytes between EOS and table*/
@@ -461,7 +461,7 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags)
s--, i++;
}
}
- sv_magic(sv, Nullsv, PERL_MAGIC_bm, Nullch, 0); /* deep magic */
+ sv_magic(sv, Nullsv, PERL_MAGIC_bm, NULL, 0); /* deep magic */
SvVALID_on(sv);
s = (const unsigned char*)(SvPVX_const(sv)); /* deeper magic */
@@ -488,7 +488,7 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags)
=for apidoc fbm_instr
Returns the location of the SV in the string delimited by C<str> and
-C<strend>. It returns C<Nullch> if the string can't be found. The C<sv>
+C<strend>. It returns C<NULL> if the string can't be found. The C<sv>
does not have to be fbm_compiled, but the search will not be as fast
then.
@@ -512,7 +512,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
|| (*big == *little &&
memEQ((char *)big, (char *)little, littlelen - 1))))
return (char*)big;
- return Nullch;
+ return NULL;
}
if (littlelen <= 2) { /* Special-cased */
@@ -532,7 +532,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
}
if (SvTAIL(littlestr))
return (char *) bigend;
- return Nullch;
+ return NULL;
}
if (!littlelen)
return (char*)big; /* Cannot be SvTAIL! */
@@ -543,7 +543,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
return (char*)bigend - 2;
if (bigend[-1] == *little)
return (char*)bigend - 1;
- return Nullch;
+ return NULL;
}
{
/* This should be better than FBM if c1 == c2, and almost
@@ -596,7 +596,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
check_1char_anchor: /* One char and anchor! */
if (SvTAIL(littlestr) && (*bigend == *little))
return (char *)bigend; /* bigend is already decremented. */
- return Nullch;
+ return NULL;
}
if (SvTAIL(littlestr) && !multiline) { /* tail anchored? */
s = bigend - littlelen;
@@ -611,7 +611,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
{
return (char*)s + 1; /* how sweet it is */
}
- return Nullch;
+ return NULL;
}
if (SvTYPE(littlestr) != SVt_PVBM || !SvVALID(littlestr)) {
char * const b = ninstr((char*)big,(char*)bigend,
@@ -625,7 +625,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
{
return (char*)s;
}
- return Nullch;
+ return NULL;
}
return b;
}
@@ -635,7 +635,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
register const unsigned char *oldlittle;
if (littlelen > (STRLEN)(bigend - big))
- return Nullch;
+ return NULL;
--littlelen; /* Last char found by table lookup */
s = big + littlelen;
@@ -672,7 +672,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit
&& memEQ((char *)(bigend - littlelen),
(char *)(oldlittle - littlelen), littlelen) )
return (char*)bigend - littlelen;
- return Nullch;
+ return NULL;
}
}
@@ -715,7 +715,7 @@ Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift
first = *little++;
goto check_tail;
}
- return Nullch;
+ return NULL;
}
little = (const unsigned char *)(SvPVX_const(littlestr));
@@ -735,7 +735,7 @@ Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift
if (previous + start_shift == stop_pos + 1) /* A fake '\n'? */
goto check_tail;
#endif
- return Nullch;
+ return NULL;
}
while (pos < previous + start_shift) {
if (!(pos += PL_screamnext[pos]))
@@ -763,7 +763,7 @@ Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift
return (char *)(big+(*old_posp));
check_tail:
if (!SvTAIL(littlestr) || (end_shift > 0))
- return Nullch;
+ return NULL;
/* Ignore the trailing "\n". This code is not microoptimized */
big = (const unsigned char *)(SvPVX_const(bigstr) + SvCUR(bigstr));
stop_pos = littleend - little; /* Actual littlestr len */
@@ -774,7 +774,7 @@ Perl_screaminstr(pTHX_ SV *bigstr, SV *littlestr, I32 start_shift, I32 end_shift
&& ((stop_pos == 1) ||
memEQ((char *)(big + 1), (char *)little, stop_pos - 1)))
return (char*)big;
- return Nullch;
+ return NULL;
}
I32
@@ -823,7 +823,7 @@ char *
Perl_savepv(pTHX_ const char *pv)
{
if (!pv)
- return Nullch;
+ return NULL;
else {
char *newaddr;
const STRLEN pvlen = strlen(pv)+1;
@@ -877,7 +877,7 @@ Perl_savesharedpv(pTHX_ const char *pv)
register char *newaddr;
STRLEN pvlen;
if (!pv)
- return Nullch;
+ return NULL;
pvlen = strlen(pv)+1;
newaddr = (char*)PerlMemShared_malloc(pvlen);
@@ -1201,7 +1201,7 @@ S_vdie_croak_common(pTHX_ const char* pat, va_list* args, STRLEN* msglen,
*utf8 = SvUTF8(msv);
}
else {
- message = Nullch;
+ message = NULL;
}
DEBUG_S(PerlIO_printf(Perl_debug_log,
@@ -1309,11 +1309,11 @@ function. Calling C<croak> returns control directly to Perl,
sidestepping the normal C order of execution. See C<warn>.
If you want to throw an exception object, assign the object to
-C<$@> and then pass C<Nullch> to croak():
+C<$@> and then pass C<NULL> to croak():
errsv = get_sv("@", TRUE);
sv_setsv(errsv, exception_object);
- croak(Nullch);
+ croak(NULL);
=cut
*/
@@ -1517,7 +1517,7 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
tmpenv[j] = (char*)safesysmalloc((len+1)*sizeof(char));
Copy(environ[j], tmpenv[j], len+1, char);
}
- tmpenv[max] = Nullch;
+ tmpenv[max] = NULL;
environ = tmpenv; /* tell exec where it is now */
}
if (!val) {
@@ -1530,7 +1530,7 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
}
if (!environ[i]) { /* does not exist yet */
environ = (char**)safesysrealloc(environ, (i+2) * sizeof(char*));
- environ[i+1] = Nullch; /* make sure it's null terminated */
+ environ[i+1] = NULL; /* make sure it's null terminated */
}
else
safesysfree(environ[i]);
@@ -2871,8 +2871,8 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
const char *const *const search_ext, I32 flags)
{
dVAR;
- const char *xfound = Nullch;
- char *xfailed = Nullch;
+ const char *xfound = NULL;
+ char *xfailed = NULL;
char tmpbuf[MAXPATHLEN];
register char *s;
I32 len = 0;
@@ -2894,7 +2894,7 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
static const char *const exts[] = { SEARCH_EXTS };
const char *const *const ext = search_ext ? search_ext : exts;
int extidx = 0, i = 0;
- const char *curext = Nullch;
+ const char *curext = NULL;
#else
PERL_UNUSED_ARG(search_ext);
# define MAX_EXT_LEN 0
@@ -2927,13 +2927,13 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
int idx = 0, deftypes = 1;
bool seen_dot = 1;
- const int hasdir = !dosearch || (strpbrk(scriptname,":[</") != Nullch);
+ const int hasdir = !dosearch || (strpbrk(scriptname,":[</") != NULL);
# else
if (dosearch) {
int idx = 0, deftypes = 1;
bool seen_dot = 1;
- const int hasdir = (strpbrk(scriptname,":[</") != Nullch);
+ const int hasdir = (strpbrk(scriptname,":[</") != NULL);
# endif
/* The first time through, just add SEARCH_EXTS to whatever we
* already have, so we can check for default file types. */
@@ -3094,12 +3094,12 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
(xfailed ? "" : " on PATH"),
(xfailed || seen_dot) ? "" : ", '.' not in PATH");
}
- scriptname = Nullch;
+ scriptname = NULL;
}
Safefree(xfailed);
scriptname = xfound;
}
- return (scriptname ? savepv(scriptname) : Nullch);
+ return (scriptname ? savepv(scriptname) : NULL);
}
#ifndef PERL_GET_CONTEXT_DEFINED