From: Perl 5 Porters Date: Thu, 4 Jul 1996 01:47:45 +0000 (+0000) Subject: Add configurable destination for debug messages X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0c2634fcd1d84b99d20ef77de231400d450a99dd;p=p5sagit%2Fp5-mst-13.2.git Add configurable destination for debug messages --- diff --git a/deb.c b/deb.c index f518b19..381fc52 100644 --- a/deb.c +++ b/deb.c @@ -30,12 +30,12 @@ deb(pat,a1,a2,a3,a4,a5,a6,a7,a8) register I32 i; GV* gv = curcop->cop_filegv; - fprintf(stderr,"(%s:%ld)\t", + fprintf(Perl_debug_log,"(%s:%ld)\t", SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", (long)curcop->cop_line); for (i=0; icop_filegv; - fprintf(stderr,"(%s:%ld)\t", + fprintf(Perl_debug_log,"(%s:%ld)\t", SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "", (long)curcop->cop_line); for (i=0; i= i) break; - fprintf(stderr, i ? " => ... " : " => "); + fprintf(Perl_debug_log, i ? " => ... " : " => "); if (stack_base[0] != &sv_undef || stack_sp < stack_base) - fprintf(stderr, " [STACK UNDERFLOW!!!]\n"); + fprintf(Perl_debug_log, " [STACK UNDERFLOW!!!]\n"); do { ++i; if (markscan <= markstack_ptr && *markscan < i) { do { ++markscan; - putc('*', stderr); + putc('*', Perl_debug_log); } while (markscan <= markstack_ptr && *markscan < i); - fprintf(stderr, " "); + fprintf(Perl_debug_log, " "); } if (i > top) break; - fprintf(stderr, "%-4s ", SvPEEK(stack_base[i])); + fprintf(Perl_debug_log, "%-4s ", SvPEEK(stack_base[i])); } while (1); - fprintf(stderr, "\n"); + fprintf(Perl_debug_log, "\n"); return 0; } #else