More fprintf -> PerlIO_printf changes.
Malcolm Beattie [Mon, 22 Sep 1997 15:45:56 +0000 (15:45 +0000)]
p4raw-id: //depot/perl@67

perl.c
pp_hot.c
util.c

diff --git a/perl.c b/perl.c
index ea8d3fd..5a8f0d4 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -238,7 +238,7 @@ void *arg;
      * in perl_destruct. It waits until it's the only thread and then
      * performs END blocks and other process clean-ups.
      */
-    DEBUG_L(fprintf(stderr, "thread_destruct: 0x%lx\n", (unsigned long) thr));
+    DEBUG_L(PerlIO_printf(PerlIO_stderr(), "thread_destruct: 0x%lx\n", (unsigned long) thr));
 
     Safefree(thr);
     MUTEX_LOCK(&nthreads_mutex);
@@ -266,13 +266,13 @@ register PerlInterpreter *sv_interp;
     MUTEX_LOCK(&nthreads_mutex);
     while (nthreads > 1)
     {
-       DEBUG_L(fprintf(stderr, "perl_destruct: waiting for %d threads\n",
+       DEBUG_L(PerlIO_printf(PerlIO_stderr(), "perl_destruct: waiting for %d threads\n",
                        nthreads - 1));
        COND_WAIT(&nthreads_cond, &nthreads_mutex);
     }
     /* At this point, we're the last thread */
     MUTEX_UNLOCK(&nthreads_mutex);
-    DEBUG_L(fprintf(stderr, "perl_destruct: armageddon has arrived\n"));
+    DEBUG_L(PerlIO_printf(PerlIO_stderr(), "perl_destruct: armageddon has arrived\n"));
     MUTEX_DESTROY(&nthreads_mutex);
     COND_DESTROY(&nthreads_cond);
 #endif /* !defined(FAKE_THREADS) */
index 334a60d..985286f 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -30,7 +30,7 @@ void *cvarg;
     dTHR;
 #endif /* DEBUGGING */
 
-    DEBUG_L((fprintf(stderr, "0x%lx unsetting CvOWNER of 0x%lx:%s\n",
+    DEBUG_L((PerlIO_printf(PerlIO_stderr(), "0x%lx unsetting CvOWNER of 0x%lx:%s\n",
                     (unsigned long)thr, (unsigned long)cv, SvPEEK((SV*)cv))));
     MUTEX_LOCK(CvMUTEXP(cv));
     DEBUG_L(if (CvDEPTH(cv) != 0)
@@ -1945,7 +1945,7 @@ PP(pp_entersub)
                /* We already have a clone to use */
                MUTEX_UNLOCK(CvMUTEXP(cv));
                cv = *(CV**)svp;
-               DEBUG_L(fprintf(stderr,
+               DEBUG_L(PerlIO_printf(PerlIO_stderr(),
                                "entersub: 0x%lx already has clone 0x%lx:%s\n",
                                (unsigned long) thr, (unsigned long) cv,
                                SvPEEK((SV*)cv)));
@@ -1960,7 +1960,7 @@ PP(pp_entersub)
                    CvOWNER(cv) = thr;
                    SvREFCNT_inc(cv);
                    MUTEX_UNLOCK(CvMUTEXP(cv));
-                   DEBUG_L(fprintf(stderr,
+                   DEBUG_L(PerlIO_printf(PerlIO_stderr(),
                                    "entersub: 0x%lx grabbing 0x%lx:%s in stash %s\n",
                                    (unsigned long) thr, (unsigned long) cv,
                                    SvPEEK((SV*)cv), CvSTASH(cv) ?
@@ -1970,7 +1970,7 @@ PP(pp_entersub)
                    CV *clonecv;
                    SvREFCNT_inc(cv); /* don't let it vanish from under us */
                    MUTEX_UNLOCK(CvMUTEXP(cv));
-                   DEBUG_L((fprintf(stderr,
+                   DEBUG_L((PerlIO_printf(PerlIO_stderr(),
                                     "entersub: 0x%lx cloning 0x%lx:%s\n",
                                     (unsigned long) thr, (unsigned long) cv,
                                     SvPEEK((SV*)cv))));
diff --git a/util.c b/util.c
index 6fc5672..2398d1a 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1172,7 +1172,7 @@ die(pat, va_alist)
     GV *gv;
     CV *cv;
 
-    DEBUG_L(fprintf(stderr, "die: curstack = %p, mainstack= %p\n",
+    DEBUG_L(PerlIO_printf(PerlIO_stderr(), "die: curstack = %p, mainstack= %p\n",
                    curstack, mainstack));/*debug*/
     /* We have to switch back to mainstack or die_where may try to pop
      * the eval block from the wrong stack if die is being called from a
@@ -1190,7 +1190,7 @@ die(pat, va_alist)
     message = mess(pat, &args);
     va_end(args);
 
-    DEBUG_L(fprintf(stderr, "die: message = %s\ndiehook = %p\n",
+    DEBUG_L(PerlIO_printf(PerlIO_stderr(), "die: message = %s\ndiehook = %p\n",
                   message, diehook));/*debug*/
     if (diehook) {
        /* sv_2cv might call croak() */
@@ -1219,7 +1219,7 @@ die(pat, va_alist)
     }
 
     restartop = die_where(message);
-    DEBUG_L(fprintf(stderr,
+    DEBUG_L(PerlIO_printf(PerlIO_stderr(),
                    "die: restartop = %p, was_in_eval = %d, oldrunlevel = %d\n",
                    restartop, was_in_eval, oldrunlevel));/*debug*/
     if ((!restartop && was_in_eval) || oldrunlevel > 1)
@@ -1253,7 +1253,7 @@ croak(pat, va_alist)
     message = mess(pat, &args);
     va_end(args);
 #ifdef USE_THREADS
-    DEBUG_L(fprintf(stderr, "croak: 0x%lx %s", (unsigned long) thr, message));
+    DEBUG_L(PerlIO_printf(PerlIO_stderr(), "croak: 0x%lx %s", (unsigned long) thr, message));
 #endif /* USE_THREADS */
     if (diehook) {
        /* sv_2cv might call croak() */