diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-08-16 10:50:14 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-08-18 11:26:37 -0600 |
commit | eb578fdb5569b91c28466a4d1939e381ff6ceaf4 (patch) | |
tree | cb76dfdd15ead716ff76b6a46eb1c49f10b302f2 | |
parent | 29205e9cdf0a179ed7a2e9401a3b19c8ede062db (diff) | |
download | perl-eb578fdb5569b91c28466a4d1939e381ff6ceaf4.tar.gz |
Omnibus removal of register declarations
This removes most register declarations in C code (and accompanying
documentation) in the Perl core. Retained are those in the ext
directory, Configure, and those that are associated with assembly
language.
See:
http://stackoverflow.com/questions/314994/whats-a-good-example-of-register-variable-usage-in-c
which says, in part:
There is no good example of register usage when using modern compilers
(read: last 10+ years) because it almost never does any good and can do
some bad. When you use register, you are telling the compiler "I know
how to optimize my code better than you do" which is almost never the
case. One of three things can happen when you use register:
The compiler ignores it, this is most likely. In this case the only
harm is that you cannot take the address of the variable in the
code.
The compiler honors your request and as a result the code runs slower.
The compiler honors your request and the code runs faster, this is the least likely scenario.
Even if one compiler produces better code when you use register, there
is no reason to believe another will do the same. If you have some
critical code that the compiler is not optimizing well enough your best
bet is probably to use assembler for that part anyway but of course do
the appropriate profiling to verify the generated code is really a
problem first.
-rw-r--r-- | NetWare/NWUtil.c | 14 | ||||
-rw-r--r-- | XSUB.h | 2 | ||||
-rw-r--r-- | av.c | 12 | ||||
-rw-r--r-- | deb.c | 2 | ||||
-rw-r--r-- | dist/Data-Dumper/Dumper.xs | 4 | ||||
-rw-r--r-- | doio.c | 24 | ||||
-rw-r--r-- | doop.c | 28 | ||||
-rw-r--r-- | gv.c | 12 | ||||
-rw-r--r-- | hv.c | 48 | ||||
-rw-r--r-- | hv.h | 8 | ||||
-rw-r--r-- | malloc.c | 24 | ||||
-rw-r--r-- | mathoms.c | 4 | ||||
-rw-r--r-- | mg.c | 34 | ||||
-rw-r--r-- | mpeix/mpeix.c | 2 | ||||
-rw-r--r-- | mro.c | 4 | ||||
-rw-r--r-- | op.c | 34 | ||||
-rw-r--r-- | os2/OS2/OS2-REXX/REXX.pm | 2 | ||||
-rw-r--r-- | os2/OS2/OS2-REXX/REXX.xs | 2 | ||||
-rw-r--r-- | os2/os2.c | 14 | ||||
-rw-r--r-- | pad.c | 2 | ||||
-rw-r--r-- | perl.c | 6 | ||||
-rw-r--r-- | perly.c | 8 | ||||
-rw-r--r-- | pod/perlhacktut.pod | 12 | ||||
-rw-r--r-- | pp.c | 103 | ||||
-rw-r--r-- | pp_ctl.c | 114 | ||||
-rw-r--r-- | pp_hot.c | 62 | ||||
-rw-r--r-- | pp_pack.c | 6 | ||||
-rw-r--r-- | pp_sort.c | 26 | ||||
-rw-r--r-- | pp_sys.c | 78 | ||||
-rw-r--r-- | regcomp.c | 64 | ||||
-rw-r--r-- | regexec.c | 54 | ||||
-rw-r--r-- | run.c | 2 | ||||
-rw-r--r-- | scope.c | 20 | ||||
-rw-r--r-- | sv.c | 96 | ||||
-rw-r--r-- | toke.c | 60 | ||||
-rw-r--r-- | utf8.c | 16 | ||||
-rw-r--r-- | util.c | 109 | ||||
-rw-r--r-- | vms/vms.c | 24 | ||||
-rw-r--r-- | win32/fcrypt.c | 18 | ||||
-rw-r--r-- | win32/win32.c | 4 | ||||
-rw-r--r-- | win32/wince.c | 4 | ||||
-rw-r--r-- | x2p/a2p.c | 4 | ||||
-rw-r--r-- | x2p/a2py.c | 28 | ||||
-rw-r--r-- | x2p/hash.c | 32 | ||||
-rw-r--r-- | x2p/str.c | 18 | ||||
-rw-r--r-- | x2p/util.c | 6 | ||||
-rw-r--r-- | x2p/walk.c | 26 |
47 files changed, 637 insertions, 639 deletions
diff --git a/NetWare/NWUtil.c b/NetWare/NWUtil.c index 15e90cb481..6d60dfbabd 100644 --- a/NetWare/NWUtil.c +++ b/NetWare/NWUtil.c @@ -517,8 +517,8 @@ void fnAppendArgument(PCOMMANDLINEPARSER pclp, char *new_arg) char *fnSkipToken(char *s, char *r) { - register char *t=NULL; - register char quote = '\0'; // NULL, single quote, or double quote + char *t=NULL; + char quote = '\0'; // NULL, single quote, or double quote char ch = '\0'; for (t=s; t[0]; t++) @@ -577,11 +577,11 @@ char *fnSkipToken(char *s, char *r) char *fnScanToken(char *x, char *r) { - register char *s = x; // input string position - register char *t = x; // output string position - register char quote = '\0'; // either NULL, or single quote, or double quote - register char ch = '\0'; - register char c = '\0'; + char *s = x; // input string position + char *t = x; // output string position + char quote = '\0'; // either NULL, or single quote, or double quote + char ch = '\0'; + char c = '\0'; while (*s) { @@ -159,7 +159,7 @@ is a lexical $_ in scope. #define dAXMARK \ I32 ax = POPMARK; \ - register SV **mark = PL_stack_base + ax++ + SV **mark = PL_stack_base + ax++ #define dITEMS I32 items = (I32)(SP - MARK) @@ -389,14 +389,14 @@ Perl equivalent: C<my @new_array = ($scalar1, $scalar2, $scalar3...);> AV * Perl_av_make(pTHX_ register I32 size, register SV **strp) { - register AV * const av = MUTABLE_AV(newSV_type(SVt_PVAV)); + AV * const av = MUTABLE_AV(newSV_type(SVt_PVAV)); /* sv_upgrade does AvREAL_only() */ PERL_ARGS_ASSERT_AV_MAKE; assert(SvTYPE(av) == SVt_PVAV); if (size) { /* "defined" was returning undef for size==0 anyway. */ - register SV** ary; - register I32 i; + SV** ary; + I32 i; Newx(ary,size,SV*); AvALLOC(av) = ary; AvARRAY(av) = ary; @@ -505,7 +505,7 @@ Perl_av_undef(pTHX_ register AV *av) av_fill(av, -1); if ((real = !!AvREAL(av))) { - register I32 key = AvFILLp(av) + 1; + I32 key = AvFILLp(av) + 1; ENTER; SAVEFREESV(SvREFCNT_inc_simple_NN(av)); while (key) @@ -648,7 +648,7 @@ void Perl_av_unshift(pTHX_ register AV *av, register I32 num) { dVAR; - register I32 i; + I32 i; MAGIC* mg; PERL_ARGS_ASSERT_AV_UNSHIFT; @@ -678,7 +678,7 @@ Perl_av_unshift(pTHX_ register AV *av, register I32 num) AvARRAY(av) = AvARRAY(av) - i; } if (num) { - register SV **ary; + SV **ary; const I32 i = AvFILLp(av); /* Create extra elements */ const I32 slide = i > 0 ? i : 0; @@ -114,7 +114,7 @@ S_deb_stack_n(pTHX_ SV** stack_base, I32 stack_min, I32 stack_max, { #ifdef DEBUGGING dVAR; - register I32 i = stack_max - 30; + I32 i = stack_max - 30; const I32 *markscan = PL_markstack + mark_min; PERL_ARGS_ASSERT_DEB_STACK_N; diff --git a/dist/Data-Dumper/Dumper.xs b/dist/Data-Dumper/Dumper.xs index c1a7ec866e..6ec4dbf799 100644 --- a/dist/Data-Dumper/Dumper.xs +++ b/dist/Data-Dumper/Dumper.xs @@ -119,7 +119,7 @@ TOP: static I32 num_q(register const char *s, register STRLEN slen) { - register I32 ret = 0; + I32 ret = 0; while (slen > 0) { if (*s == '\'' || *s == '\\') @@ -137,7 +137,7 @@ num_q(register const char *s, register STRLEN slen) static I32 esc_q(register char *d, register const char *s, register STRLEN slen) { - register I32 ret = 0; + I32 ret = 0; while (slen > 0) { switch (*s) { @@ -66,7 +66,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw, I32 num_svs) { dVAR; - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); PerlIO *saveifp = NULL; PerlIO *saveofp = NULL; int savefd = -1; @@ -709,7 +709,7 @@ PerlIO * Perl_nextargv(pTHX_ register GV *gv) { dVAR; - register SV *sv; + SV *sv; #ifndef FLEXFILENAMES int filedev; int fileino; @@ -994,7 +994,7 @@ bool Perl_do_eof(pTHX_ GV *gv) { dVAR; - register IO * const io = GvIO(gv); + IO * const io = GvIO(gv); PERL_ARGS_ASSERT_DO_EOF; @@ -1040,7 +1040,7 @@ Perl_do_tell(pTHX_ GV *gv) { dVAR; IO *const io = GvIO(gv); - register PerlIO *fp; + PerlIO *fp; PERL_ARGS_ASSERT_DO_TELL; @@ -1061,7 +1061,7 @@ Perl_do_seek(pTHX_ GV *gv, Off_t pos, int whence) { dVAR; IO *const io = GvIO(gv); - register PerlIO *fp; + PerlIO *fp; if (io && (fp = IoIFP(io))) { #ifdef ULTRIX_STDIO_BOTCH @@ -1080,7 +1080,7 @@ Perl_do_sysseek(pTHX_ GV *gv, Off_t pos, int whence) { dVAR; IO *const io = GvIO(gv); - register PerlIO *fp; + PerlIO *fp; PERL_ARGS_ASSERT_DO_SYSSEEK; @@ -1437,8 +1437,8 @@ bool Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report) { dVAR; - register const char **a; - register char *s; + const char **a; + char *s; char *buf; char *cmd; /* Make a copy so we can change it */ @@ -1574,8 +1574,8 @@ I32 Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) { dVAR; - register I32 val; - register I32 tot = 0; + I32 val; + I32 tot = 0; const char *const what = PL_op_name[type]; const char *s; STRLEN len; @@ -1648,7 +1648,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) case OP_CHOWN: APPLY_TAINT_PROPER(); if (sp - mark > 2) { - register I32 val2; + I32 val2; val = SvIVx(*++mark); val2 = SvIVx(*++mark); APPLY_TAINT_PROPER(); @@ -1725,7 +1725,7 @@ nothing in the core. */ while (++mark <= sp) { I32 proc; - register unsigned long int __vmssts; + unsigned long int __vmssts; SvGETMAGIC(*mark); if (!(SvIOK(*mark) || SvNOK(*mark) || looks_like_number(*mark))) Perl_croak(aTHX_ "Can't kill a non-numeric process ID"); @@ -675,8 +675,8 @@ Perl_do_join(pTHX_ register SV *sv, SV *delim, register SV **mark, register SV * { dVAR; SV ** const oldmark = mark; - register I32 items = sp - mark; - register STRLEN len; + I32 items = sp - mark; + STRLEN len; STRLEN delimlen; PERL_ARGS_ASSERT_DO_JOIN; @@ -912,10 +912,10 @@ void Perl_do_vecset(pTHX_ SV *sv) { dVAR; - register SSize_t offset, bitoffs = 0; - register int size; - register unsigned char *s; - register UV lval; + SSize_t offset, bitoffs = 0; + int size; + unsigned char *s; + UV lval; I32 mask; STRLEN targlen; STRLEN len; @@ -1000,16 +1000,16 @@ Perl_do_vop(pTHX_ I32 optype, SV *sv, SV *left, SV *right) { dVAR; #ifdef LIBERAL - register long *dl; - register long *ll; - register long *rl; + long *dl; + long *ll; + long *rl; #endif - register char *dc; + char *dc; STRLEN leftlen; STRLEN rightlen; - register const char *lc; - register const char *rc; - register STRLEN len; + const char *lc; + const char *rc; + STRLEN len; STRLEN lensave; const char *lsave; const char *rsave; @@ -1230,7 +1230,7 @@ Perl_do_kv(pTHX) dVAR; dSP; HV * const keys = MUTABLE_HV(POPs); - register HE *entry; + HE *entry; const I32 gimme = GIMME_V; const I32 dokv = (PL_op->op_type == OP_RV2HV || PL_op->op_type == OP_PADHV); /* op_type is OP_RKEYS/OP_RVALUES if pp_rkeys delegated to here */ @@ -957,7 +957,7 @@ GV * Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN len, U32 flags) { dVAR; - register const char *nend; + const char *nend; const char *nsplit = NULL; GV* gv; HV* ostash = stash; @@ -1410,11 +1410,11 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, const svtype sv_type) { dVAR; - register const char *name = nambeg; - register GV *gv = NULL; + const char *name = nambeg; + GV *gv = NULL; GV**gvp; I32 len; - register const char *name_cursor; + const char *name_cursor; HV *stash = NULL; const I32 no_init = flags & (GV_NOADD_NOINIT | GV_NOINIT); const I32 no_expand = flags & GV_NOEXPAND; @@ -2047,7 +2047,7 @@ void Perl_gv_check(pTHX_ const HV *stash) { dVAR; - register I32 i; + I32 i; PERL_ARGS_ASSERT_GV_CHECK; @@ -2056,7 +2056,7 @@ Perl_gv_check(pTHX_ const HV *stash) for (i = 0; i <= (I32) HvMAX(stash); i++) { const HE *entry; for (entry = HvARRAY(stash)[i]; entry; entry = HeNEXT(entry)) { - register GV *gv; + GV *gv; HV *hv; if (HeKEY(entry)[HeKLEN(entry)-1] == ':' && (gv = MUTABLE_GV(HeVAL(entry))) && isGV(gv) && (hv = GvHV(gv))) @@ -78,7 +78,7 @@ S_save_hek_flags(const char *str, I32 len, U32 hash, int flags) { const int flags_masked = flags & HVhek_MASK; char *k; - register HEK *hek; + HEK *hek; PERL_ARGS_ASSERT_SAVE_HEK_FLAGS; @@ -910,9 +910,9 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, int k_flags, I32 d_flags, U32 hash) { dVAR; - register XPVHV* xhv; - register HE *entry; - register HE **oentry; + XPVHV* xhv; + HE *entry; + HE **oentry; bool is_utf8 = (k_flags & HVhek_UTF8) ? TRUE : FALSE; int masked_flags; @@ -1113,12 +1113,12 @@ STATIC void S_hsplit(pTHX_ HV *hv) { dVAR; - register XPVHV* const xhv = (XPVHV*)SvANY(hv); + XPVHV* const xhv = (XPVHV*)SvANY(hv); const I32 oldsize = (I32) xhv->xhv_max+1; /* HvMAX(hv)+1 (sick) */ - register I32 newsize = oldsize * 2; - register I32 i; + I32 newsize = oldsize * 2; + I32 i; char *a = (char*) HvARRAY(hv); - register HE **aep; + HE **aep; int longest_chain = 0; int was_shared; @@ -1171,7 +1171,7 @@ S_hsplit(pTHX_ HV *hv) int right_length = 0; HE **oentry = aep; HE *entry = *aep; - register HE **bep; + HE **bep; if (!entry) /* non-existent */ continue; @@ -1230,7 +1230,7 @@ S_hsplit(pTHX_ HV *hv) aep = HvARRAY(hv); for (i=0; i<newsize; i++,aep++) { - register HE *entry = *aep; + HE *entry = *aep; while (entry) { /* We're going to trash this HE's next pointer when we chain it into the new hash below, so store where we go next. */ @@ -1272,12 +1272,12 @@ void Perl_hv_ksplit(pTHX_ HV *hv, IV newmax) { dVAR; - register XPVHV* xhv = (XPVHV*)SvANY(hv); + XPVHV* xhv = (XPVHV*)SvANY(hv); const I32 oldsize = (I32) xhv->xhv_max+1; /* HvMAX(hv)+1 (sick) */ - register I32 newsize; - register I32 i; - register char *a; - register HE **aep; + I32 newsize; + I32 i; + char *a; + HE **aep; PERL_ARGS_ASSERT_HV_KSPLIT; @@ -1337,7 +1337,7 @@ Perl_hv_ksplit(pTHX_ HV *hv, IV newmax) if (!entry) /* non-existent */ continue; do { - register I32 j = (HeHASH(entry) & newsize); + I32 j = (HeHASH(entry) & newsize); if (j != i) { j -= i; @@ -1561,7 +1561,7 @@ void Perl_hv_clear(pTHX_ HV *hv) { dVAR; - register XPVHV* xhv; + XPVHV* xhv; if (!hv) return; @@ -1786,7 +1786,7 @@ void Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags) { dVAR; - register XPVHV* xhv; + XPVHV* xhv; const char *name; const bool save = !!SvREFCNT(hv); @@ -2340,8 +2340,8 @@ HE * Perl_hv_iternext_flags(pTHX_ HV *hv, I32 flags) { dVAR; - register XPVHV* xhv; - register HE *entry; + XPVHV* xhv; + HE *entry; HE *oldentry; MAGIC* mg; struct xpvhv_aux *iter; @@ -2596,9 +2596,9 @@ STATIC void S_unshare_hek_or_pvn(pTHX_ const HEK *hek, const char *str, I32 len, U32 hash) { dVAR; - register XPVHV* xhv; + XPVHV* xhv; HE *entry; - register HE **oentry; + HE **oentry; bool is_utf8 = FALSE; int k_flags = 0; const char * const save = str; @@ -2718,10 +2718,10 @@ STATIC HEK * S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags) { dVAR; - register HE *entry; + HE *entry; const int flags_masked = flags & HVhek_MASK; const U32 hindex = hash & (I32) HvMAX(PL_strtab); - register XPVHV * const xhv = (XPVHV*)SvANY(PL_strtab); + XPVHV * const xhv = (XPVHV*)SvANY(PL_strtab); PERL_ARGS_ASSERT_SHARE_HEK_FLAGS; @@ -140,10 +140,10 @@ struct xpvhv { #define PERL_HASH_INTERNAL_(hash,str,len,internal) \ STMT_START { \ - register const char * const s_PeRlHaSh_tmp = str; \ - register const unsigned char *s_PeRlHaSh = (const unsigned char *)s_PeRlHaSh_tmp; \ - register I32 i_PeRlHaSh = len; \ - register U32 hash_PeRlHaSh = (internal ? PL_rehash_seed : PERL_HASH_SEED); \ + const char * const s_PeRlHaSh_tmp = str; \ + const unsigned char *s_PeRlHaSh = (const unsigned char *)s_PeRlHaSh_tmp; \ + I32 i_PeRlHaSh = len; \ + U32 hash_PeRlHaSh = (internal ? PL_rehash_seed : PERL_HASH_SEED); \ while (i_PeRlHaSh--) { \ hash_PeRlHaSh += *s_PeRlHaSh++; \ hash_PeRlHaSh += (hash_PeRlHaSh << 10); \ @@ -1263,8 +1263,8 @@ Malloc_t Perl_malloc(size_t nbytes) { dVAR; - register union overhead *p; - register int bucket; + union overhead *p; + int bucket; #if defined(DEBUGGING) || defined(RCHECK) MEM_SIZE size = nbytes; @@ -1681,10 +1681,10 @@ static void morecore(register int bucket) { dVAR; - register union overhead *ovp; - register int rnu; /* 2^rnu bytes will be requested */ + union overhead *ovp; + int rnu; /* 2^rnu bytes will be requested */ int nblks; /* become nblks blocks of the desired size */ - register MEM_SIZE siz, needed; + MEM_SIZE siz, needed; static int were_called = 0; if (nextf[bucket]) @@ -1816,8 +1816,8 @@ Free_t Perl_mfree(Malloc_t where) { dVAR; - register MEM_SIZE size; - register union overhead *ovp; + MEM_SIZE size; + union overhead *ovp; char *cp = (char*)where; #ifdef PACK_MALLOC u_char bucket; @@ -1912,11 +1912,11 @@ Malloc_t Perl_realloc(void *mp, size_t nbytes) { dVAR; - register MEM_SIZE onb; + MEM_SIZE onb; union overhead *ovp; char *res; int prev_bucket; - register int bucket; + int bucket; int incr; /* 1 if does not fit, -1 if "easily" fits in a smaller bucket, otherwise 0. */ char *cp = (char*)mp; @@ -2188,8 +2188,8 @@ int Perl_get_mstats(pTHX_ perl_mstats_t *buf, int buflen, int level) { #ifdef DEBUGGING_MSTATS - register int i, j; - register union overhead *p; + int i, j; + union overhead *p; struct chunk_chain_s* nextchain; PERL_ARGS_ASSERT_GET_MSTATS; @@ -2250,7 +2250,7 @@ void Perl_dump_mstats(pTHX_ const char *s) { #ifdef DEBUGGING_MSTATS - register int i; + int i; perl_mstats_t buffer; UV nf[NBUCKETS]; UV nt[NBUCKETS]; @@ -798,12 +798,12 @@ void Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg) { dVAR; - register I32 i; + I32 i; PERL_ARGS_ASSERT_SAVE_LIST; for (i = 1; i <= maxsarg; i++) { - register SV * const sv = newSV(0); + SV * const sv = newSV(0); sv_setsv(sv,sarg[i]); SSCHECK(3); SSPUSHPTR(sarg[i]); /* remember the pointer */ @@ -612,7 +612,7 @@ Perl_magic_regdata_cnt(pTHX_ SV *sv, MAGIC *mg) PERL_ARGS_ASSERT_MAGIC_REGDATA_CNT; if (PL_curpm) { - register const REGEXP * const rx = PM_GETRE(PL_curpm); + const REGEXP * const rx = PM_GETRE(PL_curpm); if (rx) { if (mg->mg_obj) { /* @+ */ /* return the number possible */ @@ -641,18 +641,18 @@ Perl_magic_regdatum_get(pTHX_ SV *sv, MAGIC *mg) PERL_ARGS_ASSERT_MAGIC_REGDATUM_GET; if (PL_curpm) { - register const REGEXP * const rx = PM_GETRE(PL_curpm); + const REGEXP * const rx = PM_GETRE(PL_curpm); if (rx) { - register const I32 paren = mg->mg_len; - register I32 s; - register I32 t; + const I32 paren = mg->mg_len; + I32 s; + I32 t; if (paren < 0) return 0; if (paren <= (I32)RX_NPARENS(rx) && (s = RX_OFFS(rx)[paren].start) != -1 && (t = RX_OFFS(rx)[paren].end) != -1) { - register I32 i; + I32 i; if (mg->mg_obj) /* @+ */ i = t; else /* @- */ @@ -685,9 +685,9 @@ U32 Perl_magic_len(pTHX_ SV *sv, MAGIC *mg) { dVAR; - register I32 paren; - register I32 i; - register const REGEXP * rx; + I32 paren; + I32 i; + const REGEXP * rx; const char * const remaining = mg->mg_ptr + 1; PERL_ARGS_ASSERT_MAGIC_LEN; @@ -804,9 +804,9 @@ int Perl_magic_get(pTHX_ SV *sv, MAGIC *mg) { dVAR; - register I32 paren; - register const char *s = NULL; - register REGEXP *rx; + I32 paren; + const char *s = NULL; + REGEXP *rx; const char * const remaining = mg->mg_ptr + 1; const char nextchar = *remaining; @@ -1514,7 +1514,7 @@ Perl_magic_setsig(pTHX_ SV *sv, MAGIC *mg) sigset_t set, save; SV* save_sv; #endif - register const char *s = MgPV_const(mg,len); + const char *s = MgPV_const(mg,len); PERL_ARGS_ASSERT_MAGIC_SETSIG; @@ -2499,9 +2499,9 @@ int Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) { dVAR; - register const char *s; - register I32 paren; - register const REGEXP * rx; + const char *s; + I32 paren; + const REGEXP * rx; const char * const remaining = mg->mg_ptr + 1; I32 i; STRLEN len; @@ -3076,7 +3076,7 @@ Perl_whichsig_pv(pTHX_ const char *sig) I32 Perl_whichsig_pvn(pTHX_ const char *sig, STRLEN len) { - register char* const* sigv; + char* const* sigv; PERL_ARGS_ASSERT_WHICHSIG_PVN; PERL_UNUSED_CONTEXT; diff --git a/mpeix/mpeix.c b/mpeix/mpeix.c index 90f5af0856..f289a4b09b 100644 --- a/mpeix/mpeix.c +++ b/mpeix/mpeix.c @@ -412,7 +412,7 @@ struct timezone *tpz; static int dsttime = 0; static int minuteswest = 0; static int oldtime = 0; - register int newtime; + int newtime; /*-------------------------------------------------------------------*/ @@ -883,8 +883,8 @@ STATIC void S_mro_gather_and_rename(pTHX_ HV * const stashes, HV * const seen_stashes, HV *stash, HV *oldstash, SV *namesv) { - register XPVHV* xhv; - register HE *entry; + XPVHV* xhv; + HE *entry; I32 riter = -1; I32 items = 0; const bool stash_had_name = stash && HvENAME(stash); @@ -689,7 +689,7 @@ Perl_op_free(pTHX_ OP *o) CALL_OPFREEHOOK(o); if (o->op_flags & OPf_KIDS) { - register OP *kid, *nextkid; + OP *kid, *nextkid; for (kid = cUNOPo->op_first; kid; kid = nextkid) { nextkid = kid->op_sibling; /* Get before next freeing kid */ op_free(kid); @@ -1043,7 +1043,7 @@ Perl_op_linklist(pTHX_ OP *o) /* establish postfix order */ first = cUNOPo->op_first; if (first) { - register OP *kid; + OP *kid; o->op_next = LINKLIST(first); kid = first; for (;;) { @@ -3111,7 +3111,7 @@ static OP * S_fold_constants(pTHX_ register OP *o) { dVAR; - register OP * VOL curop; + OP * VOL curop; OP *newop; VOL I32 type = o->op_type; SV * VOL sv = NULL; @@ -3261,7 +3261,7 @@ static OP * S_gen_constant_list(pTHX_ register OP *o) { dVAR; - register OP *curop; + OP *curop; const I32 oldtmps_floor = PL_tmps_floor; list(o); @@ -3963,10 +3963,10 @@ S_pmtrans(pTHX_ OP *o, OP *expr, OP *repl) STRLEN rlen; const U8 *t = (U8*)SvPV_const(tstr, tlen); const U8 *r = (U8*)SvPV_const(rstr, rlen); - register I32 i; - register I32 j; + I32 i; + I32 j; I32 grows = 0; - register short *tbl; + short *tbl; const I32 complement = o->op_private & OPpTRANS_COMPLEMENT; const I32 squash = o->op_private & OPpTRANS_SQUASH; @@ -5567,7 +5567,7 @@ Perl_newSTATEOP(pTHX_ I32 flags, char *label, OP *o) dVAR; const U32 seq = intro_my(); const U32 utf8 = flags & SVf_UTF8; - register COP *cop; + COP *cop; flags &= ~SVf_UTF8; @@ -6867,7 +6867,7 @@ Perl_newATTRSUB_flags(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, const char *ps; STRLEN ps_len = 0; /* init it to avoid false uninit warning from icc */ U32 ps_utf8 = 0; - register CV *cv = NULL; + CV *cv = NULL; SV *const_sv; const bool ec = PL_parser && PL_parser->error_count; /* If the subroutine has no body, no attributes, and no builtin attributes @@ -7475,7 +7475,7 @@ Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len, CV * Perl_newSTUB(pTHX_ GV *gv, bool fake) { - register CV *cv = MUTABLE_CV(newSV_type(SVt_PVCV)); + CV *cv = MUTABLE_CV(newSV_type(SVt_PVCV)); PERL_ARGS_ASSERT_NEWSTUB; assert(!GvCVu(gv)); GvCV_set(gv, cv); @@ -7515,7 +7515,7 @@ void Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block) { dVAR; - register CV *cv; + CV *cv; #ifdef PERL_MAD OP* pegop = newOP(OP_NULL, 0); #endif @@ -8217,7 +8217,7 @@ Perl_ck_fun(pTHX_ OP *o) { dVAR; const int type = o->op_type; - register I32 oa = PL_opargs[type] >> OASHIFT; + I32 oa = PL_opargs[type] >> OASHIFT; PERL_ARGS_ASSERT_CK_FUN; @@ -8230,7 +8230,7 @@ Perl_ck_fun(pTHX_ OP *o) if (o->op_flags & OPf_KIDS) { OP **tokid = &cLISTOPo->op_first; - register OP *kid = cLISTOPo->op_first; + OP *kid = cLISTOPo->op_first; OP *sibl; I32 numargs = 0; bool seen_optional = FALSE; @@ -8737,7 +8737,7 @@ Perl_ck_rfun(pTHX_ OP *o) OP * Perl_ck_listiob(pTHX_ OP *o) { - register OP *kid; + OP *kid; PERL_ARGS_ASSERT_CK_LISTIOB; @@ -9207,7 +9207,7 @@ STATIC void S_simplify_sort(pTHX_ OP *o) { dVAR; - register OP *kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */ + OP *kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */ OP *k; int descending; GV *gv; @@ -9314,7 +9314,7 @@ OP * Perl_ck_split(pTHX_ OP *o) { dVAR; - register OP *kid; + OP *kid; PERL_ARGS_ASSERT_CK_SPLIT; @@ -10337,7 +10337,7 @@ void Perl_rpeep(pTHX_ register OP *o) { dVAR; - register OP* oldop = NULL; + OP* oldop = NULL; OP* defer_queue[MAX_DEFERRED]; /* small queue of deferred branches */ int defer_base = 0; int defer_ix = -1; diff --git a/os2/OS2/OS2-REXX/REXX.pm b/os2/OS2/OS2-REXX/REXX.pm index ca9fee69ce..a094232029 100644 --- a/os2/OS2/OS2-REXX/REXX.pm +++ b/os2/OS2/OS2-REXX/REXX.pm @@ -11,7 +11,7 @@ require OS2::DLL; # Other items we are prepared to export if requested @EXPORT_OK = qw(drop register); -$VERSION = '1.04'; +$VERSION = '1.05'; # We cannot just put OS2::DLL in @ISA, since some scripts would use # function interface, not method interface... diff --git a/os2/OS2/OS2-REXX/REXX.xs b/os2/OS2/OS2-REXX/REXX.xs index 6f4bf2b416..fdbed09767 100644 --- a/os2/OS2/OS2-REXX/REXX.xs +++ b/os2/OS2/OS2-REXX/REXX.xs @@ -61,7 +61,7 @@ static ULONG (*pRexxVariablePool) (PSHVBLOCK pRequest); static SV* exec_cv; /* Create a REXX compartment, - register `n' callbacks `handlers' with the REXX names `handlerNames', + `n' callbacks `handlers' with the REXX names `handlerNames', evaluate the REXX expression `cmd'. */ static SV* @@ -1345,8 +1345,8 @@ do_spawn_ve(pTHX_ SV *really, U32 flag, U32 execf, char *inicmd, U32 addflag) int do_spawn3(pTHX_ char *cmd, int execf, int flag) { - register char **a; - register char *s; + char **a; + char *s; char *shell, *copt, *news = NULL; int rc, seenspace = 0, mergestderr = 0; @@ -1477,9 +1477,9 @@ do_spawn3(pTHX_ char *cmd, int execf, int flag) int os2_aspawn_4(pTHX_ SV *really, register SV **args, I32 cnt, int execing) { - register SV **argp = (SV **)args; - register SV **last = argp + cnt; - register char **a; + SV **argp = (SV **)args; + SV **last = argp + cnt; + char **a; int rc; int flag = P_WAIT, flag_set = 0; STRLEN n_a; @@ -1560,8 +1560,8 @@ my_syspopen4(pTHX_ char *cmd, char *mode, I32 cnt, SV** args) { #ifndef USE_POPEN int p[2]; - register I32 this, that, newfd; - register I32 pid; + I32 this, that, newfd; + I32 pid; SV *sv; int fh_fl = 0; /* Pacify the warning */ @@ -1649,7 +1649,7 @@ S_pad_reset(pTHX) ); if (!PL_tainting) { /* Can't mix tainted and non-tainted temporaries. */ - register I32 po; + I32 po; for (po = AvMAX(PL_comppad); po > PL_padix_floor; po--) { if (PL_curpad[po] && !SvIMMORTAL(PL_curpad[po])) SvPADTMP_off(PL_curpad[po]); @@ -1143,7 +1143,7 @@ perl_destruct(pTHXx) if (PL_sv_count != 0) { SV* sva; SV* sv; - register SV* svend; + SV* svend; for (sva = PL_sv_arenaroot; sva; sva = MUTABLE_SV(SvANY(sva))) { svend = &sva[SvREFCNT(sva)]; @@ -1777,7 +1777,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) char **argv = PL_origargv; const char *scriptname = NULL; VOL bool dosearch = FALSE; - register char c; + char c; bool doextract = FALSE; const char *cddir = NULL; #ifdef USE_SITECUSTOMIZE @@ -3765,7 +3765,7 @@ S_find_beginning(pTHX_ SV* linestr_sv, PerlIO *rsfp) { dVAR; const char *s; - register const char *s2; + const char *s2; PERL_ARGS_ASSERT_FIND_BEGINNING; @@ -238,15 +238,15 @@ Perl_yyparse (pTHX_ int gramtype) #endif { dVAR; - register int yystate; - register int yyn; + int yystate; + int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; - register yy_parser *parser; /* the parser object */ - register yy_stack_frame *ps; /* current parser stack frame */ + yy_parser *parser; /* the parser object */ + yy_stack_frame *ps; /* current parser stack frame */ #define YYPOPSTACK parser->ps = --ps #define YYPUSHSTACK parser->ps = ++ps diff --git a/pod/perlhacktut.pod b/pod/perlhacktut.pod index 33a9ef23e8..fc0833649b 100644 --- a/pod/perlhacktut.pod +++ b/pod/perlhacktut.pod @@ -53,19 +53,19 @@ test whether we're still at the start of the string. So, here's where C<pat> is set up: STRLEN fromlen; - register char *pat = SvPVx(*++MARK, fromlen); - register char *patend = pat + fromlen; - register I32 len; + char *pat = SvPVx(*++MARK, fromlen); + char *patend = pat + fromlen; + I32 len; I32 datumtype; SV *fromstr; We'll have another string pointer in there: STRLEN fromlen; - register char *pat = SvPVx(*++MARK, fromlen); - register char *patend = pat + fromlen; + char *pat = SvPVx(*++MARK, fromlen); + char *patend = pat + fromlen; + char *patcopy; - register I32 len; + I32 len; I32 datumtype; SV *fromstr; @@ -1083,8 +1083,8 @@ PP(pp_pow) SvIV_please_nomg(svr); RETURN; } else { - register unsigned int highbit = 8 * sizeof(UV); - register unsigned int diff = 8 * sizeof(UV); + unsigned int highbit = 8 * sizeof(UV); + unsigned int diff = 8 * sizeof(UV); while (diff >>= 1) { highbit -= diff; if (baseuv >> highbit) { @@ -1095,8 +1095,8 @@ PP(pp_pow) if (power * highbit <= 8 * sizeof(UV)) { /* result will definitely fit in UV, so use UV math on same algorithm as above */ - register UV result = 1; - register UV base = baseuv; + UV result = 1; + UV base = baseuv; const bool odd_power = cBOOL(power & 1); if (odd_power) { result *= base; @@ -1551,7 +1551,7 @@ PP(pp_modulo) PP(pp_repeat) { dVAR; dSP; dATARGET; - register IV count; + IV count; SV *sv; if (GIMME == G_ARRAY && PL_op->op_private & OPpREPEAT_DOLIST) { @@ -1697,7 +1697,7 @@ PP(pp_subtract) /* Unless the left argument is integer in range we are going to have to use NV maths. Hence only attempt to coerce the right argument if we know the left is integer. */ - register UV auv = 0; + UV auv = 0; bool auvok = FALSE; bool a_valid = 0; @@ -1711,7 +1711,7 @@ PP(pp_subtract) if ((auvok = SvUOK(svl))) auv = SvUVX(svl); else { - register const IV aiv = SvIVX(svl); + const IV aiv = SvIVX(svl); if (aiv >= 0) { auv = aiv; auvok = 1; /* Now acting as a sign flag. */ @@ -1725,13 +1725,13 @@ PP(pp_subtract) if (a_valid) { bool result_good = 0; UV result; - register UV buv; + UV buv; bool buvok = SvUOK(svr); if (buvok) buv = SvUVX(svr); else { - register const IV biv = SvIVX(svr); + const IV biv = SvIVX(svr); if (biv >= 0) { buv = biv; buvok = 1; @@ -2242,8 +2242,8 @@ PP(pp_complement) } } else { - register U8 *tmps; - register I32 anum; + U8 *tmps; + I32 anum; STRLEN len; (void)SvPV_nomg_const(sv,len); /* force check for uninit var */ @@ -2308,7 +2308,7 @@ PP(pp_complement) } #ifdef LIBERAL { - register long *tmpl; + long *tmpl; for ( ; anum && (unsigned long)tmps % sizeof(long); anum--, tmps++) *tmps = ~*tmps; tmpl = (long*)tmps; @@ -3087,9 +3087,9 @@ bound_fail: PP(pp_vec) { dVAR; dSP; - register const IV size = POPi; - register const IV offset = POPi; - register SV * const src = POPs; + const IV size = POPi; + const IV offset = POPi; + SV * const src = POPs; const I32 lvalue = PL_op->op_flags & OPf_MOD || LVRET; SV * ret; @@ -4009,11 +4009,11 @@ PP(pp_quotemeta) dVAR; dSP; dTARGET; SV * const sv = TOPs; STRLEN len; - register const char *s = SvPV_const(sv,len); + const char *s = SvPV_const(sv,len); SvUTF8_off(TARG); /* decontaminate */ if (len) { - register char *d; + char *d; SvUPGRADE(TARG, SVt_PV); SvGROW(TARG, (len * 2) + 1); d = SvPVX(TARG); @@ -4236,8 +4236,8 @@ PP(pp_fc) PP(pp_aslice) { dVAR; dSP; dMARK; dORIGMARK; - register AV *const av = MUTABLE_AV(POPs); - register const I32 lval = (PL_op->op_flags & OPf_MOD || LVRET); + AV *const av = MUTABLE_AV(POPs); + const I32 lval = (PL_op->op_flags & OPf_MOD || LVRET); if (SvTYPE(av) == SVt_PVAV) { const bool localizing = PL_op->op_private & OPpLVAL_INTRO; @@ -4251,7 +4251,7 @@ PP(pp_aslice) } if (lval && localizing) { - register SV **svp; + SV **svp; I32 max = -1; for (svp = MARK + 1; svp <= SP; svp++) { const I32 elem = SvIV(*svp); @@ -4263,7 +4263,7 @@ PP(pp_aslice) } while (++MARK <= SP) { - register SV **svp; + SV **svp; I32 elem = SvIV(*MARK); bool preeminent = TRUE; @@ -4439,8 +4439,7 @@ S_do_delete_local(pTHX) const bool sliced = !!(PL_op->op_private & OPpSLICE); SV *unsliced_keysv = sliced ? NULL : POPs; SV * const osv = POPs; - register SV **mark = - sliced ? PL_stack_base + POPMARK : &unsliced_keysv-1; + SV **mark = sliced ? PL_stack_base + POPMARK : &unsliced_keysv-1; dORIGMARK; const bool tied = SvRMAGICAL(osv) && mg_find((const SV *)osv, PERL_MAGIC_tied); @@ -4643,8 +4642,8 @@ PP(pp_exists) PP(pp_hslice) { dVAR; dSP; dMARK; dORIGMARK; - register HV * const hv = MUTABLE_HV(POPs); - register const I32 lval = (PL_op->op_flags & OPf_MOD || LVRET); + HV * const hv = MUTABLE_HV(POPs); + const I32 lval = (PL_op->op_flags & OPf_MOD || LVRET); const bool localizing = PL_op->op_private & OPpLVAL_INTRO; bool can_preserve = FALSE; @@ -4719,11 +4718,11 @@ PP(pp_lslice) SV ** const lastrelem = PL_stack_sp; SV ** const lastlelem = PL_stack_base + POPMARK; SV ** const firstlelem = PL_stack_base + POPMARK + 1; - register SV ** const firstrelem = lastlelem + 1; + SV ** const firstrelem = lastlelem + 1; I32 is_something_there = FALSE; - register const I32 max = lastrelem - lastlelem; - register SV **lelem; + const I32 max = lastrelem - lastlelem; + SV **lelem; if (GIMME != G_ARRAY) { I32 ix = SvIV(*lastlelem); @@ -4826,12 +4825,12 @@ PP(pp_splice) { dVAR; dSP; dMARK; dORIGMARK; int num_args = (SP - MARK); - register AV *ary = DEREF_PLAIN_ARRAY(MUTABLE_AV(*++MARK)); - register SV **src; - register SV **dst; - register I32 i; - register I32 offset; - register I32 length; + AV *ary = DEREF_PLAIN_ARRAY(MUTABLE_AV(*++MARK)); + SV **src; + SV **dst; + I32 i; + I32 offset; + I32 length; I32 newlen; I32 after; I32 diff; @@ -5028,7 +5027,7 @@ PP(pp_splice) PP(pp_push) { dVAR; dSP; dMARK; dORIGMARK; dTARGET; - register AV * const ary = DEREF_PLAIN_ARRAY(MUTABLE_AV(*++MARK)); + AV * const ary = DEREF_PLAIN_ARRAY(MUTABLE_AV(*++MARK)); const MAGIC * const mg = SvTIED_mg((const SV *)ary, PERL_MAGIC_tied); if (mg) { @@ -5078,7 +5077,7 @@ PP(pp_shift) PP(pp_unshift) { dVAR; dSP; dMARK; dORIGMARK; dTARGET; - register AV *ary = DEREF_PLAIN_ARRAY(MUTABLE_AV(*++MARK)); + AV *ary = DEREF_PLAIN_ARRAY(MUTABLE_AV(*++MARK)); const MAGIC * const mg = SvTIED_mg((const SV *)ary, PERL_MAGIC_tied); if (mg) { @@ -5091,7 +5090,7 @@ PP(pp_unshift) SPAGAIN; } else { - register I32 i = 0; + I32 i = 0; av_unshift(ary, SP - MARK); while (MARK < SP) { SV * const sv = newSVsv(*++MARK); @@ -5123,26 +5122,26 @@ PP(pp_reverse) if (SvMAGICAL(av)) { I32 i, j; - register SV *tmp = sv_newmortal(); + SV *tmp = sv_newmortal(); /* For SvCANEXISTDELETE */ HV *stash; const MAGIC *mg; bool can_preserve = SvCANEXISTDELETE(av); for (i = 0, j = av_len(av); i < j; ++i, --j) { - register SV *begin, *end; + SV *begin, *end; if (can_preserve) { if (!av_exists(av, i)) { if (av_exists(av, j)) { - register SV *sv = av_delete(av, j, 0); + SV *sv = av_delete(av, j, 0); begin = *av_fetch(av, i, TRUE); sv_setsv_mg(begin, sv); } continue; } else if (!av_exists(av, j)) { - register SV *sv = av_delete(av, i, 0); + SV *sv = av_delete(av, i, 0); end = *av_fetch(av, j, TRUE); sv_setsv_mg(end, sv); continue; @@ -5163,7 +5162,7 @@ PP(pp_reverse) SV **end = begin + AvFILLp(av); while (begin < end) { - register SV * const tmp = *begin; + SV * const tmp = *begin; *begin++ = *end; *end-- = tmp; } @@ -5174,7 +5173,7 @@ PP(pp_reverse) SV **oldsp = SP; MARK++; while (MARK < SP) { - register SV * const tmp = *MARK; + SV * const tmp = *MARK; *MARK++ = *SP; *SP-- = tmp; } @@ -5183,9 +5182,9 @@ PP(pp_reverse) } } else { - register char *up; - register char *down; - register I32 tmp; + char *up; + char *down; + I32 tmp; dTARGET; STRLEN len; @@ -5242,16 +5241,16 @@ PP(pp_split) { dVAR; dSP; dTARG; AV *ary; - register IV limit = POPi; /* note, negative is forever */ + IV limit = POPi; /* note, negative is forever */ SV * const sv = POPs; STRLEN len; - register const char *s = SvPV_const(sv, len); + const char *s = SvPV_const(sv, len); const bool do_utf8 = DO_UTF8(sv); const char *strend = s + len; - register PMOP *pm; - register REGEXP *rx; - register SV *dstr; - register const char *m; + PMOP *pm; + REGEXP *rx; + SV *dstr; + const char *m; I32 iters = 0; const STRLEN slen = do_utf8 ? utf8_length((U8*)s, (U8*)strend) : (STRLEN)(strend - s); I32 maxiters = slen + 10; @@ -77,7 +77,7 @@ PP(pp_regcomp) { dVAR; dSP; - register PMOP *pm = (PMOP*)cLOGOP->op_other; + PMOP *pm = (PMOP*)cLOGOP->op_other; SV **args; int nargs; REGEXP *re = NULL; @@ -177,13 +177,13 @@ PP(pp_substcont) { dVAR; dSP; - register PERL_CONTEXT *cx = &cxstack[cxstack_ix]; - register PMOP * const pm = (PMOP*) cLOGOP->op_other; - register SV * const dstr = cx->sb_dstr; - register char *s = cx->sb_s; - register char *m = cx->sb_m; + PERL_CONTEXT *cx = &cxstack[cxstack_ix]; + PMOP * const pm = (PMOP*) cLOGOP->op_other; + SV * const dstr = cx->sb_dstr; + char *s = cx->sb_s; + char *m = cx->sb_m; char *orig = cx->sb_orig; - register REGEXP * const rx = cx->sb_rx; + REGEXP * const rx = cx->sb_rx; SV *nsv = NULL; REGEXP *old = PM_GETRE(pm); @@ -445,13 +445,13 @@ S_rxres_free(pTHX_ void **rsp) PP(pp_formline) { dVAR; dSP; dMARK; dORIGMARK; - register SV * const tmpForm = *++MARK; + SV * const tmpForm = *++MARK; SV *formsv; /* contains text of original format */ - register U32 *fpc; /* format ops program counter */ - register char *t; /* current append position in target string */ + U32 *fpc; /* format ops program counter */ + char *t; /* current append position in target string */ const char *f; /* current position in format string */ - register I32 arg; - register SV *sv = NULL; /* current item */ + I32 arg; + SV *sv = NULL; /* current item */ const char *item = NULL;/* string value of current item */ I32 itemsize = 0; /* length of current item, possibly truncated */ I32 fieldsize = 0; /* width of current field */ @@ -1209,7 +1209,7 @@ PP(pp_flop) SvGETMAGIC(right); if (RANGE_IS_NUMERIC(left,right)) { - register IV i, j; + IV i, j; IV max; if ((SvOK(left) && SvNV_nomg(left) < IV_MIN) || (SvOK(right) && SvNV_nomg(right) > IV_MAX)) @@ -1293,12 +1293,12 @@ STATIC I32 S_dopoptolabel(pTHX_ const char *label, STRLEN len, U32 flags) { dVAR; - register I32 i; + I32 i; PERL_ARGS_ASSERT_DOPOPTOLABEL; for (i = cxstack_ix; i >= 0; i--) { - register const PERL_CONTEXT * const cx = &cxstack[i]; + const PERL_CONTEXT * const cx = &cxstack[i]; switch (CxTYPE(cx)) { case CXt_SUBST: case CXt_SUB: @@ -1410,7 +1410,7 @@ S_dopoptosub_at(pTHX_ const PERL_CONTEXT *cxstk, I32 startingblock) PERL_ARGS_ASSERT_DOPOPTOSUB_AT; for (i = startingblock; i >= 0; i--) { - register const PERL_CONTEXT * const cx = &cxstk[i]; + const PERL_CONTEXT * const cx = &cxstk[i]; switch (CxTYPE(cx)) { default: continue; @@ -1430,7 +1430,7 @@ S_dopoptoeval(pTHX_ I32 startingblock) dVAR; I32 i; for (i = startingblock; i >= 0; i--) { - register const PERL_CONTEXT *cx = &cxstack[i]; + const PERL_CONTEXT *cx = &cxstack[i]; switch (CxTYPE(cx)) { default: continue; @@ -1448,7 +1448,7 @@ S_dopoptoloop(pTHX_ I32 startingblock) dVAR; I32 i; for (i = startingblock; i >= 0; i--) { - register const PERL_CONTEXT * const cx = &cxstack[i]; + const PERL_CONTEXT * const cx = &cxstack[i]; switch (CxTYPE(cx)) { case CXt_SUBST: case CXt_SUB: @@ -1478,7 +1478,7 @@ S_dopoptogiven(pTHX_ I32 startingblock) dVAR; I32 i; for (i = startingblock; i >= 0; i--) { - register const PERL_CONTEXT *cx = &cxstack[i]; + const PERL_CONTEXT *cx = &cxstack[i]; switch (CxTYPE(cx)) { default: continue; @@ -1506,7 +1506,7 @@ S_dopoptowhen(pTHX_ I32 startingblock) dVAR; I32 i; for (i = startingblock; i >= 0; i--) { - register const PERL_CONTEXT *cx = &cxstack[i]; + const PERL_CONTEXT *cx = &cxstack[i]; switch (CxTYPE(cx)) { default: continue; @@ -1529,7 +1529,7 @@ Perl_dounwind(pTHX_ I32 cxix) while (cxstack_ix > cxix) { SV *sv; - register PERL_CONTEXT *cx = &cxstack[cxstack_ix]; + PERL_CONTEXT *cx = &cxstack[cxstack_ix]; DEBUG_CX("UNWIND"); \ /* Note: we don't need to restore the base context info till the end. */ switch (CxTYPE(cx)) { @@ -1639,7 +1639,7 @@ Perl_die_unwind(pTHX_ SV *msv) if (cxix >= 0) { I32 optype; SV *namesv; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; SV **newsp; COP *oldcop; JMPENV *restartjmpenv; @@ -1737,9 +1737,9 @@ frame for the sub call itself. const PERL_CONTEXT * Perl_caller_cx(pTHX_ I32 count, const PERL_CONTEXT **dbcxp) { - register I32 cxix = dopoptosub(cxstack_ix); - register const PERL_CONTEXT *cx; - register const PERL_CONTEXT *ccstack = cxstack; + I32 cxix = dopoptosub(cxstack_ix); + const PERL_CONTEXT *cx; + const PERL_CONTEXT *ccstack = cxstack; const PERL_SI *top_si = PL_curstackinfo; for (;;) { @@ -1779,7 +1779,7 @@ PP(pp_caller) { dVAR; dSP; - register const PERL_CONTEXT *cx; + const PERL_CONTEXT *cx; const PERL_CONTEXT *dbcx; I32 gimme; const HEK *stash_hek; @@ -1950,11 +1950,11 @@ PP(pp_dbstate) || SvIV(PL_DBsingle) || SvIV(PL_DBsignal) || SvIV(PL_DBtrace)) { dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; const I32 gimme = G_ARRAY; U8 hasargs; GV * const gv = PL_DBgv; - register CV * const cv = GvCV(gv); + CV * const cv = GvCV(gv); if (!cv) DIE(aTHX_ "No DB::DB routine defined"); @@ -2035,7 +2035,7 @@ S_adjust_stack_on_leave(pTHX_ SV **newsp, SV **sp, SV **mark, I32 gimme, U32 fla PP(pp_enter) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; I32 gimme = GIMME_V; ENTER_with_name("block"); @@ -2049,7 +2049,7 @@ PP(pp_enter) PP(pp_leave) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; SV **newsp; PMOP *newpm; I32 gimme; @@ -2075,7 +2075,7 @@ PP(pp_leave) PP(pp_enteriter) { dVAR; dSP; dMARK; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; const I32 gimme = GIMME_V; void *itervar; /* location of the iteration variable */ U8 cxtype = CXt_LOOP_FOR; @@ -2198,7 +2198,7 @@ PP(pp_enteriter) PP(pp_enterloop) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; const I32 gimme = GIMME_V; ENTER_with_name("loop1"); @@ -2214,7 +2214,7 @@ PP(pp_enterloop) PP(pp_leaveloop) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; I32 gimme; SV **newsp; PMOP *newpm; @@ -2351,7 +2351,7 @@ S_return_lvalues(pTHX_ SV **mark, SV **sp, SV **newsp, I32 gimme, PP(pp_return) { dVAR; dSP; dMARK; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; bool popsub2 = FALSE; bool clear_errsv = FALSE; bool lval = FALSE; @@ -2495,7 +2495,7 @@ PP(pp_leavesublv) SV **newsp; PMOP *newpm; I32 gimme; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; SV *sv; if (CxMULTICALL(&cxstack[cxstack_ix])) @@ -2560,7 +2560,7 @@ S_unwind_loop(pTHX_ const char * const opname) PP(pp_last) { dVAR; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; I32 pop2 = 0; I32 gimme; I32 optype; @@ -2630,7 +2630,7 @@ PP(pp_last) PP(pp_next) { dVAR; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; const I32 inner = PL_scopestack_ix; S_unwind_loop(aTHX_ "next"); @@ -2648,7 +2648,7 @@ PP(pp_redo) { dVAR; const I32 cxix = S_unwind_loop(aTHX_ "redo"); - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; I32 oldsave; OP* redo_op = cxstack[cxix].blk_loop.my_op->op_redoop; @@ -2737,7 +2737,7 @@ PP(pp_goto) dVAR; dSP; OP *retop = NULL; I32 ix; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; #define GOTO_DEPTH 64 OP *enterops[GOTO_DEPTH]; const char *label = NULL; @@ -2752,7 +2752,7 @@ PP(pp_goto) /* This egregious kludge implements goto &subroutine */ if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVCV) { I32 cxix; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; CV *cv = MUTABLE_CV(SvRV(sv)); SV** mark; I32 items = 0; @@ -3570,7 +3570,7 @@ S_doopen_pm(pTHX_ SV *name) PP(pp_require) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; SV *sv; const char *name; STRLEN len; @@ -4014,7 +4014,7 @@ PP(pp_hintseval) PP(pp_entereval) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; SV *sv; const I32 gimme = GIMME_V; const U32 was = PL_breakable_sub_gen; @@ -4145,7 +4145,7 @@ PP(pp_leaveeval) SV **newsp; PMOP *newpm; I32 gimme; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; OP *retop; const U8 save_flags = PL_op -> op_flags; I32 optype; @@ -4199,7 +4199,7 @@ Perl_delete_eval_scope(pTHX) SV **newsp; PMOP *newpm; I32 gimme; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; I32 optype; POPBLOCK(cx,newpm); @@ -4250,7 +4250,7 @@ PP(pp_leavetry) SV **newsp; PMOP *newpm; I32 gimme; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; I32 optype; PERL_ASYNC_CHECK(); @@ -4270,7 +4270,7 @@ PP(pp_leavetry) PP(pp_entergiven) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; const I32 gimme = GIMME_V; ENTER_with_name("given"); @@ -4295,7 +4295,7 @@ PP(pp_entergiven) PP(pp_leavegiven) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; I32 gimme; SV **newsp; PMOP *newpm; @@ -4843,7 +4843,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other, const bool copied) PP(pp_enterwhen) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; const I32 gimme = GIMME_V; /* This is essentially an optimization: if the match @@ -4868,7 +4868,7 @@ PP(pp_leavewhen) { dVAR; dSP; I32 cxix; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; I32 gimme; SV **newsp; PMOP *newpm; @@ -4912,7 +4912,7 @@ PP(pp_continue) { dVAR; dSP; I32 cxix; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; I32 gimme; SV **newsp; PMOP *newpm; @@ -4940,7 +4940,7 @@ PP(pp_break) { dVAR; I32 cxix; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; cxix = dopoptogiven(cxstack_ix); if (cxix < 0) @@ -4963,17 +4963,17 @@ static MAGIC * S_doparseform(pTHX_ SV *sv) { STRLEN len; - register char *s = SvPV(sv, len); - register char *send; - register char *base = NULL; /* start of current field */ - register I32 skipspaces = 0; /* number of contiguous spaces seen */ + char *s = SvPV(sv, len); + char *send; + char *base = NULL; /* start of current field */ + I32 skipspaces = 0; /* number of contiguous spaces seen */ bool noblank = FALSE; /* ~ or ~~ seen on this line */ bool repeat = FALSE; /* ~~ seen on this line */ bool postspace = FALSE; /* a text field may need right padding */ U32 *fops; - register U32 *fpc; + U32 *fpc; U32 *linepc = NULL; /* position of last FF_LINEMARK */ - register I32 arg; + I32 arg; bool ischop; /* it's a ^ rather than a @ */ bool unchopnum = FALSE; /* at least one @ (i.e. non-chop) num field seen */ int maxops = 12; /* FF_LINEMARK + FF_END + 10 (\0 without preceding \n) */ @@ -399,7 +399,7 @@ PP(pp_or) PP(pp_defined) { dVAR; dSP; - register SV* sv; + SV* sv; bool defined; const int op_type = PL_op->op_type; const bool is_dor = (op_type == OP_DOR || op_type == OP_DORASSIGN); @@ -513,7 +513,7 @@ PP(pp_add) /* Unless the left argument is integer in range we are going to have to use NV maths. Hence only attempt to coerce the right argument if we know the left is integer. */ - register UV auv = 0; + UV auv = 0; bool auvok = FALSE; bool a_valid = 0; @@ -529,7 +529,7 @@ PP(pp_add) if ((auvok = SvUOK(svl))) auv = SvUVX(svl); else { - register const IV aiv = SvIVX(svl); + const IV aiv = SvIVX(svl); if (aiv >= 0) { auv = aiv; auvok = 1; /* Now acting as a sign flag. */ @@ -543,13 +543,13 @@ PP(pp_add) if (a_valid) { bool result_good = 0; UV result; - register UV buv; + UV buv; bool buvok = SvUOK(svr); if (buvok) buv = SvUVX(svr); else { - register const IV biv = SvIVX(svr); + const IV biv = SvIVX(svr); if (biv >= 0) { buv = biv; buvok = 1; @@ -668,7 +668,7 @@ PP(pp_pushre) PP(pp_print) { dVAR; dSP; dMARK; dORIGMARK; - register PerlIO *fp; + PerlIO *fp; MAGIC *mg; GV * const gv = (PL_op->op_flags & OPf_STACKED) ? MUTABLE_GV(*++MARK) : PL_defoutgv; @@ -933,11 +933,11 @@ PP(pp_aassign) SV **firstrelem = PL_stack_base + POPMARK + 1; SV **firstlelem = lastrelem + 1; - register SV **relem; - register SV **lelem; + SV **relem; + SV **lelem; - register SV *sv; - register AV *ary; + SV *sv; + AV *ary; I32 gimme; HV *hash; @@ -1208,7 +1208,7 @@ PP(pp_aassign) PP(pp_qr) { dVAR; dSP; - register PMOP * const pm = cPMOP; + PMOP * const pm = cPMOP; REGEXP * rx = PM_GETRE(pm); SV * const pkg = rx ? CALLREG_PACKAGE(rx) : NULL; SV * const rv = sv_newmortal(); @@ -1248,15 +1248,15 @@ PP(pp_qr) PP(pp_match) { dVAR; dSP; dTARG; - register PMOP *pm = cPMOP; + PMOP *pm = cPMOP; PMOP *dynpm = pm; - register const char *t; - register const char *s; + const char *t; + const char *s; const char *strend; I32 global; U8 r_flags = REXEC_CHECKED; const char *truebase; /* Start of string */ - register REGEXP *rx = PM_GETRE(pm); + REGEXP *rx = PM_GETRE(pm); bool rxtainted; const I32 gimme = GIMME; STRLEN len; @@ -1562,12 +1562,12 @@ OP * Perl_do_readline(pTHX) { dVAR; dSP; dTARGETSTACKED; - register SV *sv; + SV *sv; STRLEN tmplen = 0; STRLEN offset; PerlIO *fp; - register IO * const io = GvIO(PL_last_in_gv); - register const I32 type = PL_op->op_type; + IO * const io = GvIO(PL_last_in_gv); + const I32 type = PL_op->op_type; const I32 gimme = GIMME_V; if (io) { @@ -1852,7 +1852,7 @@ PP(pp_helem) PP(pp_iter) { dVAR; dSP; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; SV *sv, *oldsv; SV **itersvp; AV *av = NULL; /* used for LOOP_FOR on arrays and the stack */ @@ -2055,23 +2055,23 @@ pp_match is just a simpler version of the above. PP(pp_subst) { dVAR; dSP; dTARG; - register PMOP *pm = cPMOP; + PMOP *pm = cPMOP; PMOP *rpm = pm; - register char *s; + char *s; char *strend; - register char *m; + char *m; const char *c; - register char *d; + char *d; STRLEN clen; I32 iters = 0; I32 maxiters; - register I32 i; + I32 i; bool once; U8 rxtainted = 0; /* holds various SUBST_TAINT_* flag bits. See "how taint works" above */ char *orig; U8 r_flags; - register REGEXP *rx = PM_GETRE(pm); + REGEXP *rx = PM_GETRE(pm); STRLEN len; int force_on_match = 0; const I32 oldsave = PL_savestack_ix; @@ -2082,7 +2082,7 @@ PP(pp_subst) #endif SV *nsv = NULL; /* known replacement string? */ - register SV *dstr = (pm->op_pmflags & PMf_CONST) ? POPs : NULL; + SV *dstr = (pm->op_pmflags & PMf_CONST) ? POPs : NULL; PERL_ASYNC_CHECK(); @@ -2334,7 +2334,7 @@ PP(pp_subst) dstr = newSVpvn_flags(m, s-m, SVs_TEMP | (DO_UTF8(TARG) ? SVf_UTF8 : 0)); PL_curpm = pm; if (!c) { - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; SPAGAIN; /* note that a whole bunch of local vars are saved here for * use by pp_substcont: here's a list of them in case you're @@ -2496,7 +2496,7 @@ PP(pp_leavesub) SV **newsp; PMOP *newpm; I32 gimme; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; SV *sv; if (CxMULTICALL(&cxstack[cxstack_ix])) @@ -2560,8 +2560,8 @@ PP(pp_entersub) { dVAR; dSP; dPOPss; GV *gv; - register CV *cv; - register PERL_CONTEXT *cx; + CV *cv; + PERL_CONTEXT *cx; I32 gimme; const bool hasargs = (PL_op->op_flags & OPf_STACKED) != 0; @@ -2682,7 +2682,7 @@ try_autoload: if (!(CvISXSUB(cv))) { /* This path taken at least 75% of the time */ dMARK; - register I32 items = SP - MARK; + I32 items = SP - MARK; AV* const padlist = CvPADLIST(cv); PUSHBLOCK(cx, CXt_SUB, MARK); PUSHSUB(cx); @@ -3615,11 +3615,11 @@ extern const double _double_constants[]; PP(pp_pack) { dVAR; dSP; dMARK; dORIGMARK; dTARGET; - register SV *cat = TARG; + SV *cat = TARG; STRLEN fromlen; SV *pat_sv = *++MARK; - register const char *pat = SvPV_const(pat_sv, fromlen); - register const char *patend = pat + fromlen; + const char *pat = SvPV_const(pat_sv, fromlen); + const char *patend = pat + fromlen; MARK++; sv_setpvs(cat, ""); @@ -185,8 +185,8 @@ static IV dynprep(pTHX_ gptr *list1, gptr *list2, size_t nmemb, const SVCOMPARE_t cmp) { I32 sense; - register gptr *b, *p, *q, *t, *p2; - register gptr *last, *r; + gptr *b, *p, *q, *t, *p2; + gptr *last, *r; IV runs = 0; b = list1; @@ -354,7 +354,7 @@ S_mergesortsv(pTHX_ gptr *base, size_t nmemb, SVCOMPARE_t cmp, U32 flags) dVAR; IV i, run, offset; I32 sense, level; - register gptr *f1, *f2, *t, *b, *p; + gptr *f1, *f2, *t, *b, *p; int iwhich; gptr *aux; gptr *p1; @@ -392,7 +392,7 @@ S_mergesortsv(pTHX_ gptr *base, size_t nmemb, SVCOMPARE_t cmp, U32 flags) list1 = which[iwhich]; /* area where runs are now */ list2 = which[++iwhich]; /* area for merged runs */ do { - register gptr *l1, *l2, *tp2; + gptr *l1, *l2, *tp2; offset = stackp->offset; f1 = p1 = list1 + offset; /* start of first run */ p = tp2 = list2 + offset; /* where merged run will go */ @@ -422,7 +422,7 @@ S_mergesortsv(pTHX_ gptr *base, size_t nmemb, SVCOMPARE_t cmp, U32 flags) ** and -1 when equality should look high. */ - register gptr *q; + gptr *q; if (cmp(aTHX_ *f1, *f2) <= 0) { q = f2; b = f1; t = l1; sense = -1; @@ -763,7 +763,7 @@ doqsort_all_asserts( STATIC void /* the standard unstable (u) quicksort (qsort) */ S_qsortsvu(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t compare) { - register SV * temp; + SV * temp; struct partition_stack_entry partition_stack[QSORT_MAX_STACK]; int next_stack_entry = 0; int part_left; @@ -783,10 +783,10 @@ S_qsortsvu(pTHX_ SV ** array, size_t num_elts, SVCOMPARE_t compare) /* Inoculate large partitions against quadratic behavior */ if (num_elts > QSORT_PLAY_SAFE) { - register size_t n; - register SV ** const q = array; + size_t n; + SV ** const q = array; for (n = num_elts; n > 1; ) { - register const size_t j = (size_t)(n-- * Drand01()); + const size_t j = (size_t)(n-- * Drand01()); temp = q[j]; q[j] = q[n]; q[n] = temp; @@ -1350,8 +1350,8 @@ S_qsortsv(pTHX_ gptr *list1, size_t nmemb, SVCOMPARE_t cmp, U32 flags) { dVAR; if ((flags & SORTf_STABLE) != 0) { - register gptr **pp, *q; - register size_t n, j, i; + gptr **pp, *q; + size_t n, j, i; gptr *small[SMALLSORT], **indir, tmp; SVCOMPARE_t savecmp; if (nmemb <= 1) return; /* sorted trivially */ @@ -1473,8 +1473,8 @@ Perl_sortsv_flags(pTHX_ SV **array, size_t nmemb, SVCOMPARE_t cmp, U32 flags) PP(pp_sort) { dVAR; dSP; dMARK; dORIGMARK; - register SV **p1 = ORIGMARK+1, **p2; - register I32 max, i; + SV **p1 = ORIGMARK+1, **p2; + I32 max, i; AV* av = NULL; HV *stash; GV *gv; @@ -669,8 +669,8 @@ PP(pp_pipe_op) #ifdef HAS_PIPE dVAR; dSP; - register IO *rstio; - register IO *wstio; + IO *rstio; + IO *wstio; int fd[2]; GV * const wgv = MUTABLE_GV(POPs); @@ -1059,10 +1059,10 @@ PP(pp_sselect) { #ifdef HAS_SELECT dVAR; dSP; dTARGET; - register I32 i; - register I32 j; - register char *s; - register SV *sv; + I32 i; + I32 j; + char *s; + SV *sv; NV value; I32 maxlen = 0; I32 nfound; @@ -1322,7 +1322,7 @@ STATIC OP * S_doform(pTHX_ CV *cv, GV *gv, OP *retop) { dVAR; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; const I32 gimme = GIMME_V; PERL_ARGS_ASSERT_DOFORM; @@ -1350,8 +1350,8 @@ PP(pp_enterwrite) { dVAR; dSP; - register GV *gv; - register IO *io; + GV *gv; + IO *io; GV *fgv; CV *cv = NULL; SV *tmpsv = NULL; @@ -1390,12 +1390,12 @@ PP(pp_leavewrite) { dVAR; dSP; GV * const gv = cxstack[cxstack_ix].blk_format.gv; - register IO * const io = GvIOp(gv); + IO * const io = GvIOp(gv); PerlIO *ofp; PerlIO *fp; SV **newsp; I32 gimme; - register PERL_CONTEXT *cx; + PERL_CONTEXT *cx; OP *retop; if (!io || !(ofp = IoOFP(io))) @@ -2380,7 +2380,7 @@ PP(pp_socket) const int type = POPi; const int domain = POPi; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = gv ? GvIOn(gv) : NULL; + IO * const io = gv ? GvIOn(gv) : NULL; int fd; if (!io) { @@ -2428,8 +2428,8 @@ PP(pp_sockpair) const int domain = POPi; GV * const gv2 = MUTABLE_GV(POPs); GV * const gv1 = MUTABLE_GV(POPs); - register IO * const io1 = gv1 ? GvIOn(gv1) : NULL; - register IO * const io2 = gv2 ? GvIOn(gv2) : NULL; + IO * const io1 = gv1 ? GvIOn(gv1) : NULL; + IO * const io2 = gv2 ? GvIOn(gv2) : NULL; int fd[2]; if (!io1) @@ -2483,7 +2483,7 @@ PP(pp_bind) /* OK, so on what platform does bind modify addr? */ const char *addr; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); STRLEN len; const int op_type = PL_op->op_type; @@ -2511,7 +2511,7 @@ PP(pp_listen) dVAR; dSP; const int backlog = POPi; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = gv ? GvIOn(gv) : NULL; + IO * const io = gv ? GvIOn(gv) : NULL; if (!io || !IoIFP(io)) goto nuts; @@ -2530,8 +2530,8 @@ nuts: PP(pp_accept) { dVAR; dSP; dTARGET; - register IO *nstio; - register IO *gstio; + IO *nstio; + IO *gstio; char namebuf[MAXPATHLEN]; #if (defined(VMS_DO_SOCKETS) && defined(DECCRTL_SOCKETS)) || defined(MPE) || defined(__QNXNTO__) Sock_size_t len = sizeof (struct sockaddr_in); @@ -2606,7 +2606,7 @@ PP(pp_shutdown) dVAR; dSP; dTARGET; const int how = POPi; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); if (!io || !IoIFP(io)) goto nuts; @@ -2628,7 +2628,7 @@ PP(pp_ssockopt) const unsigned int optname = (unsigned int) POPi; const unsigned int lvl = (unsigned int) POPi; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); int fd; Sock_size_t len; @@ -2697,7 +2697,7 @@ PP(pp_getpeername) dVAR; dSP; const int optype = PL_op->op_type; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); Sock_size_t len; SV *sv; int fd; @@ -3307,9 +3307,9 @@ PP(pp_fttext) I32 len; I32 odd = 0; STDCHAR tbuf[512]; - register STDCHAR *s; - register IO *io; - register SV *sv = NULL; + STDCHAR *s; + IO *io; + SV *sv = NULL; GV *gv; PerlIO *fp; @@ -3820,7 +3820,7 @@ PP(pp_open_dir) dVAR; dSP; const char * const dirname = POPpconstx; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); if (!io) goto nope; @@ -3858,8 +3858,8 @@ PP(pp_readdir) SV *sv; const I32 gimme = GIMME; GV * const gv = MUTABLE_GV(POPs); - register const Direntry_t *dp; - register IO * const io = GvIOn(gv); + const Direntry_t *dp; + IO * const io = GvIOn(gv); if (!io || !IoDIRP(io)) { Perl_ck_warner(aTHX_ packWARN(WARN_IO), @@ -3911,7 +3911,7 @@ PP(pp_telldir) long telldir (DIR *); # endif GV * const gv = MUTABLE_GV(POPs); - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); if (!io || !IoDIRP(io)) { Perl_ck_warner(aTHX_ packWARN(WARN_IO), @@ -3937,7 +3937,7 @@ PP(pp_seekdir) dVAR; dSP; const long along = POPl; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); if (!io || !IoDIRP(io)) { Perl_ck_warner(aTHX_ packWARN(WARN_IO), @@ -3962,7 +3962,7 @@ PP(pp_rewinddir) #if defined(HAS_REWINDDIR) || defined(rewinddir) dVAR; dSP; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); if (!io || !IoDIRP(io)) { Perl_ck_warner(aTHX_ packWARN(WARN_IO), @@ -3986,7 +3986,7 @@ PP(pp_closedir) #if defined(Direntry_t) && defined(HAS_READDIR) dVAR; dSP; GV * const gv = MUTABLE_GV(POPs); - register IO * const io = GvIOn(gv); + IO * const io = GvIOn(gv); if (!io || !IoDIRP(io)) { Perl_ck_warner(aTHX_ packWARN(WARN_IO), @@ -4722,8 +4722,8 @@ PP(pp_ghostent) #if defined(HAS_GETHOSTBYNAME) || defined(HAS_GETHOSTBYADDR) || defined(HAS_GETHOSTENT) dVAR; dSP; I32 which = PL_op->op_type; - register char **elem; - register SV *sv; + char **elem; + SV *sv; #ifndef HAS_GETHOST_PROTOS /* XXX Do we need individual probes? */ struct hostent *gethostbyaddr(Netdb_host_t, Netdb_hlen_t, int); struct hostent *gethostbyname(Netdb_name_t); @@ -4812,7 +4812,7 @@ PP(pp_gnetent) #if defined(HAS_GETNETBYNAME) || defined(HAS_GETNETBYADDR) || defined(HAS_GETNETENT) dVAR; dSP; I32 which = PL_op->op_type; - register SV *sv; + SV *sv; #ifndef HAS_GETNET_PROTOS /* XXX Do we need individual probes? */ struct netent *getnetbyaddr(Netdb_net_t, int); struct netent *getnetbyname(Netdb_name_t); @@ -4885,7 +4885,7 @@ PP(pp_gprotoent) #if defined(HAS_GETPROTOBYNAME) || defined(HAS_GETPROTOBYNUMBER) || defined(HAS_GETPROTOENT) dVAR; dSP; I32 which = PL_op->op_type; - register SV *sv; + SV *sv; #ifndef HAS_GETPROTO_PROTOS /* XXX Do we need individual probes? */ struct protoent *getprotobyname(Netdb_name_t); struct protoent *getprotobynumber(int); @@ -4945,7 +4945,7 @@ PP(pp_gservent) #if defined(HAS_GETSERVBYNAME) || defined(HAS_GETSERVBYPORT) || defined(HAS_GETSERVENT) dVAR; dSP; I32 which = PL_op->op_type; - register SV *sv; + SV *sv; #ifndef HAS_GETSERV_PROTOS /* XXX Do we need individual probes? */ struct servent *getservbyname(Netdb_name_t, Netdb_name_t); struct servent *getservbyport(int, Netdb_name_t); @@ -5122,7 +5122,7 @@ PP(pp_gpwent) #ifdef HAS_PASSWD dVAR; dSP; I32 which = PL_op->op_type; - register SV *sv; + SV *sv; struct passwd *pwent = NULL; /* * We currently support only the SysV getsp* shadow password interface. @@ -5446,9 +5446,9 @@ PP(pp_syscall) { #ifdef HAS_SYSCALL dVAR; dSP; dMARK; dORIGMARK; dTARGET; - register I32 items = SP - MARK; + I32 items = SP - MARK; unsigned long a[20]; - register I32 i = 0; + I32 i = 0; IV retval = -1; if (PL_tainting) { @@ -5303,7 +5303,7 @@ Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, dVAR; REGEXP *rx; struct regexp *r; - register regexp_internal *ri; + regexp_internal *ri; STRLEN plen; char * VOL exp; char* xend; @@ -8299,11 +8299,11 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) /* paren: Parenthesized? 0=top, 1=(, inside: changed to letter. */ { dVAR; - register regnode *ret; /* Will be the head of the group. */ - register regnode *br; - register regnode *lastbr; - register regnode *ender = NULL; - register I32 parno = 0; + regnode *ret; /* Will be the head of the group. */ + regnode *br; + regnode *lastbr; + regnode *ender = NULL; + I32 parno = 0; I32 flags; U32 oregflags = RExC_flags; bool have_branch = 0; @@ -9309,9 +9309,9 @@ STATIC regnode * S_regbranch(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth) { dVAR; - register regnode *ret; - register regnode *chain = NULL; - register regnode *latest; + regnode *ret; + regnode *chain = NULL; + regnode *latest; I32 flags = 0, c = 0; GET_RE_DEBUG_FLAGS_DECL; @@ -9382,9 +9382,9 @@ STATIC regnode * S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) { dVAR; - register regnode *ret; - register char op; - register char *next; + regnode *ret; + char op; + char *next; I32 flags; const char * const origparse = RExC_parse; I32 min; @@ -10428,9 +10428,9 @@ tryagain: RExC_parse++; defchar: { - register STRLEN len = 0; + STRLEN len = 0; UV ender; - register char *p; + char *p; char *s; #define MAX_NODE_STRING_SIZE 127 char foldbuf[MAX_NODE_STRING_SIZE+UTF8_MAXBYTES_CASE]; @@ -11332,11 +11332,11 @@ STATIC regnode * S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth) { dVAR; - register UV nextvalue; - register UV prevvalue = OOB_UNICODE; - register IV range = 0; + UV nextvalue; + UV prevvalue = OOB_UNICODE; + IV range = 0; UV value = 0; - register regnode *ret; + regnode *ret; STRLEN numlen; IV namedclass = OOB_NAMEDCLASS; char *rangebegin = NULL; @@ -13022,7 +13022,7 @@ STATIC regnode * /* Location. */ S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op) { dVAR; - register regnode *ptr; + regnode *ptr; regnode * const ret = RExC_emit; GET_RE_DEBUG_FLAGS_DECL; @@ -13064,7 +13064,7 @@ STATIC regnode * /* Location. */ S_reganode(pTHX_ RExC_state_t *pRExC_state, U8 op, U32 arg) { dVAR; - register regnode *ptr; + regnode *ptr; regnode * const ret = RExC_emit; GET_RE_DEBUG_FLAGS_DECL; @@ -13136,9 +13136,9 @@ STATIC void S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth) { dVAR; - register regnode *src; - register regnode *dst; - register regnode *place; + regnode *src; + regnode *dst; + regnode *place; const int offset = regarglen[(U8)op]; const int size = NODE_STEP_REGNODE + offset; GET_RE_DEBUG_FLAGS_DECL; @@ -13224,7 +13224,7 @@ STATIC void S_regtail(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val,U32 depth) { dVAR; - register regnode *scan; + regnode *scan; GET_RE_DEBUG_FLAGS_DECL; PERL_ARGS_ASSERT_REGTAIL; @@ -13283,7 +13283,7 @@ STATIC U8 S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode *p, const regnode *val,U32 depth) { dVAR; - register regnode *scan; + regnode *scan; U8 exact = PSEUDO; #ifdef EXPERIMENTAL_INPLACESCAN I32 min = 0; @@ -13524,7 +13524,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o) { #ifdef DEBUGGING dVAR; - register int k; + int k; /* Should be synchronized with * ANYOF_ #xdefines in regcomp.h */ static const char * const anyofs[] = { @@ -14328,7 +14328,7 @@ regnode * Perl_regnext(pTHX_ register regnode *p) { dVAR; - register I32 offset; + I32 offset; if (!p) return(NULL); @@ -14487,8 +14487,8 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node, SV* sv, I32 indent, U32 depth) { dVAR; - register U8 op = PSEUDO; /* Arbitrary non-END op. */ - register const regnode *next; + U8 op = PSEUDO; /* Arbitrary non-END op. */ + const regnode *next; const regnode *optstart= NULL; RXi_GET_DECL(r,ri); @@ -14539,9 +14539,9 @@ S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node, if (PL_regkind[(U8)op] == BRANCHJ) { assert(next); { - register const regnode *nnode = (OP(next) == LONGJMP - ? regnext((regnode *)next) - : next); + const regnode *nnode = (OP(next) == LONGJMP + ? regnext((regnode *)next) + : next); if (last && nnode > last) nnode = last; DUMPUNTIL(NEXTOPER(NEXTOPER(node)), nnode); @@ -579,16 +579,16 @@ Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV *sv, char *strpos, { dVAR; struct regexp *const prog = (struct regexp *)SvANY(rx); - register I32 start_shift = 0; + I32 start_shift = 0; /* Should be nonnegative! */ - register I32 end_shift = 0; - register char *s; - register SV *check; + I32 end_shift = 0; + char *s; + SV *check; char *strbeg; char *t; const bool utf8_target = (sv && SvUTF8(sv)) ? 1 : 0; /* if no sv we have to assume bytes */ I32 ml_anch; - register char *other_last = NULL; /* other substr checked before this */ + char *other_last = NULL; /* other substr checked before this */ char *check_at = NULL; /* check substr found at this pos */ char *checked_upto = NULL; /* how far into the string we have already checked using find_byclass*/ const I32 multiline = prog->extflags & RXf_PMf_MULTILINE; @@ -1429,12 +1429,12 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, const U8 *fold_array; /* array for folding ords < 256 */ STRLEN ln; STRLEN lnc; - register STRLEN uskip; + STRLEN uskip; U8 c1; U8 c2; char *e; - register I32 tmp = 1; /* Scratch variable? */ - register const bool utf8_target = PL_reg_match_utf8; + I32 tmp = 1; /* Scratch variable? */ + const bool utf8_target = PL_reg_match_utf8; UV utf8_fold_flags = 0; RXi_GET_DECL(prog,progi); @@ -2070,7 +2070,7 @@ Perl_regexec_flags(pTHX_ REGEXP * const rx, char *stringarg, register char *stre dVAR; struct regexp *const prog = (struct regexp *)SvANY(rx); /*register*/ char *s; - register regnode *c; + regnode *c; /*register*/ char *startpos = stringarg; I32 minlen; /* must match at least this many chars */ I32 dontbother = 0; /* how many characters not to try at end */ @@ -2731,7 +2731,7 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos) #if 1 if (prog->nparens) { regexp_paren_pair *pp = prog->offs; - register I32 i; + I32 i; for (i = prog->nparens; i > (I32)prog->lastparen; i--) { ++pp; pp->start = -1; @@ -3113,21 +3113,21 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) dMY_CXT; #endif dVAR; - register const bool utf8_target = PL_reg_match_utf8; + const bool utf8_target = PL_reg_match_utf8; const U32 uniflags = UTF8_ALLOW_DEFAULT; REGEXP *rex_sv = reginfo->prog; regexp *rex = (struct regexp *)SvANY(rex_sv); RXi_GET_DECL(rex,rexi); I32 oldsave; /* the current state. This is a cached copy of PL_regmatch_state */ - register regmatch_state *st; + regmatch_state *st; /* cache heavy used fields of st in registers */ - register regnode *scan; - register regnode *next; - register U32 n = 0; /* general value; init to avoid compiler warning */ - register I32 ln = 0; /* len or last; init to avoid compiler warning */ - register char *locinput = PL_reginput; - register I32 nextchr; /* is always set to UCHARAT(locinput) */ + regnode *scan; + regnode *next; + U32 n = 0; /* general value; init to avoid compiler warning */ + I32 ln = 0; /* len or last; init to avoid compiler warning */ + char *locinput = PL_reginput; + I32 nextchr; /* is always set to UCHARAT(locinput) */ bool result = 0; /* return value of S_regmatch */ int depth = 0; /* depth of backtrack stack */ @@ -3536,10 +3536,10 @@ S_regmatch(pTHX_ regmatch_info *reginfo, regnode *prog) { /* Find next-highest word to process. Note that this code * is O(N^2) per trie run (O(N) per branch), so keep tight */ - register U16 min = 0; - register U16 word; - register U16 const nextword = ST.nextword; - register reg_trie_wordinfo * const wordinfo + U16 min = 0; + U16 word; + U16 const nextword = ST.nextword; + reg_trie_wordinfo * const wordinfo = ((reg_trie_data*)rexi->data->data[ARG(ST.me)])->wordinfo; for (word=ST.topword; word; word=wordinfo[word].prev) { if (word > nextword && (!min || word < min)) @@ -6096,11 +6096,11 @@ STATIC I32 S_regrepeat(pTHX_ const regexp *prog, const regnode *p, I32 max, int depth) { dVAR; - register char *scan; - register I32 c; - register char *loceol = PL_regeol; - register I32 hardcount = 0; - register bool utf8_target = PL_reg_match_utf8; + char *scan; + I32 c; + char *loceol = PL_regeol; + I32 hardcount = 0; + bool utf8_target = PL_reg_match_utf8; UV utf8_flags; #ifndef DEBUGGING PERL_UNUSED_ARG(depth); @@ -37,7 +37,7 @@ int Perl_runops_standard(pTHX) { dVAR; - register OP *op = PL_op; + OP *op = PL_op; while ((PL_op = op = op->op_ppaddr(aTHX))) { } @@ -174,7 +174,7 @@ S_save_scalar_at(pTHX_ SV **sptr, const U32 flags) { dVAR; SV * osv; - register SV *sv; + SV *sv; PERL_ARGS_ASSERT_SAVE_SCALAR_AT; @@ -349,7 +349,7 @@ void Perl_save_item(pTHX_ register SV *item) { dVAR; - register SV * const sv = newSVsv(item); + SV * const sv = newSVsv(item); PERL_ARGS_ASSERT_SAVE_ITEM; @@ -682,8 +682,8 @@ I32 Perl_save_alloc(pTHX_ I32 size, I32 pad) { dVAR; - register const I32 start = pad + ((char*)&PL_savestack[PL_savestack_ix] - - (char*)PL_savestack); + const I32 start = pad + ((char*)&PL_savestack[PL_savestack_ix] + - (char*)PL_savestack); const UV elems = 1 + ((size + pad - 1) / sizeof(*PL_savestack)); const UV elems_shifted = elems << SAVE_TIGHT_SHIFT; @@ -702,13 +702,13 @@ void Perl_leave_scope(pTHX_ I32 base) { dVAR; - register SV *sv; - register SV *value; - register GV *gv; - register AV *av; - register HV *hv; + SV *sv; + SV *value; + GV *gv; + AV *av; + HV *hv; void* ptr; - register char* str; + char* str; I32 i; /* Localise the effects of the TAINT_NOT inside the loop. */ bool was = PL_tainted; @@ -365,8 +365,8 @@ S_sv_add_arena(pTHX_ char *const ptr, const U32 size, const U32 flags) { dVAR; SV *const sva = MUTABLE_SV(ptr); - register SV* sv; - register SV* svend; + SV* sv; + SV* svend; PERL_ARGS_ASSERT_SV_ADD_ARENA; @@ -410,8 +410,8 @@ S_visit(pTHX_ SVFUNC_t f, const U32 flags, const U32 mask) PERL_ARGS_ASSERT_VISIT; for (sva = PL_sv_arenaroot; sva; sva = MUTABLE_SV(SvANY(sva))) { - register const SV * const svend = &sva[SvREFCNT(sva)]; - register SV* sv; + const SV * const svend = &sva[SvREFCNT(sva)]; + SV* sv; for (sv = sva + 1; sv < svend; ++sv) { if (SvTYPE(sv) != (svtype)SVTYPEMASK && (sv->sv_flags & mask) == flags @@ -1471,7 +1471,7 @@ Use the C<SvGROW> wrapper instead. char * Perl_sv_grow(pTHX_ register SV *const sv, register STRLEN newlen) { - register char *s; + char *s; PERL_ARGS_ASSERT_SV_GROW; @@ -1802,7 +1802,7 @@ ignored. I32 Perl_looks_like_number(pTHX_ SV *const sv) { - register const char *sbegin; + const char *sbegin; STRLEN len; PERL_ARGS_ASSERT_LOOKS_LIKE_NUMBER; @@ -2723,7 +2723,7 @@ char * Perl_sv_2pv_flags(pTHX_ register SV *const sv, STRLEN *const lp, const I32 flags) { dVAR; - register char *s; + char *s; if (!sv) { if (lp) @@ -3894,9 +3894,9 @@ void Perl_sv_setsv_flags(pTHX_ SV *dstr, register SV* sstr, const I32 flags) { dVAR; - register U32 sflags; - register int dtype; - register svtype stype; + U32 sflags; + int dtype; + svtype stype; PERL_ARGS_ASSERT_SV_SETSV_FLAGS; @@ -4340,7 +4340,7 @@ Perl_sv_setsv_cow(pTHX_ SV *dstr, SV *sstr) { STRLEN cur = SvCUR(sstr); STRLEN len = SvLEN(sstr); - register char *new_pv; + char *new_pv; PERL_ARGS_ASSERT_SV_SETSV_COW; @@ -4419,7 +4419,7 @@ void Perl_sv_setpvn(pTHX_ register SV *const sv, register const char *const ptr, register const STRLEN len) { dVAR; - register char *dptr; + char *dptr; PERL_ARGS_ASSERT_SV_SETPVN; @@ -4476,7 +4476,7 @@ void Perl_sv_setpv(pTHX_ register SV *const sv, register const char *const ptr) { dVAR; - register STRLEN len; + STRLEN len; PERL_ARGS_ASSERT_SV_SETPV; @@ -5045,7 +5045,7 @@ void Perl_sv_catpv(pTHX_ register SV *const sv, register const char *ptr) { dVAR; - register STRLEN len; + STRLEN len; STRLEN tlen; char *junk; @@ -5120,7 +5120,7 @@ SV * Perl_newSV(pTHX_ const STRLEN len) { dVAR; - register SV *sv; + SV *sv; new_SV(sv); if (len) { @@ -5726,11 +5726,11 @@ void Perl_sv_insert_flags(pTHX_ SV *const bigstr, const STRLEN offset, const STRLEN len, const char *const little, const STRLEN littlelen, const U32 flags) { dVAR; - register char *big; - register char *mid; - register char *midend; - register char *bigend; - register SSize_t i; /* better be sizeof(STRLEN) or bad things happen */ + char *big; + char *mid; + char *midend; + char *bigend; + SSize_t i; /* better be sizeof(STRLEN) or bad things happen */ STRLEN curlen; PERL_ARGS_ASSERT_SV_INSERT_FLAGS; @@ -5950,7 +5950,7 @@ Perl_sv_clear(pTHX_ SV *const orig_sv) const struct body_details *sv_type_details; SV* iter_sv = NULL; SV* next_sv = NULL; - register SV *sv = orig_sv; + SV *sv = orig_sv; STRLEN hash_index; PERL_ARGS_ASSERT_SV_CLEAR; @@ -7554,9 +7554,9 @@ Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO *const fp, I32 append) dVAR; const char *rsptr; STRLEN rslen; - register STDCHAR rslast; - register STDCHAR *bp; - register I32 cnt; + STDCHAR rslast; + STDCHAR *bp; + I32 cnt; I32 i = 0; I32 rspara = 0; @@ -7663,7 +7663,7 @@ Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO *const fp, I32 append) * We're going to steal some values from the stdio struct * and put EVERYTHING in the innermost loop into registers. */ - register STDCHAR *ptr; + STDCHAR *ptr; STRLEN bpx; I32 shortbuffered; @@ -7809,7 +7809,7 @@ thats_really_all_folks: screamer2: if (rslen) { - register const STDCHAR * const bpe = buf + sizeof(buf); + const STDCHAR * const bpe = buf + sizeof(buf); bp = buf; while ((i = PerlIO_getc(fp)) != EOF && (*bp++ = (STDCHAR)i) != rslast && bp < bpe) ; /* keep reading */ @@ -7903,7 +7903,7 @@ void Perl_sv_inc_nomg(pTHX_ register SV *const sv) { dVAR; - register char *d; + char *d; int flags; if (!sv) @@ -8225,7 +8225,7 @@ SV * Perl_sv_mortalcopy(pTHX_ SV *const oldstr) { dVAR; - register SV *sv; + SV *sv; new_SV(sv); sv_setsv(sv,oldstr); @@ -8249,7 +8249,7 @@ SV * Perl_sv_newmortal(pTHX) { dVAR; - register SV *sv; + SV *sv; new_SV(sv); SvFLAGS(sv) = SVs_TEMP; @@ -8282,7 +8282,7 @@ SV * Perl_newSVpvn_flags(pTHX_ const char *const s, const STRLEN len, const U32 flags) { dVAR; - register SV *sv; + SV *sv; /* All the flags we don't support must be zero. And we're new code so I'm going to assert this from the start. */ @@ -8346,7 +8346,7 @@ SV * Perl_newSVpv(pTHX_ const char *const s, const STRLEN len) { dVAR; - register SV *sv; + SV *sv; new_SV(sv); sv_setpvn(sv, s, len || s == NULL ? len : strlen(s)); @@ -8370,7 +8370,7 @@ SV * Perl_newSVpvn(pTHX_ const char *const buffer, const STRLEN len) { dVAR; - register SV *sv; + SV *sv; new_SV(sv); sv_setpvn(sv,buffer,len); @@ -8468,7 +8468,7 @@ SV * Perl_newSVpvn_share(pTHX_ const char *src, I32 len, U32 hash) { dVAR; - register SV *sv; + SV *sv; bool is_utf8 = FALSE; const char *const orig_src = src; @@ -8524,7 +8524,7 @@ SV * Perl_newSVpvf_nocontext(const char *const pat, ...) { dTHX; - register SV *sv; + SV *sv; va_list args; PERL_ARGS_ASSERT_NEWSVPVF_NOCONTEXT; @@ -8548,7 +8548,7 @@ C<sprintf>. SV * Perl_newSVpvf(pTHX_ const char *const pat, ...) { - register SV *sv; + SV *sv; va_list args; PERL_ARGS_ASSERT_NEWSVPVF; @@ -8565,7 +8565,7 @@ SV * Perl_vnewSVpvf(pTHX_ const char *const pat, va_list *const args) { dVAR; - register SV *sv; + SV *sv; PERL_ARGS_ASSERT_VNEWSVPVF; @@ -8587,7 +8587,7 @@ SV * Perl_newSVnv(pTHX_ const NV n) { dVAR; - register SV *sv; + SV *sv; new_SV(sv); sv_setnv(sv,n); @@ -8607,7 +8607,7 @@ SV * Perl_newSViv(pTHX_ const IV i) { dVAR; - register SV *sv; + SV *sv; new_SV(sv); sv_setiv(sv,i); @@ -8627,7 +8627,7 @@ SV * Perl_newSVuv(pTHX_ const UV u) { dVAR; - register SV *sv; + SV *sv; new_SV(sv); sv_setuv(sv,u); @@ -8646,7 +8646,7 @@ is set to 1. SV * Perl_newSV_type(pTHX_ const svtype type) { - register SV *sv; + SV *sv; new_SV(sv); sv_upgrade(sv, type); @@ -8666,7 +8666,7 @@ SV * Perl_newRV_noinc(pTHX_ SV *const tmpRef) { dVAR; - register SV *sv = newSV_type(SVt_IV); + SV *sv = newSV_type(SVt_IV); PERL_ARGS_ASSERT_NEWRV_NOINC; @@ -8703,7 +8703,7 @@ SV * Perl_newSVsv(pTHX_ register SV *const old) { dVAR; - register SV *sv; + SV *sv; if (!old) return NULL; @@ -8780,8 +8780,8 @@ Perl_sv_reset(pTHX_ register const char *s, HV *const stash) entry; entry = HeNEXT(entry)) { - register GV *gv; - register SV *sv; + GV *gv; + SV *sv; if (!todo[(U8)*HeKEY(entry)]) continue; @@ -8978,7 +8978,7 @@ Perl_sv_true(pTHX_ register SV *const sv) if (!sv) return 0; if (SvPOK(sv)) { - register const XPV* const tXpv = (XPV*)SvANY(sv); + const XPV* const tXpv = (XPV*)SvANY(sv); if (tXpv && (tXpv->xpv_cur > 1 || (tXpv->xpv_cur && *sv->sv_u.svu_pv != '0'))) @@ -11337,7 +11337,7 @@ Perl_dirp_dup(pTHX_ DIR *const dp, CLONE_PARAMS *const param) #ifdef HAS_FCHDIR DIR *pwd; - register const Direntry_t *dirent; + const Direntry_t *dirent; char smallbuf[256]; char *name = NULL; STRLEN len = 0; @@ -13819,7 +13819,7 @@ STATIC SV* S_find_hash_subscript(pTHX_ const HV *const hv, const SV *const val) { dVAR; - register HE **array; + HE **array; I32 i; PERL_ARGS_ASSERT_FIND_HASH_SUBSCRIPT; @@ -13831,7 +13831,7 @@ S_find_hash_subscript(pTHX_ const HV *const hv, const SV *const val) array = HvARRAY(hv); for (i=HvMAX(hv); i>0; i--) { - register HE *entry; + HE *entry; for (entry = array[i]; entry; entry = HeNEXT(entry)) { if (HeVAL(entry) != val) continue; @@ -629,8 +629,8 @@ Perl_feature_is_enabled(pTHX_ const char *const name, STRLEN namelen) static void strip_return(SV *sv) { - register const char *s = SvPVX_const(sv); - register const char * const e = s + SvCUR(sv); + const char *s = SvPVX_const(sv); + const char * const e = s + SvCUR(sv); PERL_ARGS_ASSERT_STRIP_RETURN; @@ -638,7 +638,7 @@ strip_return(SV *sv) while (s < e) { if (*s++ == '\r' && *s == '\n') { /* hit a CR-LF, need to copy the rest */ - register char *d = s - 1; + char *d = s - 1; *d++ = *s++; while (s < e) { if (*s == '\r' && s[1] == '\n') @@ -2068,7 +2068,7 @@ STATIC char * S_force_word(pTHX_ register char *start, int token, int check_keyword, int allow_pack, int allow_initial_tick) { dVAR; - register char *s; + char *s; STRLEN len; PERL_ARGS_ASSERT_FORCE_WORD; @@ -2313,9 +2313,9 @@ STATIC SV * S_tokeq(pTHX_ SV *sv) { dVAR; - register char *s; - register char *send; - register char *d; + char *s; + char *send; + char *d; STRLEN len = 0; SV *pv = sv; @@ -2384,7 +2384,7 @@ STATIC I32 S_sublex_start(pTHX) { dVAR; - register const I32 op_type = pl_yylval.ival; + const I32 op_type = pl_yylval.ival; if (op_type == OP_NULL) { pl_yylval.opval = PL_lex_op; @@ -2672,11 +2672,11 @@ STATIC char * S_scan_const(pTHX_ char *start) { dVAR; - register char *send = PL_bufend; /* end of the constant */ + char *send = PL_bufend; /* end of the constant */ SV *sv = newSV(send - start); /* sv for the constant. See note below on sizing. */ - register char *s = start; /* start of the constant */ - register char *d = SvPVX(sv); /* destination for copies */ + char *s = start; /* start of the constant */ + char *d = SvPVX(sv); /* destination for copies */ bool dorange = FALSE; /* are we in a translit range? */ bool didrange = FALSE; /* did we just finish a range? */ bool in_charclass = FALSE; /* within /[...]/ */ @@ -4399,8 +4399,8 @@ int Perl_yylex(pTHX) { dVAR; - register char *s = PL_bufptr; - register char *d; + char *s = PL_bufptr; + char *d; STRLEN len; bool bof = FALSE; U8 formbrack = 0; @@ -8831,8 +8831,8 @@ STATIC char * S_scan_word(pTHX_ register char *s, char *dest, STRLEN destlen, int allow_package, STRLEN *slp) { dVAR; - register char *d = dest; - register char * const e = d + destlen - 3; /* two-character token, ending NUL */ + char *d = dest; + char * const e = d + destlen - 3; /* two-character token, ending NUL */ PERL_ARGS_ASSERT_SCAN_WORD; @@ -8876,8 +8876,8 @@ S_scan_ident(pTHX_ register char *s, register const char *send, char *dest, STRL dVAR; char *bracket = NULL; char funny = *s++; - register char *d = dest; - register char * const e = d + destlen - 3; /* two-character token, ending NUL */ + char *d = dest; + char * const e = d + destlen - 3; /* two-character token, ending NUL */ PERL_ARGS_ASSERT_SCAN_IDENT; @@ -9238,7 +9238,7 @@ S_scan_subst(pTHX_ char *start) { dVAR; char *s; - register PMOP *pm; + PMOP *pm; I32 first_start; I32 es = 0; char charset = '\0'; /* character set modifier */ @@ -9344,7 +9344,7 @@ STATIC char * S_scan_trans(pTHX_ char *start) { dVAR; - register char* s; + char* s; OP *o; U8 squash; U8 del; @@ -9444,8 +9444,8 @@ S_scan_heredoc(pTHX_ register char *s) SV *tmpstr; char term; const char *found_newline; - register char *d; - register char *e; + char *d; + char *e; char *peek; const int outer = (PL_rsfp || PL_parser->filtered) && !(PL_lex_inwhat == OP_SCALAR); @@ -9722,7 +9722,7 @@ STATIC char * S_scan_inputsymbol(pTHX_ char *start) { dVAR; - register char *s = start; /* current position in buffer */ + char *s = start; /* current position in buffer */ char *end; I32 len; char *d = PL_tokenbuf; /* start of temp holding space */ @@ -9914,9 +9914,9 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims, int re_reparse) dVAR; SV *sv; /* scalar value: string */ const char *tmps; /* temp string, used for delimiter matching */ - register char *s = start; /* current position in the buffer */ - register char term; /* terminating character */ - register char *to; /* current position in the sv's data */ + char *s = start; /* current position in the buffer */ + char term; /* terminating character */ + char *to; /* current position in the sv's data */ I32 brackets = 1; /* bracket nesting level */ bool has_utf8 = FALSE; /* is there any utf8 content? */ I32 termcode; /* terminating char. code */ @@ -10256,9 +10256,9 @@ char * Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp) { dVAR; - register const char *s = start; /* current position in buffer */ - register char *d; /* destination in temp buffer */ - register char *e; /* end of temp buffer */ + const char *s = start; /* current position in buffer */ + char *d; /* destination in temp buffer */ + char *e; /* end of temp buffer */ NV nv; /* number read, as a double */ SV *sv = NULL; /* place to put the converted number */ bool floatit; /* boolean: int or float? */ @@ -10629,8 +10629,8 @@ STATIC char * S_scan_formline(pTHX_ register char *s) { dVAR; - register char *eol; - register char *t; + char *eol; + char *t; SV * const stuff = newSVpvs(""); bool needargs = FALSE; bool eofmt = FALSE; @@ -4374,14 +4374,14 @@ I32 Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, register UV l1, bool u1, const char *s2, char **pe2, register UV l2, bool u2, U32 flags) { dVAR; - register const U8 *p1 = (const U8*)s1; /* Point to current char */ - register const U8 *p2 = (const U8*)s2; - register const U8 *g1 = NULL; /* goal for s1 */ - register const U8 *g2 = NULL; - register const U8 *e1 = NULL; /* Don't scan s1 past this */ - register U8 *f1 = NULL; /* Point to current folded */ - register const U8 *e2 = NULL; - register U8 *f2 = NULL; + const U8 *p1 = (const U8*)s1; /* Point to current char */ + const U8 *p2 = (const U8*)s2; + const U8 *g1 = NULL; /* goal for s1 */ + const U8 *g2 = NULL; + const U8 *e1 = NULL; /* Don't scan s1 past this */ + U8 *f1 = NULL; /* Point to current folded */ + const U8 *e2 = NULL; + U8 *f2 = NULL; STRLEN n1 = 0, n2 = 0; /* Number of bytes in current char */ U8 foldbuf1[UTF8_MAXBYTES_CASE+1]; U8 foldbuf2[UTF8_MAXBYTES_CASE+1]; @@ -408,7 +408,7 @@ Free_t Perl_mfree (Malloc_t where) char * Perl_delimcpy(register char *to, register const char *toend, register const char *from, register const char *fromend, register int delim, I32 *retlen) { - register I32 tolen; + I32 tolen; PERL_ARGS_ASSERT_DELIMCPY; @@ -438,7 +438,7 @@ Perl_delimcpy(register char *to, register const char *toend, register const char char * Perl_instr(register const char *big, register const char *little) { - register I32 first; + I32 first; PERL_ARGS_ASSERT_INSTR; @@ -448,7 +448,7 @@ Perl_instr(register const char *big, register const char *little) if (!first) return (char*)big; while (*big) { - register const char *s, *x; + const char *s, *x; if (*big++ != first) continue; for (x=big,s=little; *s; /**/ ) { @@ -499,9 +499,9 @@ Perl_ninstr(const char *big, const char *bigend, const char *little, const char char * Perl_rninstr(register const char *big, const char *bigend, const char *little, const char *lend) { - register const char *bigbeg; - register const I32 first = *little; - register const char * const littleend = lend; + const char *bigbeg; + const I32 first = *little; + const char * const littleend = lend; PERL_ARGS_ASSERT_RNINSTR; @@ -510,7 +510,7 @@ Perl_rninstr(register const char *big, const char *bigend, const char *little, c bigbeg = big; big = bigend - (littleend - little++); while (big >= bigbeg) { - register const char *s, *x; + const char *s, *x; if (*big-- != first) continue; for (x=big+2,s=little; s < littleend; /**/ ) { @@ -548,7 +548,7 @@ void Perl_fbm_compile(pTHX_ SV *sv, U32 flags) { dVAR; - register const U8 *s; + const U8 *s; STRLEN i; STRLEN len; STRLEN rarest = 0; @@ -600,7 +600,7 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags) the BM table. */ const U8 mlen = (len>255) ? 255 : (U8)len; const unsigned char *const sb = s + len - mlen; /* first char (maybe) */ - register U8 *table; + U8 *table; Newx(table, 256, U8); memset((void*)table, mlen, 256); @@ -650,12 +650,11 @@ then. char * Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *littlestr, U32 flags) { - register unsigned char *s; + unsigned char *s; STRLEN l; - register const unsigned char *little - = (const unsigned char *)SvPV_const(littlestr,l); - register STRLEN littlelen = l; - register const I32 multiline = flags & FBMrf_MULTILINE; + const unsigned char *little = (const unsigned char *)SvPV_const(littlestr,l); + STRLEN littlelen = l; + const I32 multiline = flags & FBMrf_MULTILINE; PERL_ARGS_ASSERT_FBM_INSTR; @@ -791,7 +790,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit { const MAGIC *const mg = mg_find(littlestr, PERL_MAGIC_bm); const unsigned char * const table = (const unsigned char *) mg->mg_ptr; - register const unsigned char *oldlittle; + const unsigned char *oldlittle; --littlelen; /* Last char found by table lookup */ @@ -799,7 +798,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit little += littlelen; /* last char */ oldlittle = little; if (s < bigend) { - register I32 tmp; + I32 tmp; top2: if ((tmp = table[*s])) { @@ -808,7 +807,7 @@ Perl_fbm_instr(pTHX_ unsigned char *big, register unsigned char *bigend, SV *lit goto check_end; } else { /* less expensive than calling strncmp() */ - register unsigned char * const olds = s; + unsigned char * const olds = s; tmp = littlelen; @@ -867,8 +866,8 @@ range bytes match only themselves. I32 Perl_foldEQ(const char *s1, const char *s2, register I32 len) { - register const U8 *a = (const U8 *)s1; - register const U8 *b = (const U8 *)s2; + const U8 *a = (const U8 *)s1; + const U8 *b = (const U8 *)s2; PERL_ARGS_ASSERT_FOLDEQ; @@ -887,8 +886,8 @@ Perl_foldEQ_latin1(const char *s1, const char *s2, register I32 len) * LATIN_SMALL_LETTER_Y_WITH_DIAERESIS, and does not check for these. Nor * does it check that the strings each have at least 'len' characters */ - register const U8 *a = (const U8 *)s1; - register const U8 *b = (const U8 *)s2; + const U8 *a = (const U8 *)s1; + const U8 *b = (const U8 *)s2; PERL_ARGS_ASSERT_FOLDEQ_LATIN1; @@ -914,8 +913,8 @@ I32 Perl_foldEQ_locale(const char *s1, const char *s2, register I32 len) { dVAR; - register const U8 *a = (const U8 *)s1; - register const U8 *b = (const U8 *)s2; + const U8 *a = (const U8 *)s1; + const U8 *b = (const U8 *)s2; PERL_ARGS_ASSERT_FOLDEQ_LOCALE; @@ -972,7 +971,7 @@ the new string can be freed with the C<Safefree()> function. char * Perl_savepvn(pTHX_ const char *pv, register I32 len) { - register char *newaddr; + char *newaddr; PERL_UNUSED_CONTEXT; Newx(newaddr,len+1,char); @@ -998,7 +997,7 @@ which is shared between threads. char * Perl_savesharedpv(pTHX_ const char *pv) { - register char *newaddr; + char *newaddr; STRLEN pvlen; if (!pv) return NULL; @@ -1048,7 +1047,7 @@ Perl_savesvpv(pTHX_ SV *sv) { STRLEN len; const char * const pv = SvPV_const(sv, len); - register char *newaddr; + char *newaddr; PERL_ARGS_ASSERT_SAVESVPV; @@ -1887,8 +1886,8 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val) #ifndef PERL_USE_SAFE_PUTENV if (!PL_use_safe_putenv) { /* most putenv()s leak, so we manipulate environ directly */ - register I32 i; - register const I32 len = strlen(nam); + I32 i; + const I32 len = strlen(nam); int nlen, vlen; /* where does it go? */ @@ -1984,7 +1983,7 @@ void Perl_my_setenv(pTHX_ const char *nam, const char *val) { dVAR; - register char *envstr; + char *envstr; const int nlen = strlen(nam); int vlen; @@ -2074,9 +2073,9 @@ Perl_my_bzero(register char *loc, register I32 len) I32 Perl_my_memcmp(const char *s1, const char *s2, register I32 len) { - register const U8 *a = (const U8 *)s1; - register const U8 *b = (const U8 *)s2; - register I32 tmp; + const U8 *a = (const U8 *)s1; + const U8 *b = (const U8 *)s2; + I32 tmp; PERL_ARGS_ASSERT_MY_MEMCMP; @@ -2179,8 +2178,8 @@ Perl_my_htonl(pTHX_ long l) #if ((BYTEORDER - 0x1111) & 0x444) || !(BYTEORDER & 0xf) Perl_croak(aTHX_ "Unknown BYTEORDER\n"); #else - register I32 o; - register I32 s; + I32 o; + I32 s; for (o = BYTEORDER - 0x1111, s = 0; s < (sizeof(long)*8); o >>= 4, s += 8) { u.c[o & 0xf] = (l >> s) & 255; @@ -2208,8 +2207,8 @@ Perl_my_ntohl(pTHX_ long l) #if ((BYTEORDER - 0x1111) & 0x444) || !(BYTEORDER & 0xf) Perl_croak(aTHX_ "Unknown BYTEORDER\n"); #else - register I32 o; - register I32 s; + I32 o; + I32 s; u.l = l; l = 0; @@ -2240,8 +2239,8 @@ Perl_my_ntohl(pTHX_ long l) type value; \ char c[sizeof(type)]; \ } u; \ - register U32 i; \ - register U32 s = 0; \ + U32 i; \ + U32 s = 0; \ for (i = 0; i < sizeof(u.c); i++, s += 8) { \ u.c[i] = (n >> s) & 0xFF; \ } \ @@ -2256,8 +2255,8 @@ Perl_my_ntohl(pTHX_ long l) type value; \ char c[sizeof(type)]; \ } u; \ - register U32 i; \ - register U32 s = 0; \ + U32 i; \ + U32 s = 0; \ u.value = n; \ n = 0; \ for (i = 0; i < sizeof(u.c); i++, s += 8) { \ @@ -2278,8 +2277,8 @@ Perl_my_ntohl(pTHX_ long l) type value; \ char c[sizeof(type)]; \ } u; \ - register U32 i; \ - register U32 s = 8*(sizeof(u.c)-1); \ + U32 i; \ + U32 s = 8*(sizeof(u.c)-1); \ for (i = 0; i < sizeof(u.c); i++, s -= 8) { \ u.c[i] = (n >> s) & 0xFF; \ } \ @@ -2294,8 +2293,8 @@ Perl_my_ntohl(pTHX_ long l) type value; \ char c[sizeof(type)]; \ } u; \ - register U32 i; \ - register U32 s = 8*(sizeof(u.c)-1); \ + U32 i; \ + U32 s = 8*(sizeof(u.c)-1); \ u.value = n; \ n = 0; \ for (i = 0; i < sizeof(u.c); i++, s -= 8) { \ @@ -2459,9 +2458,9 @@ BETOH(Perl_my_betohl,long) void Perl_my_swabn(void *ptr, int n) { - register char *s = (char *)ptr; - register char *e = s + (n-1); - register char tc; + char *s = (char *)ptr; + char *e = s + (n-1); + char tc; PERL_ARGS_ASSERT_MY_SWABN; @@ -2478,8 +2477,8 @@ Perl_my_popen_list(pTHX_ const char *mode, int n, SV **args) #if (!defined(DOSISH) || defined(HAS_FORK) || defined(AMIGAOS)) && !defined(OS2) && !defined(VMS) && !defined(__OPEN_VM) && !defined(EPOC) && !defined(NETWARE) && !defined(__LIBCATAMOUNT__) dVAR; int p[2]; - register I32 This, that; - register Pid_t pid; + I32 This, that; + Pid_t pid; SV *sv; I32 did_pipes = 0; int pp[2]; @@ -2618,8 +2617,8 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode) { dVAR; int p[2]; - register I32 This, that; - register Pid_t pid; + I32 This, that; + Pid_t pid; SV *sv; const I32 doexec = !(*cmd == '-' && cmd[1] == '\0'); I32 did_pipes = 0; @@ -3209,7 +3208,7 @@ Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags) void S_pidgone(pTHX_ Pid_t pid, int status) { - register SV *sv; + SV *sv; sv = *hv_fetch(PL_pidstatus,(const char*)&pid,sizeof(Pid_t),TRUE); SvUPGRADE(sv,SVt_IV); @@ -3260,12 +3259,12 @@ Perl_repeatcpy(register char *to, register const char *from, I32 len, register I if (len == 1) memset(to, *from, count); else if (count) { - register char *p = to; + char *p = to; IV items, linear, half; linear = count < PERL_REPEATCPY_LINEAR ? count : PERL_REPEATCPY_LINEAR; for (items = 0; items < linear; ++items) { - register const char *q = from; + const char *q = from; IV todo; for (todo = len; todo > 0; todo--) *p++ = *q++; @@ -3331,7 +3330,7 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char *xfound = NULL; char *xfailed = NULL; char tmpbuf[MAXPATHLEN]; - register char *s; + char *s; I32 len = 0; int retval; char *bufend; @@ -1421,7 +1421,7 @@ prime_env_iter(void) while (1) { char *cp1, *cp2, *key; unsigned long int sts, iosb[2], retlen, keylen; - register U32 hash; + U32 hash; sts = sys$qiow(0,chan,IO$_READVBLK,iosb,0,0,buf,mbxbufsiz,0,0,0,0); if (sts & 1) sts = iosb[0] & 0xffff; @@ -8270,7 +8270,7 @@ static char *int_tovmsspec (const char *path, char *rslt, int dir_flag, int * utf8_flag) { char *dirend; char *lastdot; - register char *cp1; + char *cp1; const char *cp2; unsigned long int infront = 0, hasdir = 1; int rslt_len; @@ -9705,7 +9705,7 @@ int Perl_trim_unixpath(pTHX_ char *fspec, const char *wildspec, int opts) { char *unixified, *unixwild, *tplate, *base, *end, *cp1, *cp2; - register int tmplen, reslen = 0, dirs = 0; + int tmplen, reslen = 0, dirs = 0; if (!wildspec || !fspec) return 0; @@ -10359,9 +10359,9 @@ static char * setup_argstr(pTHX_ SV *really, SV **mark, SV **sp) { char *junk, *tmps = NULL; - register size_t cmdlen = 0; + size_t cmdlen = 0; size_t rlen; - register SV **idx; + SV **idx; STRLEN n_a; idx = mark; @@ -10413,10 +10413,10 @@ setup_cmddsc(pTHX_ const char *incmd, int check_img, int *suggest_quote, struct dsc$descriptor_s *vmscmd; struct dsc$descriptor_s imgdsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0}; unsigned long int cxt = 0, flags = 1, retsts = SS$_NORMAL; - register char *s, *rest, *cp, *wordbreak; + char *s, *rest, *cp, *wordbreak; char * cmd; int cmdlen; - register int isdcl; + int isdcl; vmscmd = (struct dsc$descriptor_s *)PerlMem_malloc(sizeof(struct dsc$descriptor_s)); if (vmscmd == NULL) _ckvmssts_noperl(SS$_INSFMEM); @@ -10569,7 +10569,7 @@ setup_cmddsc(pTHX_ const char *incmd, int check_img, int *suggest_quote, isdcl = 1; if (suggest_quote) *suggest_quote = 1; } else { - register char *filespec = strpbrk(s,":<[.;"); + char *filespec = strpbrk(s,":<[.;"); rest = wordbreak = strpbrk(s," \"\t/"); if (!wordbreak) wordbreak = s + strlen(s); if (*s == '$') check_img = 0; @@ -11060,10 +11060,10 @@ int my_fclose(FILE *fp) { int my_fwrite(const void *src, size_t itmsz, size_t nitm, FILE *dest) { - register char *cp, *end, *cpd; + char *cp, *end, *cpd; char *data; - register unsigned int fd = fileno(dest); - register unsigned int fdoff = fd / sizeof(unsigned int); + unsigned int fd = fileno(dest); + unsigned int fdoff = fd / sizeof(unsigned int); int retval; int bufsize = itmsz * nitm + 1; @@ -11603,7 +11603,7 @@ int Perl_my_utime(pTHX_ const char *file, const struct utimbuf *utimes) #else /* __CRTL_VER < 70300000 */ - register int i; + int i; int sts; long int bintime[2], len = 2, lowbit, unixtime, secscale = 10000000; /* seconds --> 100 ns intervals */ diff --git a/win32/fcrypt.c b/win32/fcrypt.c index 4c9f2733f6..ec689e57df 100644 --- a/win32/fcrypt.c +++ b/win32/fcrypt.c @@ -336,10 +336,10 @@ static int body( static int des_set_key(des_cblock *key, des_key_schedule schedule) { - register unsigned long c,d,t,s; - register unsigned char *in; - register unsigned long *k; - register int i; + unsigned long c,d,t,s; + unsigned char *in; + unsigned long *k; + int i; k=(unsigned long *)schedule; in=(unsigned char *)key; @@ -533,13 +533,13 @@ body( unsigned long *out0, unsigned long Eswap0, unsigned long Eswap1) { - register unsigned long l,r,t,u,v; + unsigned long l,r,t,u,v; #ifdef ALT_ECB - register unsigned char *des_SP=(unsigned char *)SPtrans; + unsigned char *des_SP=(unsigned char *)SPtrans; #endif - register unsigned long *s; - register int i,j; - register unsigned long E0,E1; + unsigned long *s; + int i,j; + unsigned long E0,E1; l=0; r=0; diff --git a/win32/win32.c b/win32/win32.c index 4038316849..78b55f6e41 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -501,8 +501,8 @@ tokenize(const char *str, char **dest, char ***destv) if (str) { dTHX; int slen = strlen(str); - register char *ret; - register char **retv; + char *ret; + char **retv; Newx(ret, slen+2, char); Newx(retv, (slen+3)/2, char*); diff --git a/win32/wince.c b/win32/wince.c index 8a8721951b..d34a1db321 100644 --- a/win32/wince.c +++ b/win32/wince.c @@ -417,8 +417,8 @@ tokenize(const char *str, char **dest, char ***destv) if (str) { dTHX; int slen = strlen(str); - register char *ret; - register char **retv; + char *ret; + char **retv; Newx(ret, slen+2, char); Newx(retv, (slen+3)/2, char*); @@ -2191,9 +2191,9 @@ EXTERN_C char *getenv(const char *); int yyparse(void) { - register int yym, yyn, yystate; + int yym, yyn, yystate; #if YYDEBUG - register const char *yys; + const char *yys; if ((yys = getenv("YYDEBUG"))) { diff --git a/x2p/a2py.c b/x2p/a2py.c index f6944b9005..2f41ca86ec 100644 --- a/x2p/a2py.c +++ b/x2p/a2py.c @@ -61,7 +61,7 @@ usage() int main(register int argc, register const char **argv, register const char **env) { - register STR *str; + STR *str; int i; STR *tmpstr; /* char *namelist; */ @@ -221,9 +221,9 @@ int idtype; int yylex(void) { - register char *s = bufptr; - register char *d; - register int tmp; + char *s = bufptr; + char *d; + int tmp; retry: #if YYDEBUG @@ -828,7 +828,7 @@ yylex(void) char * scanpat(register char *s) { - register char *d; + char *d; switch (*s++) { case '/': @@ -880,7 +880,7 @@ yyerror(const char *s) char * scannum(register char *s) { - register char *d; + char *d; switch (*s) { case '1': case '2': case '3': case '4': case '5': @@ -1027,9 +1027,9 @@ int depth = 0; void dump(int branch) { - register int type; - register int len; - register int i; + int type; + int len; + int i; type = ops[branch].ival; len = type >> 8; @@ -1067,8 +1067,8 @@ bl(int arg, int maybe) void fixup(STR *str) { - register char *s; - register char *t; + char *s; + char *t; for (s = str->str_ptr; *s; s++) { if (*s == ';' && s[1] == ' ' && s[2] == '\n') { @@ -1092,8 +1092,8 @@ fixup(STR *str) void putlines(STR *str) { - register char *d, *s, *t, *e; - register int pos, newpos; + char *d, *s, *t, *e; + int pos, newpos; d = tokenbuf; pos = 0; @@ -1168,7 +1168,7 @@ putlines(STR *str) void putone(void) { - register char *t; + char *t; for (t = tokenbuf; *t; t++) { *t &= 127; diff --git a/x2p/hash.c b/x2p/hash.c index 9cc50f8dba..1620175584 100644 --- a/x2p/hash.c +++ b/x2p/hash.c @@ -19,10 +19,10 @@ char *savestr(char *str); STR * hfetch(register HASH *tb, char *key) { - register char *s; - register int i; - register int hash; - register HENT *entry; + char *s; + int i; + int hash; + HENT *entry; if (!tb) return NULL; @@ -45,11 +45,11 @@ hfetch(register HASH *tb, char *key) bool hstore(register HASH *tb, char *key, STR *val) { - register char *s; - register int i; - register int hash; - register HENT *entry; - register HENT **oentry; + char *s; + int i; + int hash; + HENT *entry; + HENT **oentry; if (!tb) return FALSE; @@ -94,12 +94,12 @@ void hsplit(HASH *tb) { const int oldsize = tb->tbl_max + 1; - register int newsize = oldsize * 2; - register int i; - register HENT **a; - register HENT **b; - register HENT *entry; - register HENT **oentry; + int newsize = oldsize * 2; + int i; + HENT **a; + HENT **b; + HENT *entry; + HENT **oentry; a = (HENT**) saferealloc((char*)tb->tbl_array, newsize * sizeof(HENT*)); memset(&a[oldsize], 0, oldsize * sizeof(HENT*)); /* zero second half */ @@ -130,7 +130,7 @@ hsplit(HASH *tb) HASH * hnew(void) { - register HASH *tb = (HASH*)safemalloc(sizeof(HASH)); + HASH *tb = (HASH*)safemalloc(sizeof(HASH)); tb->tbl_array = (HENT**) safemalloc(8 * sizeof(HENT*)); tb->tbl_fill = 0; @@ -22,7 +22,7 @@ str_numset(register STR *str, double num) char * str_2ptr(register STR *str) { - register char *s; + char *s; if (!str) return (char *)""; /* probably safe - won't be written to */ @@ -69,7 +69,7 @@ str_nset(register STR *str, register const char *ptr, register int len) void str_set(register STR *str, register const char *ptr) { - register int len; + int len; if (!ptr) ptr = ""; @@ -106,7 +106,7 @@ str_scat(STR *dstr, register STR *sstr) void str_cat(register STR *str, register const char *ptr) { - register int len; + int len; if (!ptr) return; @@ -123,7 +123,7 @@ str_cat(register STR *str, register const char *ptr) STR * str_new(int len) { - register STR *str; + STR *str; if (freestrroot) { str = freestrroot; @@ -173,10 +173,10 @@ str_gets(register STR *str, register FILE *fp) #if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE) && defined(STDIO_CNT_LVALUE) /* Here is some breathtakingly efficient cheating */ - register char *bp; /* we're going to steal some values */ - register int cnt; /* from the stdio struct and put EVERYTHING */ - register STDCHAR *ptr; /* in the innermost loop into registers */ - register char newline = '\n'; /* (assuming at least 6 registers) */ + char *bp; /* we're going to steal some values */ + int cnt; /* from the stdio struct and put EVERYTHING */ + STDCHAR *ptr; /* in the innermost loop into registers */ + char newline = '\n'; /* (assuming at least 6 registers) */ int i; int bpx; @@ -252,7 +252,7 @@ thats_all_folks: STR * str_make(const char *s) { - register STR *str = str_new(0); + STR *str = str_new(0); str_set(str,s); return str; diff --git a/x2p/util.c b/x2p/util.c index 464dd8f5e9..da17c862df 100644 --- a/x2p/util.c +++ b/x2p/util.c @@ -121,8 +121,8 @@ cpy2(register char *to, register char *from, register int delim) char * instr(char *big, const char *little) { - register char *t, *x; - register const char *s; + char *t, *x; + const char *s; for (t = big; *t; t++) { for (x=t,s=little; *s; x++,s++) { @@ -142,7 +142,7 @@ instr(char *big, const char *little) char * savestr(const char *str) { - register char * const newaddr = (char *) safemalloc((MEM_SIZE)(strlen(str)+1)); + char * const newaddr = (char *) safemalloc((MEM_SIZE)(strlen(str)+1)); (void)strcpy(newaddr,str); return newaddr; diff --git a/x2p/walk.c b/x2p/walk.c index 03cc5944b5..a92808f432 100644 --- a/x2p/walk.c +++ b/x2p/walk.c @@ -42,11 +42,11 @@ char *instr(char *big, const char *little); STR * walk(int useval, int level, register int node, int *numericptr, int minprec) { - register int len; - register STR *str; - register int type; - register int i; - register STR *tmpstr; + int len; + STR *str; + int type; + int i; + STR *tmpstr; STR *tmp2str; STR *tmp3str; char *t; @@ -1559,7 +1559,7 @@ tab(register STR *str, register int lvl) static void fixtab(register STR *str, register int lvl) { - register char *s; + char *s; /* strip trailing white space */ @@ -1577,7 +1577,7 @@ fixtab(register STR *str, register int lvl) static void addsemi(register STR *str) { - register char *s; + char *s; s = str->str_ptr+str->str_cur - 1; while (s >= str->str_ptr && (*s == ' ' || *s == '\t' || *s == '\n')) @@ -1589,7 +1589,7 @@ addsemi(register STR *str) static void emit_split(register STR *str, int level) { - register int i; + int i; if (split_to_array) str_cat(str,"@Fld"); @@ -1622,9 +1622,9 @@ emit_split(register STR *str, int level) int prewalk(int numit, int level, register int node, int *numericptr) { - register int len; - register int type; - register int i; + int len; + int type; + int i; int numarg; int numeric = FALSE; STR *tmpstr; @@ -2039,8 +2039,8 @@ prewalk(int numit, int level, register int node, int *numericptr) static void numericize(register int node) { - register int len; - register int type; + int len; + int type; STR *tmpstr; STR *tmp2str; int numarg; |