So many printfs, so little time.
Jarkko Hietaniemi [Sat, 6 Nov 1999 23:51:34 +0000 (23:51 +0000)]
p4raw-id: //depot/cfgperl@4530

op.c
perl.c
regcomp.c
scope.c
util.c

diff --git a/op.c b/op.c
index bcf154d..89de185 100644 (file)
--- a/op.c
+++ b/op.c
@@ -475,8 +475,8 @@ Perl_pad_sv(pTHX_ PADOFFSET po)
     dTHR;
 #ifdef USE_THREADS
     DEBUG_X(PerlIO_printf(Perl_debug_log,
-                         "0x%"UVxf" Pad 0x%"UVxf" sv %d\n",
-                         PTR2UV(thr), PTR2UV(PL_curpad), po));
+                         "0x%"UVxf" Pad 0x%"UVxf" sv %"IVdf"\n",
+                         PTR2UV(thr), PTR2UV(PL_curpad), (IV)po));
 #else
     if (!po)
        Perl_croak(aTHX_ "panic: pad_sv po");
@@ -498,8 +498,8 @@ Perl_pad_free(pTHX_ PADOFFSET po)
        Perl_croak(aTHX_ "panic: pad_free po");
 #ifdef USE_THREADS
     DEBUG_X(PerlIO_printf(Perl_debug_log,
-                         "0x%"UVxf" Pad 0x%"UVxf" free %d\n",
-                         PTR2UV(thr), PTR2UV(PL_curpad), po));
+                         "0x%"UVxf" Pad 0x%"UVxf" free %"IVd"\n",
+                         PTR2UV(thr), PTR2UV(PL_curpad), (IV)po));
 #else
     DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%"UVxf" free %"IVdf"\n",
                          PTR2UV(PL_curpad), (IV)po));
@@ -520,8 +520,8 @@ Perl_pad_swipe(pTHX_ PADOFFSET po)
        Perl_croak(aTHX_ "panic: pad_swipe po");
 #ifdef USE_THREADS
     DEBUG_X(PerlIO_printf(Perl_debug_log,
-                         "0x%"UVxf" Pad 0x%"UVxf" swipe %d\n",
-                         PTR2UV(thr), PTR2UV(PL_curpad), po));
+                         "0x%"UVxf" Pad 0x%"UVxf" swipe %"IVdf"\n",
+                         PTR2UV(thr), PTR2UV(PL_curpad), (IV)po));
 #else
     DEBUG_X(PerlIO_printf(Perl_debug_log, "Pad 0x%"UVxf" swipe %"IVdf"\n",
                          PTR2UV(PL_curpad), (IV)po));
diff --git a/perl.c b/perl.c
index 46efa2a..cc13c23 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -281,8 +281,8 @@ perl_destruct(pTHXx)
            goto retry_cleanup;
        default:
            DEBUG_S(PerlIO_printf(Perl_debug_log,
-                                 "perl_destruct: ignoring %p (state %u)\n",
-                                 t, ThrSTATE(t)));
+                                 "perl_destruct: ignoring %p (state %"UVuf")\n",
+                                 t, (UV)ThrSTATE(t)));
            MUTEX_UNLOCK(&t->mutex);
            /* fall through and out */
        }
index d3b2c03..d68b351 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -3188,7 +3188,7 @@ S_dumpuntil(pTHX_ regnode *start, regnode *node, regnode *last, SV* sv, I32 l)
            goto after_print;
        regprop(sv, node);
        PerlIO_printf(Perl_debug_log, "%4"IVdf":%*s%s", (IV)(node - start),
-                     2*l + 1, "", SvPVX(sv));
+                     (int)(2*l + 1), "", SvPVX(sv));
        if (next == NULL)               /* Next ptr. */
            PerlIO_printf(Perl_debug_log, "(0)");
        else 
diff --git a/scope.c b/scope.c
index da428d7..9c8a0f4 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -443,8 +443,8 @@ Perl_save_threadsv(pTHX_ PADOFFSET i)
 #ifdef USE_THREADS
     dTHR;
     SV **svp = &THREADSV(i);   /* XXX Change to save by offset */
-    DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %u: %p %p:%s\n",
-                         i, svp, *svp, SvPEEK(*svp)));
+    DEBUG_S(PerlIO_printf(Perl_debug_log, "save_threadsv %"UVuf": %p %p:%s\n",
+                         (UV)i, svp, *svp, SvPEEK(*svp)));
     save_svref(svp);
     return svp;
 #else
diff --git a/util.c b/util.c
index 5a7d1bf..9bd766c 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3473,7 +3473,8 @@ Perl_new_struct_thread(pTHX_ struct perl_thread *t)
            av_store(thr->threadsv, i, sv);
            sv_magic(sv, 0, 0, &PL_threadsv_names[i], 1);
            DEBUG_S(PerlIO_printf(Perl_debug_log,
-               "new_struct_thread: copied threadsv %d %p->%p\n",i, t, thr));
+               "new_struct_thread: copied threadsv %"IVdf" %p->%p\n",
+                                 (IV)i, t, thr));
        }
     } 
     thr->threadsvp = AvARRAY(thr->threadsv);