Upgrade to Text-Tabs+Wrap-2006.0711. Keep the local changes from
[p5sagit/p5-mst-13.2.git] / toke.c
diff --git a/toke.c b/toke.c
index 4eef362..f4e4499 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -499,7 +499,7 @@ S_feature_is_enabled(pTHX_ const char *name, STRLEN namelen)
     dVAR;
     HV * const hinthv = GvHV(PL_hintgv);
     char he_name[32] = "feature_";
-    (void) strncpy(&he_name[8], name, 24);
+    (void) my_strlcpy(&he_name[8], name, 24);
 
     return (hinthv && hv_exists(hinthv, he_name, 8 + namelen));
 }
@@ -1976,8 +1976,7 @@ S_scan_const(pTHX_ char *start)
                /* FALL THROUGH */
            default:
                {
-                   if (isALNUM(*s) &&
-                       *s != '_' &&
+                   if ((isALPHA(*s) || isDIGIT(*s)) &&
                        ckWARN(WARN_MISC))
                        Perl_warner(aTHX_ packWARN(WARN_MISC),
                               "Unrecognized escape \\%c passed through",
@@ -6698,7 +6697,7 @@ S_pending_ident(pTHX)
 {
     dVAR;
     register char *d;
-    register I32 tmp = 0;
+    PADOFFSET tmp = 0;
     /* pit holds the identifier we read and pending_ident is reset */
     char pit = PL_pending_ident;
     PL_pending_ident = 0;
@@ -10720,7 +10719,9 @@ S_scan_subst(pTHX_ char *start)
            sv_catpv(repl, es ? "eval " : "do ");
        sv_catpvs(repl, "{");
        sv_catsv(repl, PL_lex_repl);
-       sv_catpvs(repl, "\n}");
+       if (strchr(SvPVX(PL_lex_repl), '#'))
+           sv_catpvs(repl, "\n");
+       sv_catpvs(repl, "}");
        SvEVALED_on(repl);
        SvREFCNT_dec(PL_lex_repl);
        PL_lex_repl = repl;
@@ -11185,12 +11186,11 @@ S_scan_inputsymbol(pTHX_ char *start)
           filehandle
        */
        if (*d == '$') {
-           I32 tmp;
-
            /* try to find it in the pad for this block, otherwise find
               add symbol table ops
            */
-           if ((tmp = pad_findmy(d)) != NOT_IN_PAD) {
+           const PADOFFSET tmp = pad_findmy(d);
+           if (tmp != NOT_IN_PAD) {
                if (PAD_COMPNAME_FLAGS_isOUR(tmp)) {
                    HV * const stash = PAD_COMPNAME_OURSTASH(tmp);
                    HEK * const stashname = HvNAME_HEK(stash);