Ap |void |mini_mktime |NN struct tm *pm
EXp |OP* |mod |NULLOK OP* o|I32 type
p |int |mode_from_discipline|NULLOK SV* discp
-Ap |char* |moreswitches |NN char* s
+Ap |const char* |moreswitches |NN const char* s
p |OP* |my |NN OP* o
Ap |NV |my_atof |NN const char *s
#if (!defined(HAS_MEMCPY) && !defined(HAS_BCOPY)) || (!defined(HAS_MEMMOVE) && !defined(HAS_SAFE_MEMCPY) && !defined(HAS_SAFE_BCOPY))
VOL bool dosearch = FALSE;
const char *validarg = "";
register SV *sv;
- register char *s, c;
+ register char c;
const char *cddir = NULL;
#ifdef USE_SITECUSTOMIZE
bool minus_f = FALSE;
SAVEFREESV(sv);
init_main_stash();
+ {
+ const char *s;
for (argc--,argv++; argc > 0; argc--,argv++) {
if (argv[0][0] != '-' || !argv[0][1])
break;
Perl_croak(aTHX_ "Unrecognized switch: -%s (-h will show valid options)",s);
}
}
+ }
+
switch_end:
+ {
+ char *s;
+
if (
#ifndef SECURE_INTERNAL_GETENV
!PL_tainting &&
}
}
}
+ }
#ifdef USE_SITECUSTOMIZE
if (!minus_f) {
}
}
+ {
+ const char *s;
if ((s = PerlEnv_getenv("PERL_SIGNALS"))) {
if (strEQ(s, "unsafe"))
PL_signals |= PERL_SIGNALS_UNSAFE_FLAG;
else
Perl_croak(aTHX_ "PERL_SIGNALS illegal: \"%s\"", s);
}
+ }
#ifdef PERL_MAD
+ {
+ const char *s;
if ((s = PerlEnv_getenv("PERL_XMLDUMP"))) {
PL_madskills = 1;
PL_minus_c = 1;
}
my_setenv("PERL_XMLDUMP", NULL); /* hide from subprocs */
}
+ }
+
+ {
+ const char *s;
if ((s = PerlEnv_getenv("PERL_MADSKILLS"))) {
PL_madskills = atoi(s);
my_setenv("PERL_MADSKILLS", NULL); /* hide from subprocs */
}
+ }
#endif
lex_start(linestr_sv, rsfp, TRUE);
/* This routine handles any switches that can be given during run */
-char *
-Perl_moreswitches(pTHX_ char *s)
+const char *
+Perl_moreswitches(pTHX_ const char *s)
{
dVAR;
UV rschar;
while (*s && isSPACE(*s))
++s;
if (*s) {
- char *e, *p;
+ const char *e, *p;
p = s;
/* ignore trailing spaces (possibly followed by other switches) */
do {
case 'm':
forbid_setid('m', -1); /* XXX ? */
if (*++s) {
- char *start;
+ const char *start;
SV *sv;
const char *use = "use ";
/* -M-foo == 'no foo' */
S_find_beginning(pTHX_ SV* linestr_sv, PerlIO *rsfp)
{
dVAR;
- register char *s;
+ const char *s;
register const char *s2;
#ifdef MACOS_TRADITIONAL
int maclines = 0;
PERL_CALLCONV OP* Perl_mod(pTHX_ OP* o, I32 type);
PERL_CALLCONV int Perl_mode_from_discipline(pTHX_ SV* discp);
-PERL_CALLCONV char* Perl_moreswitches(pTHX_ char* s)
+PERL_CALLCONV const char* Perl_moreswitches(pTHX_ const char* s)
__attribute__nonnull__(pTHX_1);
PERL_CALLCONV OP* Perl_my(pTHX_ OP* o)
const U32 oldpdb = PL_perldb;
const bool oldn = PL_minus_n;
const bool oldp = PL_minus_p;
+ const char *d1 = d;
do {
- if (*d == 'M' || *d == 'm' || *d == 'C') {
- const char * const m = d;
- while (*d && !isSPACE(*d))
- d++;
+ if (*d1 == 'M' || *d1 == 'm' || *d1 == 'C') {
+ const char * const m = d1;
+ while (*d1 && !isSPACE(*d1))
+ d1++;
Perl_croak(aTHX_ "Too late for \"-%.*s\" option",
- (int)(d - m), m);
+ (int)(d1 - m), m);
}
- d = moreswitches(d);
- } while (d);
+ d1 = moreswitches(d1);
+ } while (d1);
if (PL_doswitches && !switches_done) {
int argc = PL_origargc;
char **argv = PL_origargv;