summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2022-12-24 20:35:02 +0000
committerJames E Keenan <jkeenan@cpan.org>2022-12-29 09:39:58 -0500
commit0c6362adf0496a5a25d8b78534541f988ac9ce16 (patch)
tree2568e25b5103297354fd1cdd9f80b8ec71871b76
parentf4ae97d054e8c75132cb621539374553cf48f64d (diff)
downloadperl-0c6362adf0496a5a25d8b78534541f988ac9ce16.tar.gz
Correct typos as per GH 20435
In GH 20435 many typos in our C code were corrected. However, this pull request was not applied to blead and developed merge conflicts. I extracted diffs for the individual modified files and applied them with 'git apply', excepting four files where patch conflicts were reported. Those files were: handy.h locale.c regcomp.c toke.c We can handle these in a subsequent commit. Also, had to run these two programs to keep 'make test_porting' happy: $ ./perl -Ilib regen/uconfig_h.pl $ ./perl -Ilib regen/regcomp.pl regnodes.h
-rw-r--r--Porting/config_H2
-rw-r--r--amigaos4/amigaio.c2
-rw-r--r--av.c6
-rwxr-xr-xconfig_h.SH2
-rw-r--r--cop.h2
-rw-r--r--doio.c2
-rw-r--r--gv.c14
-rw-r--r--hv.c8
-rw-r--r--inline.h10
-rw-r--r--intrpvar.h2
-rw-r--r--malloc.c2
-rw-r--r--numeric.c2
-rw-r--r--op.c6
-rw-r--r--pad.c6
-rw-r--r--peep.c6
-rw-r--r--perl.c4
-rw-r--r--perl.h2
-rw-r--r--perlapi.h2
-rw-r--r--perlio.c2
-rw-r--r--pp.c4
-rw-r--r--regcomp.h2
-rw-r--r--regexec.c24
-rw-r--r--regexp.h2
-rw-r--r--sv.c20
-rw-r--r--sv.h8
-rw-r--r--uconfig.h4
-rw-r--r--utf8.c6
-rw-r--r--utfebcdic.h2
-rw-r--r--util.c8
-rw-r--r--win32/config_H.gc2
-rw-r--r--win32/config_H.vc2
-rw-r--r--win32/fcrypt.c2
-rw-r--r--win32/perlhost.h2
-rw-r--r--win32/perllib.c2
-rw-r--r--win32/vmem.h2
-rw-r--r--win32/win32.c4
-rw-r--r--win32/win32.h2
37 files changed, 90 insertions, 90 deletions
diff --git a/Porting/config_H b/Porting/config_H
index 058be5def1..1fb9f5720a 100644
--- a/Porting/config_H
+++ b/Porting/config_H
@@ -3519,7 +3519,7 @@
/* HAS_WCSXFRM:
* This symbol, if defined, indicates that the wcsxfrm routine is
- * available to tranform a wide character string for wcscmp().
+ * available to transform a wide character string for wcscmp().
*/
#define HAS_WCSXFRM /**/
diff --git a/amigaos4/amigaio.c b/amigaos4/amigaio.c
index e51186c958..698165fe6b 100644
--- a/amigaos4/amigaio.c
+++ b/amigaos4/amigaio.c
@@ -249,7 +249,7 @@ PerlIO *Perl_my_popen(pTHX_ const char *cmd, const char *mode)
}
/* Our new process is running and will close it streams etc
- * once its done. All we need to is open the pipe via stdio
+ * once it's done. All we need to is open the pipe via stdio
*/
return result;
diff --git a/av.c b/av.c
index 058922de9d..ae902dd3ec 100644
--- a/av.c
+++ b/av.c
@@ -287,11 +287,11 @@ Perl_av_fetch(pTHX_ AV *av, SSize_t key, I32 lval)
if ((Size_t)key >= (Size_t)size) {
if (UNLIKELY(neg))
return NULL;
- goto emptyness;
+ goto emptiness;
}
if (!AvARRAY(av)[key]) {
- emptyness:
+ emptiness:
return lval ? av_store(av,key,newSV_type(SVt_NULL)) : NULL;
}
@@ -655,7 +655,7 @@ void
Perl_av_undef(pTHX_ AV *av)
{
bool real;
- SSize_t orig_ix = PL_tmps_ix; /* silence bogus warning about possible unitialized use */
+ SSize_t orig_ix = PL_tmps_ix; /* silence bogus warning about possible uninitialized use */
PERL_ARGS_ASSERT_AV_UNDEF;
assert(SvTYPE(av) == SVt_PVAV);
diff --git a/config_h.SH b/config_h.SH
index a32223d83c..5b0104003a 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -3629,7 +3629,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
/* HAS_WCSXFRM:
* This symbol, if defined, indicates that the wcsxfrm routine is
- * available to tranform a wide character string for wcscmp().
+ * available to transform a wide character string for wcscmp().
*/
#$d_wcsxfrm HAS_WCSXFRM /**/
diff --git a/cop.h b/cop.h
index 618e5724d9..4499a9a4ab 100644
--- a/cop.h
+++ b/cop.h
@@ -914,7 +914,7 @@ struct block_loop {
} lazyiv;
struct { /* CXt_LOOP_LAZYSV C<for ('a'..'z')> */
SV * cur;
- SV * end; /* maxiumum value (or minimum in reverse) */
+ SV * end; /* maximum value (or minimum in reverse) */
} lazysv;
} state_u;
#ifdef USE_ITHREADS
diff --git a/doio.c b/doio.c
index 22037d4fed..48deb13d6a 100644
--- a/doio.c
+++ b/doio.c
@@ -2794,7 +2794,7 @@ nothing in the core.
{
/* Under AmigaOS4 unlink only 'fails' if the filename is invalid */
/* It may not remove the file if it's Locked, so check if it's still */
- /* arround */
+ /* around */
if((access(s,F_OK) != -1))
{
tot--;
diff --git a/gv.c b/gv.c
index 80710647d0..7449e850fd 100644
--- a/gv.c
+++ b/gv.c
@@ -1194,12 +1194,12 @@ Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN le
}
else if ( sep_len >= 7 &&
strBEGINs(last_separator - 7, "::SUPER")) {
- /* don't autovifify if ->NoSuchStash::SUPER::method */
+ /* don't autovivify if ->NoSuchStash::SUPER::method */
stash = gv_stashpvn(origname, sep_len - 7, is_utf8);
if (stash) flags |= GV_SUPER;
}
else {
- /* don't autovifify if ->NoSuchStash::method */
+ /* don't autovivify if ->NoSuchStash::method */
stash = gv_stashpvn(origname, sep_len, is_utf8);
}
ostash = stash;
@@ -2939,12 +2939,12 @@ Perl_gp_free(pTHX_ GV *gv)
simple problems likely found by fuzzers but never written by humans,
whilst leaving working code unchanged. */
if (sv) {
- SV *referant;
+ SV *referent;
if (SvREFCNT(sv) > 1 || SvOBJECT(sv) || UNLIKELY(in_global_destruction)) {
SvREFCNT_dec_NN(sv);
sv = NULL;
- } else if (SvROK(sv) && (referant = SvRV(sv))
- && (SvREFCNT(referant) > 1 || SvOBJECT(referant))) {
+ } else if (SvROK(sv) && (referent = SvRV(sv))
+ && (SvREFCNT(referent) > 1 || SvOBJECT(referent))) {
SvREFCNT_dec_NN(sv);
sv = NULL;
} else {
@@ -3134,7 +3134,7 @@ Perl_Gv_AMupdate(pTHX_ HV *stash, bool destructing)
sv_unmagic(MUTABLE_SV(stash), PERL_MAGIC_overload_table);
}
- DEBUG_o( Perl_deb(aTHX_ "Recalcing overload magic in package %s\n",HvNAME_get(stash)) );
+ DEBUG_o( Perl_deb(aTHX_ "Recalculating overload magic in package %s\n",HvNAME_get(stash)) );
Zero(&amt,1,AMT);
amt.was_ok_sub = newgen;
@@ -4028,7 +4028,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
}
#endif
/* Since we use shallow copy during assignment, we need
- * to dublicate the contents, probably calling user-supplied
+ * to duplicate the contents, probably calling user-supplied
* version of copy operator
*/
/* We need to copy in following cases:
diff --git a/hv.c b/hv.c
index 669f766705..8dfafb32cc 100644
--- a/hv.c
+++ b/hv.c
@@ -593,7 +593,7 @@ Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
for (i = 0; i < klen; ++i)
if (isLOWER(key[i])) {
/* Would be nice if we had a routine to do the
- copy and upercase in a single pass through. */
+ copy and uppercase in a single pass through. */
const char * const nkey = strupr(savepvn(key,klen));
/* Note that this fetch is for nkey (the uppercased
key) whereas the store is for key (the original) */
@@ -2226,7 +2226,7 @@ void
Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags)
{
bool save;
- SSize_t orig_ix = PL_tmps_ix; /* silence compiler warning about unitialized vars */
+ SSize_t orig_ix = PL_tmps_ix; /* silence compiler warning about uninitialized vars */
if (!hv)
return;
@@ -3365,7 +3365,7 @@ S_share_hek_flags(pTHX_ const char *str, STRLEN len, U32 hash, int flags)
if (!entry) {
/* What used to be head of the list.
If this is NULL, then we're the first entry for this slot, which
- means we need to increate fill. */
+ means we need to create fill. */
struct shared_he *new_entry;
HEK *hek;
char *k;
@@ -4016,7 +4016,7 @@ Upon return, C<*flags> will be set to either C<SVf_UTF8> or 0.
Alternatively, use the macro C<L</CopLABEL_len_flags>>;
or if you don't need to know if the label is UTF-8 or not, the macro
C<L</CopLABEL_len>>;
-or if you additionally dont need to know the length, C<L</CopLABEL>>.
+or if you additionally don't need to know the length, C<L</CopLABEL>>.
=cut
*/
diff --git a/inline.h b/inline.h
index 49cae2738b..c72957a97b 100644
--- a/inline.h
+++ b/inline.h
@@ -1454,7 +1454,7 @@ Perl_is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
* This uses adaptations of the table and algorithm given in
* https://bjoern.hoehrmann.de/utf-8/decoder/dfa/, which provides comprehensive
* documentation of the original version. A copyright notice for the original
- * version is given at the beginning of this file. The Perl adapations are
+ * version is given at the beginning of this file. The Perl adaptations are
* documented at the definition of PL_extended_utf8_dfa_tab[].
*
* This dfa is fast. There are three exit conditions:
@@ -1567,7 +1567,7 @@ machines) is a valid UTF-8 character.
This uses an adaptation of the table and algorithm given in
https://bjoern.hoehrmann.de/utf-8/decoder/dfa/, which provides comprehensive
documentation of the original version. A copyright notice for the original
-version is given at the beginning of this file. The Perl adapation is
+version is given at the beginning of this file. The Perl adaptation is
documented at the definition of PL_extended_utf8_dfa_tab[].
*/
@@ -1636,7 +1636,7 @@ C<L</is_strict_utf8_string_loclen>> to check entire strings.
This uses an adaptation of the tables and algorithm given in
https://bjoern.hoehrmann.de/utf-8/decoder/dfa/, which provides comprehensive
documentation of the original version. A copyright notice for the original
-version is given at the beginning of this file. The Perl adapation is
+version is given at the beginning of this file. The Perl adaptation is
documented at the definition of strict_extended_utf8_dfa_tab[].
*/
@@ -1691,7 +1691,7 @@ C<L</is_c9strict_utf8_string_loclen>> to check entire strings.
This uses an adaptation of the tables and algorithm given in
https://bjoern.hoehrmann.de/utf-8/decoder/dfa/, which provides comprehensive
documentation of the original version. A copyright notice for the original
-version is given at the beginning of this file. The Perl adapation is
+version is given at the beginning of this file. The Perl adaptation is
documented at the definition of PL_c9_utf8_dfa_tab[].
*/
@@ -2428,7 +2428,7 @@ Perl_utf8n_to_uvchr_msgs(const U8 *s,
* https://bjoern.hoehrmann.de/utf-8/decoder/dfa/, which provides
* comprehensive documentation of the original version. A copyright notice
* for the original version is given at the beginning of this file. The
- * Perl adapation is documented at the definition of PL_strict_utf8_dfa_tab[].
+ * Perl adaptation is documented at the definition of PL_strict_utf8_dfa_tab[].
*/
const U8 * const s0 = s;
diff --git a/intrpvar.h b/intrpvar.h
index d0168adc7c..0560e0a3b8 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -58,7 +58,7 @@ PERLVARI(I, sub_generation, U32, 1) /* incr to invalidate method cache */
#ifdef PERL_HASH_RANDOMIZE_KEYS
#ifdef USE_PERL_PERTURB_KEYS
-PERLVARI(I, hash_rand_bits_enabled, U8, 1) /* used to randomize hash stuff 0 == no-random, 1 == random, 2 == determinsitic */
+PERLVARI(I, hash_rand_bits_enabled, U8, 1) /* used to randomize hash stuff 0 == no-random, 1 == random, 2 == deterministic */
#endif
PERLVARI(I, hash_rand_bits, UV, 0) /* used to randomize hash stuff */
#endif
diff --git a/malloc.c b/malloc.c
index 396cf3f368..022b664682 100644
--- a/malloc.c
+++ b/malloc.c
@@ -583,7 +583,7 @@ static const u_short buck_size[MAX_BUCKET_BY_TABLE + 1] =
*
* This allows for an additional optimization: the above scheme leads
* to giant overheads for sizes 128 or more (one whole chunk needs to
- * be sacrifised to keep INDEX). Instead we use chunks not of size
+ * be sacrificed to keep INDEX). Instead we use chunks not of size
* 2^k, but of size 2^k-ALIGN. If we pack these chunks at the end of
* the arena, then the beginnings are still in different 2^k-long
* sections of the arena if k>=7 for ALIGN==4, and k>=8 if ALIGN=8.
diff --git a/numeric.c b/numeric.c
index 84d2319053..59c9468fc7 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1277,7 +1277,7 @@ no leading zeros). Otherwise it returns TRUE, and sets C<*valptr> to that
value.
If you constrain the portion of C<pv> that is looked at by this function (by
-passing a non-NULL C<endptr>), and if the intial bytes of that portion form a
+passing a non-NULL C<endptr>), and if the initial bytes of that portion form a
valid value, it will return TRUE, setting C<*endptr> to the byte following the
final digit of the value. But if there is no constraint at what's looked at,
all of C<pv> must be valid in order for TRUE to be returned. C<*endptr> is
diff --git a/op.c b/op.c
index 887f2fc7ad..b73425b344 100644
--- a/op.c
+++ b/op.c
@@ -6098,7 +6098,7 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl)
* of UTF-8 bytes to represent as every other code point in the same
* partition.
*
- * This partioning has been pre-compiled. Copy it to initialize */
+ * This partitioning has been pre-compiled. Copy it to initialize */
len = C_ARRAY_LENGTH(PL_partition_by_byte_length);
invlist_extend(t_invlist, len);
t_array = invlist_array(t_invlist);
@@ -8911,7 +8911,7 @@ Perl_newRANGE(pTHX_ I32 flags, OP *left, OP *right)
flip->op_private = left->op_type == OP_CONST ? OPpFLIP_LINENUM : 0;
flop->op_private = right->op_type == OP_CONST ? OPpFLIP_LINENUM : 0;
- /* check barewords before they might be optimized aways */
+ /* check barewords before they might be optimized away */
if (flip->op_private && cSVOPx(left)->op_private & OPpCONST_STRICT)
no_bareword_allowed(left);
if (flop->op_private && cSVOPx(right)->op_private & OPpCONST_STRICT)
@@ -9679,7 +9679,7 @@ Perl_newDEFEROP(pTHX_ I32 flags, OP *block)
start = LINKLIST(block);
- /* Hide the block inside an OP_NULL with no exection */
+ /* Hide the block inside an OP_NULL with no execution */
block = newUNOP(OP_NULL, 0, block);
block->op_next = block;
diff --git a/pad.c b/pad.c
index 9c97f253a9..38adb031f2 100644
--- a/pad.c
+++ b/pad.c
@@ -302,7 +302,7 @@ void
Perl_cv_undef_flags(pTHX_ CV *cv, U32 flags)
{
CV cvbody;/*CV body will never be realloced inside this func,
- so dont read it more than once, use fake CV so existing macros
+ so don't read it more than once, use fake CV so existing macros
will work, the indirection and CV head struct optimized away*/
SvANY(&cvbody) = SvANY(cv);
@@ -357,7 +357,7 @@ Perl_cv_undef_flags(pTHX_ CV *cv, U32 flags)
#endif
}
}
- else { /* dont bother checking if CvXSUB(cv) is true, less branching */
+ else { /* don't bother checking if CvXSUB(cv) is true, less branching */
CvXSUB(&cvbody) = NULL;
}
SvPOK_off(MUTABLE_SV(cv)); /* forget prototype */
@@ -2106,7 +2106,7 @@ S_cv_clone_pad(pTHX_ CV *proto, CV *cv, CV *outside, HV *cloned,
if (CvCONST(cv)) {
/* Constant sub () { $x } closing over $x:
- * The prototype was marked as a candiate for const-ization,
+ * The prototype was marked as a candidate for const-ization,
* so try to grab the current const value, and if successful,
* turn into a const sub:
*/
diff --git a/peep.c b/peep.c
index a743de91d7..9b41daf5bd 100644
--- a/peep.c
+++ b/peep.c
@@ -715,7 +715,7 @@ S_maybe_multiconcat(pTHX_ OP *o)
*
* During the conversion process, EXPR ops are stripped from the tree
* and unshifted onto o. Finally, any of o's remaining original
- * childen are discarded and o is converted into an OP_MULTICONCAT.
+ * children are discarded and o is converted into an OP_MULTICONCAT.
*
* In this middle of this, o may contain both: unshifted args on the
* left, and some remaining original args on the right. lastkidop
@@ -1990,7 +1990,7 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV orig_action, U8 hints)
/* for N levels of aggregate lookup, we normally expect
* that the first N-1 [ah]elem ops will be flagged as
- * /DEREF (so they autovivifiy if necessary), and the last
+ * /DEREF (so they autovivify if necessary), and the last
* lookup op not to be.
* For other things (like @{$h{k1}{k2}}) extra scope or
* leave ops can appear, so abandon the effort in that
@@ -3223,7 +3223,7 @@ Perl_rpeep(pTHX_ OP *o)
* any other pad ops, and possibly some trailing ops.
* Note that we don't null() the skipped ops, to make it
* easier for Deparse to undo this optimisation (and none of
- * the skipped ops are holding any resourses). It also makes
+ * the skipped ops are holding any resources). It also makes
* it easier for find_uninit_var(), as it can just ignore
* padrange, and examine the original pad ops.
*/
diff --git a/perl.c b/perl.c
index b19578c828..14b3d1b634 100644
--- a/perl.c
+++ b/perl.c
@@ -388,7 +388,7 @@ perl_construct(pTHXx)
PERL_HASH_WITH_STATE(PL_hash_state,PL_hash_chars[256],str,0);
}
#endif
- /* at this point we have initialezed the hash function, and we can start
+ /* at this point we have initialized the hash function, and we can start
* constructing hashes */
PL_hash_seed_set= TRUE;
}
@@ -3475,7 +3475,7 @@ Perl_get_debug_opts(pTHX_ const char **s, bool givehelp)
* If there is a free slot available marked with '?' feel
* free to reuse it for something else.
*
- * Regardles remember to update DEBUG_MASK in perl.h, and
+ * Regardless remember to update DEBUG_MASK in perl.h, and
* update the documentation above AND in pod/perlrun.pod.
*
* Note that the ? indicates an unused slot. As the code below
diff --git a/perl.h b/perl.h
index c11fcce996..8116144db1 100644
--- a/perl.h
+++ b/perl.h
@@ -4444,7 +4444,7 @@ typedef struct crypt_data { /* straight from /usr/include/crypt.h */
#define FAKE_BIT_BUCKET
#endif
-/* [perl #22371] Algorimic Complexity Attack on Perl 5.6.1, 5.8.0.
+/* [perl #22371] Algorithmic Complexity Attack on Perl 5.6.1, 5.8.0.
* Note that the USE_HASH_SEED and similar defines are *NOT* defined by
* Configure, despite their names being similar to other defines like
* USE_ITHREADS. Configure in fact knows nothing about the randomised
diff --git a/perlapi.h b/perlapi.h
index 0d66a68371..d93ee199b7 100644
--- a/perlapi.h
+++ b/perlapi.h
@@ -13,7 +13,7 @@
/*
* This file used to declare accessor functions for Perl variables
* when PERL_GLOBAL_STRUCT was enabled, but that no longer exists.
- * This file is kept for backwards compatiblity with XS code that
+ * This file is kept for backwards compatibility with XS code that
* might include it.
*/
#ifndef __perlapi_h__
diff --git a/perlio.c b/perlio.c
index f787804dcf..287b6e099b 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1441,7 +1441,7 @@ PerlIO_resolve_layers(pTHX_ const char *layers,
}
/*
* Don't fail if handler cannot be found :via(...) etc. may do
- * something sensible else we will just stringfy and open
+ * something sensible else we will just stringify and open
* resulting string.
*/
}
diff --git a/pp.c b/pp.c
index f8cbc01eba..f2a34e790b 100644
--- a/pp.c
+++ b/pp.c
@@ -768,7 +768,7 @@ S_do_chomp(pTHX_ SV *retval, SV *sv, bool chomping)
if (is_utf8) {
/* Cannot downgrade, therefore cannot possibly match.
At this point, temp_buffer is not alloced, and
- is the buffer inside PL_rs, so dont free it.
+ is the buffer inside PL_rs, so don't free it.
*/
assert (temp_buffer == rsptr);
goto nope_free_sv;
@@ -3243,7 +3243,7 @@ PP(pp_length)
SvSETMAGIC(TARG);
}
else
- /* TARG is on stack at this point and is overwriten by SETs.
+ /* TARG is on stack at this point and is overwritten by SETs.
* This branch is the odd one out, so put TARG by default on
* stack earlier to let local SP go out of liveness sooner */
SETs(&PL_sv_undef);
diff --git a/regcomp.h b/regcomp.h
index 306c732b75..d1a72ed24c 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -1329,7 +1329,7 @@ re.pm, especially to the documentation.
/* get_sv() can return NULL during global destruction. */ \
re_debug_flags_sv = PL_curcop ? get_sv(RE_DEBUG_FLAGS, GV_ADD) : NULL; \
if (re_debug_flags_sv) { \
- if (!SvIOK(re_debug_flags_sv)) /* If doesnt exist set to default */\
+ if (!SvIOK(re_debug_flags_sv)) /* If doesn't exist set to default */\
sv_setuv(re_debug_flags_sv, \
/* These defaults should be kept in sync with re.pm */ \
RE_DEBUG_COMPILE_DUMP | RE_DEBUG_EXECUTE_MASK ); \
diff --git a/regexec.c b/regexec.c
index f7d66e38c6..aac9827294 100644
--- a/regexec.c
+++ b/regexec.c
@@ -178,7 +178,7 @@ static const char non_utf8_target_but_utf8_required[]
* VERBS must NOT be included. JUMPABLE is used to determine if we can ignore a
* node that is in between two EXACT like nodes when ascertaining what the required
* "follow" character is. This should probably be moved to regex compile time
- * although it may be done at run time beause of the REF possibility - more
+ * although it may be done at run time because of the REF possibility - more
* investigation required. -- demerphq
*/
#define JUMPABLE(rn) ( \
@@ -2212,7 +2212,7 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
U8 c2;
char *e = NULL;
- /* In some cases we accept only the first occurence of 'x' in a sequence of
+ /* In some cases we accept only the first occurrence of 'x' in a sequence of
* them. This variable points to just beyond the end of the previous
* occurrence of 'x', hence we can tell if we are in a sequence. (Having
* it point to beyond the 'x' allows us to work for UTF-8 without having to
@@ -2478,7 +2478,7 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
/* We know that we have to match at least 'ln' bytes (which is the same
* as characters, since not utf8). If we have to match 3 characters,
- * and there are only 2 availabe, we know without trying that it will
+ * and there are only 2 available, we know without trying that it will
* fail; so don't start a match past the required minimum number from
* the far end */
e = HOP3c(strend, -((SSize_t)ln), s);
@@ -5367,7 +5367,7 @@ S_isLB(pTHX_ LB_enum before,
/* Here, we have the character preceding the span of spaces all set
* up. We follow LB18: "Break after spaces" unless the table shows
- * that is overriden */
+ * that is overridden */
return LB_table[prev][after] != LB_NOBREAK_EVEN_WITH_SP_BETWEEN;
case LB_CM_ZWJ_foo:
@@ -5380,7 +5380,7 @@ S_isLB(pTHX_ LB_enum before,
while (prev == LB_Combining_Mark || prev == LB_ZWJ);
/* Here, 'prev' is that first earlier non-CM character. If the CM
- * attatches to it, then it inherits the behavior of 'prev'. If it
+ * attaches to it, then it inherits the behavior of 'prev'. If it
* doesn't attach, it is to be treated as an AL */
if (! LB_CM_ATTACHES_TO(prev)) {
prev = LB_Alphabetic;
@@ -5801,7 +5801,7 @@ S_backup_one_SB(pTHX_ const U8 * const strbeg, U8 ** curpos, const bool utf8_tar
}
/* Back up over Extend and Format. curpos is always just to the right
- * of the characater whose value we are getting */
+ * of the character whose value we are getting */
do {
U8 * prev_prev_char_pos;
if ((prev_prev_char_pos = reghopmaybe3((U8 *) prev_char_pos, -1,
@@ -6101,7 +6101,7 @@ S_backup_one_WB(pTHX_ WB_enum * previous, const U8 * const strbeg, U8 ** curpos,
}
/* Back up over Extend and Format. curpos is always just to the right
- * of the characater whose value we are getting */
+ * of the character whose value we are getting */
do {
U8 * prev_prev_char_pos;
if ((prev_prev_char_pos = reghopmaybe3((U8 *) prev_char_pos,
@@ -6147,7 +6147,7 @@ S_backup_one_WB(pTHX_ WB_enum * previous, const U8 * const strbeg, U8 ** curpos,
#define sayNO goto no
#define sayNO_SILENT goto no_silent
-/* we dont use STMT_START/END here because it leads to
+/* we don't use STMT_START/END here because it leads to
"unreachable code" warnings, which are bogus, but distracting. */
#define CACHEsayNO \
if (ST.cache_mask) \
@@ -6943,7 +6943,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
/* Complete checking would involve going through every character
* matched by the string to see if any is above latin1. But the
- * comparision otherwise might very well be a fast assembly
+ * comparison otherwise might very well be a fast assembly
* language routine, and I (khw) don't think slowing things down
* just to check for this warning is worth it. So this just checks
* the first character */
@@ -8746,7 +8746,7 @@ NULL
* The idea here is that for certain types of CURLYX/WHILEM -
* principally those whose upper bound is infinity (and
* excluding regexes that have things like \1 and other very
- * non-regular expresssiony things), then if a pattern like
+ * non-regular expressiony things), then if a pattern like
* /....A*.../ fails and we backtrack to the WHILEM, then we
* make a note that this particular WHILEM op was at string
* position 47 (say) when the rest of pattern failed. Then, if
@@ -9926,7 +9926,7 @@ NULL
* When popping the save stack, all these locals would be undone;
* bypass this by setting the outermost saved $^R to the latest
* value */
- /* I dont know if this is needed or works properly now.
+ /* I don't know if this is needed or works properly now.
* see code related to PL_replgv elsewhere in this file.
* Yves
*/
@@ -11552,7 +11552,7 @@ Perl_isSCRIPT_RUN(pTHX_ const U8 * s, const U8 * send, const bool utf8_target)
*
* Negative script numbers signify that the value may be any of several
* scripts, and we need to look at auxiliary information to make our
- * deterimination. But if both are non-negative, we can fail now */
+ * determination. But if both are non-negative, we can fail now */
if (LIKELY(script_of_char >= 0)) {
const SCX_enum * search_in;
PERL_UINT_FAST8_T search_in_len;
diff --git a/regexp.h b/regexp.h
index 234db6573e..c26f39bb26 100644
--- a/regexp.h
+++ b/regexp.h
@@ -128,7 +128,7 @@ typedef struct regexp {
U32 extflags; /* Flags used both externally and internally */
U32 nparens; /* number of capture buffers */
SSize_t minlen; /* minimum possible number of chars in string to match */
- SSize_t minlenret; /* mininum possible number of chars in $& */
+ SSize_t minlenret; /* minimum possible number of chars in $& */
STRLEN gofs; /* chars left of pos that we search from */
/* substring data about strings that must appear in
* the final match, used for optimisations */
diff --git a/sv.c b/sv.c
index 7b495589cf..c68f63677c 100644
--- a/sv.c
+++ b/sv.c
@@ -685,7 +685,7 @@ Perl_sv_free_arenas(pTHX)
/*
Historically, here were mid-level routines that manage the
allocation of bodies out of the various arenas. Some of these
- routines and related definitions remain here, but otherse were
+ routines and related definitions remain here, but others were
moved into sv_inline.h to facilitate inlining of newSV_type().
There are 4 kinds of arenas:
@@ -698,7 +698,7 @@ Perl_sv_free_arenas(pTHX)
Arena types 2 & 3 are chained by body-type off an array of
arena-root pointers, which is indexed by svtype. Some of the
larger/less used body types are malloced singly, since a large
- unused block of them is wasteful. Also, several svtypes dont have
+ unused block of them is wasteful. Also, several svtypes don't have
bodies; the data fits into the sv-head itself. The arena-root
pointer thus has a few unused root-pointers (which may be hijacked
later for arena type 4)
@@ -4938,7 +4938,7 @@ embedded C<NUL> characters.
In the plain C<pv> forms, C<ptr> points to a NUL-terminated C string. That is,
it points to the first byte of the string, and the copy proceeds up through the
-first enountered C<NUL> byte.
+first encountered C<NUL> byte.
In the forms that take a C<ptr> argument, if it is NULL, the SV will become
undefined.
@@ -5793,7 +5793,7 @@ Perl_sv_magicext(pTHX_ SV *const sv, SV *const obj, const int how,
mg->mg_ptr = savepvn(name, namlen);
else if (namlen == HEf_SVKEY) {
/* Yes, this is casting away const. This is only for the case of
- HEf_SVKEY. I think we need to document this aberation of the
+ HEf_SVKEY. I think we need to document this aberration of the
constness of the API, rather than making name non-const, as
that change propagating outwards a long way. */
mg->mg_ptr = (char*)SvREFCNT_inc_simple_NN((SV *)name);
@@ -8682,7 +8682,7 @@ Perl_sv_gets(pTHX_ SV *const sv, PerlIO *const fp, I32 append)
SvPOK_only(sv);
if (!append) {
/* not appending - "clear" the string by setting SvCUR to 0,
- * the pv is still avaiable. */
+ * the pv is still available. */
SvCUR_set(sv,0);
}
if (PerlIO_isutf8(fp))
@@ -8929,7 +8929,7 @@ Perl_sv_gets(pTHX_ SV *const sv, PerlIO *const fp, I32 append)
}
if (shortbuffered) { /* oh well, must extend */
- /* we didnt have enough room to fit the line into the target buffer
+ /* we didn't have enough room to fit the line into the target buffer
* so we must extend the target buffer and keep going */
cnt = shortbuffered;
shortbuffered = 0;
@@ -9520,7 +9520,7 @@ Perl_newSVpvn_flags(pTHX_ const char *const s, const STRLEN len, const U32 flags
* sv_2mortal() and do what it does ourselves here. Since we have asserted
* that flags can only have the SVf_UTF8 and/or SVs_TEMP flags set above we
* can use it to enable the sv flags directly (bypassing SvTEMP_on), which
- * in turn means we dont need to mask out the SVf_UTF8 flag below, which
+ * in turn means we don't need to mask out the SVf_UTF8 flag below, which
* means that we eliminate quite a few steps than it looks - Yves
* (explaining patch by gfx) */
@@ -9676,7 +9676,7 @@ Perl_newSVhek(pTHX_ const HEK *const hek)
SvUTF8_on (sv);
return sv;
}
- /* This will be overwhelminly the most common case. */
+ /* This will be overwhelmingly the most common case. */
{
/* Inline most of newSVpvn_share(), because share_hek_hek() is far
more efficient than sharepvn(). */
@@ -14811,7 +14811,7 @@ S_sv_dup_common(pTHX_ const SV *const ssv, CLONE_PARAMS *const param)
padlist = padlist_dup(padlist, param);
CvPADLIST_set(dsv, padlist);
} else
-/* unthreaded perl can't sv_dup so we dont support unthreaded's CvHSCXT */
+/* unthreaded perl can't sv_dup so we don't support unthreaded's CvHSCXT */
PoisonPADLIST(dsv);
CvOUTSIDE(dsv) =
@@ -15040,7 +15040,7 @@ Perl_si_dup(pTHX_ PERL_SI *si, CLONE_PARAMS* param)
#define pv_dup(p) SAVEPV(p)
#define svp_dup_inc(p,pp) any_dup(p,pp)
-/* map any object to the new equivent - either something in the
+/* map any object to the new equivalent - either something in the
* ptr table, or something in the interpreter structure
*/
diff --git a/sv.h b/sv.h
index a1ff8f4a5f..0412e63e6d 100644
--- a/sv.h
+++ b/sv.h
@@ -1500,7 +1500,7 @@ object type. Exposed to perl code via Internals::SvREADONLY().
=for apidoc Am|void|SvPV_renew|SV* sv|STRLEN len
Low level micro optimization of C<L</SvGROW>>. It is generally better to use
C<SvGROW> instead. This is because C<SvPV_renew> ignores potential issues that
-C<SvGROW> handles. C<sv> needs to have a real C<PV> that is unencombered by
+C<SvGROW> handles. C<sv> needs to have a real C<PV> that is unencumbered by
things like COW. Using C<SV_CHECK_THINKFIRST> or
C<SV_CHECK_THINKFIRST_COW_DROP> before calling this should clean it up, but
why not just use C<SvGROW> if you're not sure about the provenance?
@@ -1517,7 +1517,7 @@ why not just use C<SvGROW> if you're not sure about the provenance?
=for apidoc Am|void|SvPV_shrink_to_cur|SV* sv
Trim any trailing unused memory in the PV of C<sv>, which needs to have a real
-C<PV> that is unencombered by things like COW. Think first before using this
+C<PV> that is unencumbered by things like COW. Think first before using this
functionality. Is the space saving really worth giving up COW? Will the
needed size of C<sv> stay the same?
@@ -1817,7 +1817,7 @@ As of 5.38, all forms are guaranteed to evaluate C<sv> exactly once. For
earlier Perls, use a form whose name ends with C<x> for single evaluation.
C<SvPVutf8> is like C<SvPV>, but converts C<sv> to UTF-8 first if not already
-UTF-8. Similiarly, the other forms with C<utf8> in their names correspond to
+UTF-8. Similarly, the other forms with C<utf8> in their names correspond to
their respective forms without.
C<SvPVutf8_or_null> and C<SvPVutf8_or_null_nomg> don't have corresponding
@@ -1826,7 +1826,7 @@ undef, they return C<NULL>.
C<SvPVbyte> is like C<SvPV>, but converts C<sv> to byte representation first if
currently encoded as UTF-8. If C<sv> cannot be downgraded from UTF-8, it
-croaks. Similiarly, the other forms with C<byte> in their names correspond to
+croaks. Similarly, the other forms with C<byte> in their names correspond to
their respective forms without.
C<SvPVbyte_or_null> doesn't have a corresponding non-C<byte> form. Instead it
diff --git a/uconfig.h b/uconfig.h
index 7099da9533..91809932b5 100644
--- a/uconfig.h
+++ b/uconfig.h
@@ -3594,7 +3594,7 @@
/* HAS_WCSXFRM:
* This symbol, if defined, indicates that the wcsxfrm routine is
- * available to tranform a wide character string for wcscmp().
+ * available to transform a wide character string for wcscmp().
*/
/*#define HAS_WCSXFRM / **/
@@ -5376,6 +5376,6 @@
#endif
/* Generated from:
- * 87bdd73bd78f6ebe0bf3b7bc0897da3ed460fceee0bc2e61363ef5e24db55bb2 config_h.SH
+ * 8cb1765533e123c379f0207fc2a4f75df4be3e84be3a0da71ab37bcf00e13a46 config_h.SH
* 9c5779a38fbba64b0a5dcf7ce548120a29ea5039350102827f500c812bda10b2 uconfig.sh
* ex: set ro: */
diff --git a/utf8.c b/utf8.c
index 7c35fb8c12..91e314261e 100644
--- a/utf8.c
+++ b/utf8.c
@@ -681,7 +681,7 @@ S_does_utf8_overflow(const U8 * const s,
return 1;
}
- /* Here, it could be the overlong malformation, and might not actuallly
+ /* Here, it could be the overlong malformation, and might not actually
* overflow if you were to calculate it out.
*
* See if it actually is overlong */
@@ -1511,7 +1511,7 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
/* A well-formed UTF-8 character, as the vast majority of calls to this
* function will be for, has this expected length. For efficiency, set
- * things up here to return it. It will be overriden only in those rare
+ * things up here to return it. It will be overridden only in those rare
* cases where a malformation is found */
if (retlen) {
*retlen = expectlen;
@@ -1710,7 +1710,7 @@ Perl__utf8n_to_uvchr_msgs_helper(const U8 *s,
* uv contains the code point the input sequence
* represents; or if there is a problem that prevents
* a well-defined value from being computed, it is
- * some subsitute value, typically the REPLACEMENT
+ * some substitute value, typically the REPLACEMENT
* CHARACTER.
* s0 points to the first byte of the character
* s points to just after where we left off processing
diff --git a/utfebcdic.h b/utfebcdic.h
index eebbe26bd3..1aab312261 100644
--- a/utfebcdic.h
+++ b/utfebcdic.h
@@ -12,7 +12,7 @@
*
* To summarize, the way it works is:
* To convert an EBCDIC code point to UTF-EBCDIC:
- * 1) convert to Unicode. No conversion is necesary for code points above
+ * 1) convert to Unicode. No conversion is necessary for code points above
* 255, as Unicode and EBCDIC are identical in this range. For smaller
* code points, the conversion is done by lookup in the PL_e2a table (with
* inverse PL_a2e) in the generated file 'ebcdic_tables.h'. The 'a'
diff --git a/util.c b/util.c
index 8da7c11fa7..a01a28c848 100644
--- a/util.c
+++ b/util.c
@@ -557,7 +557,7 @@ Free_t Perl_mfree (Malloc_t where)
/* This is the value stored in *retlen in the two delimcpy routines below when
* there wasn't enough room in the destination to store everything it was asked
* to. The value is deliberately very large so that hopefully if code uses it
- * unquestioninly to access memory, it will likely segfault. And it is small
+ * unquestioningly to access memory, it will likely segfault. And it is small
* enough that if the caller does some arithmetic on it before accessing, it
* won't overflow into a small legal number. */
#define DELIMCPY_OUT_OF_BOUNDS_RET I32_MAX
@@ -3609,7 +3609,7 @@ Perl_set_context(void *t)
cthread_set_data(cthread_self(), t);
# else
/* We set thread-specific value always, as C++ code has to read it with
- * pthreads, beacuse the declaration syntax for thread local storage for C11
+ * pthreads, because the declaration syntax for thread local storage for C11
* is incompatible with C++, meaning that we can't expose the thread local
* variable to C++ code. */
{
@@ -4397,7 +4397,7 @@ S_socketpair_udp (int fd[2]) {
addresses[i].sin_family = AF_INET;
addresses[i].sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- addresses[i].sin_port = 0; /* kernel choses port. */
+ addresses[i].sin_port = 0; /* kernel chooses port. */
if (PerlSock_bind(sockets[i], (struct sockaddr *) &addresses[i],
sizeof(struct sockaddr_in)) == -1)
goto tidy_up_and_fail;
@@ -4569,7 +4569,7 @@ Perl_my_socketpair (int family, int type, int protocol, int fd[2]) {
memset(&listen_addr, 0, sizeof(listen_addr));
listen_addr.sin_family = AF_INET;
listen_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
- listen_addr.sin_port = 0; /* kernel choses port. */
+ listen_addr.sin_port = 0; /* kernel chooses port. */
if (PerlSock_bind(listener, (struct sockaddr *) &listen_addr,
sizeof(listen_addr)) == -1)
goto tidy_up_and_fail;
diff --git a/win32/config_H.gc b/win32/config_H.gc
index a0848ea745..8eb27c1bb1 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -3595,7 +3595,7 @@
/* HAS_WCSXFRM:
* This symbol, if defined, indicates that the wcsxfrm routine is
- * available to tranform a wide character string for wcscmp().
+ * available to transform a wide character string for wcscmp().
*/
#define HAS_WCSXFRM /**/
diff --git a/win32/config_H.vc b/win32/config_H.vc
index 432add2ccc..515b5a068e 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -3595,7 +3595,7 @@
/* HAS_WCSXFRM:
* This symbol, if defined, indicates that the wcsxfrm routine is
- * available to tranform a wide character string for wcscmp().
+ * available to transform a wide character string for wcscmp().
*/
#define HAS_WCSXFRM /**/
diff --git a/win32/fcrypt.c b/win32/fcrypt.c
index 219f4f0b86..f2836eddd2 100644
--- a/win32/fcrypt.c
+++ b/win32/fcrypt.c
@@ -4,7 +4,7 @@
#include <errno.h>
/* Eric Young.
- * This version of crypt has been developed from my MIT compatable
+ * This version of crypt has been developed from my MIT compatible
* DES library.
* The library is available at pub/DES at ftp.psy.uq.oz.au
* eay@psych.psy.uq.oz.au
diff --git a/win32/perlhost.h b/win32/perlhost.h
index 5ce496590f..e6ef46f809 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -108,7 +108,7 @@ public:
};
/* IPerlMemParse */
- /* Assume something else is using locks to mangaging serialize
+ /* Assume something else is using locks to manage serialization
on a batch basis
*/
inline void GetLockParse(void) { m_pVMemParse->GetLock(); };
diff --git a/win32/perllib.c b/win32/perllib.c
index d0d2caf764..a52b4f01c2 100644
--- a/win32/perllib.c
+++ b/win32/perllib.c
@@ -248,7 +248,7 @@ DllMain(HINSTANCE hModule, /* DLL module handle */
* process termination or call to FreeLibrary.
*/
case DLL_PROCESS_DETACH:
- /* As long as we use TerminateProcess()/TerminateThread() etc. for mimicing kill()
+ /* As long as we use TerminateProcess()/TerminateThread() etc. for mimicking kill()
anything here had better be harmless if:
A. Not called at all.
B. Called after memory allocation for Heap has been forcibly removed by OS.
diff --git a/win32/vmem.h b/win32/vmem.h
index 898e63b8d1..c425ae187a 100644
--- a/win32/vmem.h
+++ b/win32/vmem.h
@@ -64,7 +64,7 @@ inline void MEMODSlx(char *str, long x)
/*
* Pass all memory requests through to the compiler's msvcr*.dll.
- * Optionaly track by using a doubly linked header.
+ * Optionally track by using a doubly linked header.
*/
#ifdef _USE_LINKED_LIST
diff --git a/win32/win32.c b/win32/win32.c
index 619f2a4375..caaa3467d2 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2667,7 +2667,7 @@ win32_async_check(pTHX)
MSG msg;
HWND hwnd = w32_message_hwnd;
- /* Reset w32_poll_count before doing anything else, incase we dispatch
+ /* Reset w32_poll_count before doing anything else, in case we dispatch
* messages that end up calling back into perl */
w32_poll_count = 0;
@@ -2951,7 +2951,7 @@ DllExport unsigned int
win32_alarm(unsigned int sec)
{
/*
- * the 'obvious' implentation is SetTimer() with a callback
+ * the 'obvious' implementation is SetTimer() with a callback
* which does whatever receiving SIGALRM would do
* we cannot use SIGALRM even via raise() as it is not
* one of the supported codes in <signal.h>
diff --git a/win32/win32.h b/win32/win32.h
index 499203a5a0..da83afb682 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -24,7 +24,7 @@
/* less I/O calls during each require */
# define PERL_DISABLE_PMC
-/* unnecessery for miniperl to lookup anything from an "installed" perl */
+/* unnecessary for miniperl to lookup anything from an "installed" perl */
# define WIN32_NO_REGISTRY
/* allow minitest to work */