Fix some of the {IV_IS_QUAD,UV_IS_QUAD} cases so that
Jarkko Hietaniemi [Mon, 2 Aug 1999 12:53:10 +0000 (12:53 +0000)]
emacs code indentation doesn't get wrong ideas--
in other words, introduce a couple of "redundant" if:s.

p4raw-id: //depot/cfgperl@3887

dump.c
op.c
pp_hot.c
pp_sys.c
regcomp.c
util.c

diff --git a/dump.c b/dump.c
index f49c8c2..8735db3 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1188,8 +1188,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
            I32 ix;
 
            for (ix = 1; ix <= AvFILL(pad_name); ix++) {
-               if (SvPOK(pname[ix]))
 #ifdef IV_IS_QUAD
+               if (SvPOK(pname[ix]))
                    Perl_dump_indent(aTHX_ level, /* %5d below is enough whitespace. */
                                file, 
                                "%5d. 0x%" PERL_PRIx64 " (%s\"%s\" %" PERL_PRId64 "-%" PERL_PRId64 ")\n",
@@ -1199,6 +1199,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
                                (IV)SvNVX(pname[ix]),
                                (IV)SvIVX(pname[ix]));
 #else
+               if (SvPOK(pname[ix]))
                    Perl_dump_indent(aTHX_ level, /* %5d below is enough whitespace. */
                                file, 
                                "%5d. 0x%lx (%s\"%s\" %ld-%ld)\n",
diff --git a/op.c b/op.c
index d847e3d..313cce7 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4798,12 +4798,13 @@ Perl_ck_fun(pTHX_ OP *o)
                    char *name = SvPVx(((SVOP*)kid)->op_sv, n_a);
                    OP *newop = newAVREF(newGVOP(OP_GV, 0,
                        gv_fetchpv(name, TRUE, SVt_PVAV) ));
-                   if (ckWARN(WARN_SYNTAX))
 #ifdef IV_IS_QUAD
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Array @%s missing the @ in argument %" PERL_PRId64 " of %s()",
                            name, (IV)numargs, PL_op_desc[type]);
 #else
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Array @%s missing the @ in argument %ld of %s()",
                            name, (long)numargs, PL_op_desc[type]);
@@ -4824,12 +4825,13 @@ Perl_ck_fun(pTHX_ OP *o)
                    char *name = SvPVx(((SVOP*)kid)->op_sv, n_a);
                    OP *newop = newHVREF(newGVOP(OP_GV, 0,
                        gv_fetchpv(name, TRUE, SVt_PVHV) ));
-                   if (ckWARN(WARN_SYNTAX))
 #ifdef IV_IS_QUAD
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Hash %%%s missing the %% in argument %" PERL_PRId64 " of %s()",
                            name, (IV)numargs, PL_op_desc[type]);
 #else
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Hash %%%s missing the %% in argument %ld of %s()",
                            name, (long)numargs, PL_op_desc[type]);
index c5df5e0..38658d1 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -588,11 +588,12 @@ PP(pp_rv2hv)
        dTARGET;
        if (SvTYPE(hv) == SVt_PVAV)
            hv = avhv_keys((AV*)hv);
-       if (HvFILL(hv))
 #ifdef IV_IS_QUAD
+       if (HvFILL(hv))
             Perl_sv_setpvf(aTHX_ TARG, "%" PERL_PRId64 "/%" PERL_PRId64,
                       (Quad_t)HvFILL(hv), (Quad_t)HvMAX(hv) + 1);
 #else
+       if (HvFILL(hv))
             Perl_sv_setpvf(aTHX_ TARG, "%ld/%ld",
                       (long)HvFILL(hv), (long)HvMAX(hv) + 1);
 #endif
index c07b18d..e081d67 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -816,12 +816,13 @@ PP(pp_untie)
     if (ckWARN(WARN_UNTIE)) {
         MAGIC * mg ;
         if (mg = SvTIED_mg(sv, how)) {
-            if (mg && SvREFCNT(SvRV(mg->mg_obj)) > 1)  
 #ifdef IV_IS_QUAD
+            if (mg && SvREFCNT(SvRV(mg->mg_obj)) > 1)  
                Perl_warner(aTHX_ WARN_UNTIE,
                    "untie attempted while %" PERL_PRIu64 " inner references still exist",
                    (UV)SvREFCNT(SvRV(mg->mg_obj)) - 1 ) ;
 #else
+            if (mg && SvREFCNT(SvRV(mg->mg_obj)) > 1)  
                Perl_warner(aTHX_ WARN_UNTIE,
                    "untie attempted while %lu inner references still exist",
                    (unsigned long)SvREFCNT(SvRV(mg->mg_obj)) - 1 ) ;
index bdbd643..3fc298f 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -2834,10 +2834,11 @@ S_regclassutf8(pTHX)
         if (range) {
            if (lastvalue > value)
                FAIL("invalid [] range in regexp");
-           if (!SIZE_ONLY)
 #ifdef UV_IS_QUAD
+           if (!SIZE_ONLY)
                 Perl_sv_catpvf(aTHX_ listsv, "%04" PERL_PRIx64 "\t%04" PERL_PRIx64 "\n", (UV)lastvalue, (UV)value);
 #else
+           if (!SIZE_ONLY)
                Perl_sv_catpvf(aTHX_ listsv, "%04x\t%04x\n", lastvalue, value);
 #endif
            lastvalue = value;
@@ -2851,10 +2852,11 @@ S_regclassutf8(pTHX)
                range = 1;
                continue;       /* do it next time */
            }
-           if (!SIZE_ONLY)
 #ifdef UV_IS_QUAD
+           if (!SIZE_ONLY)
                Perl_sv_catpvf(aTHX_ listsv, "%04" PERL_PRIx64 "\n", (UV)value);
 #else
+           if (!SIZE_ONLY)
                Perl_sv_catpvf(aTHX_ listsv, "%04x\n", value);
 #endif
        }
diff --git a/util.c b/util.c
index 1892c27..a7c9530 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1405,11 +1405,12 @@ Perl_mess(pTHX_ const char *pat, va_list *args)
     sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
     if (!SvCUR(sv) || *(SvEND(sv) - 1) != '\n') {
        dTHR;
-       if (PL_curcop->cop_line)
 #ifdef IV_IS_QUAD
+       if (PL_curcop->cop_line)
            Perl_sv_catpvf(aTHX_ sv, " at %_ line %" PERL_PRId64,
                      GvSV(PL_curcop->cop_filegv), (IV)PL_curcop->cop_line);
 #else
+       if (PL_curcop->cop_line)
            Perl_sv_catpvf(aTHX_ sv, " at %_ line %ld",
                      GvSV(PL_curcop->cop_filegv), (long)PL_curcop->cop_line);
 #endif