diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-11-29 15:17:54 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-11-29 15:17:54 +0000 |
commit | ad9e76a8629ed1ac483f0a7ed0e4da40ac5a1a00 (patch) | |
tree | 0ac533a156884d197342adff467b1b91c9272e8e /sv.c | |
parent | 0f93bb20132f1d122993dac5d6e249240a28646e (diff) | |
download | perl-ad9e76a8629ed1ac483f0a7ed0e4da40ac5a1a00.tar.gz |
Add a verbose option to -DP, and replace C<#if 0> blocks in sv_gets() with it.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -7620,22 +7620,22 @@ Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO *const fp, I32 append) "Screamer: going to getc, ptr=%"UVuf", cnt=%ld\n", PTR2UV(ptr),(long)cnt)); PerlIO_set_ptrcnt(fp, (STDCHAR*)ptr, cnt); /* deregisterize cnt and ptr */ -#if 0 - DEBUG_P(PerlIO_printf(Perl_debug_log, + + DEBUG_Pv(PerlIO_printf(Perl_debug_log, "Screamer: pre: FILE * thinks ptr=%"UVuf", cnt=%ld, base=%"UVuf"\n", PTR2UV(PerlIO_get_ptr(fp)), (long)PerlIO_get_cnt(fp), PTR2UV(PerlIO_has_base (fp) ? PerlIO_get_base(fp) : 0))); -#endif + /* This used to call 'filbuf' in stdio form, but as that behaves like getc when cnt <= 0 we use PerlIO_getc here to avoid introducing another abstraction. */ i = PerlIO_getc(fp); /* get more characters */ -#if 0 - DEBUG_P(PerlIO_printf(Perl_debug_log, + + DEBUG_Pv(PerlIO_printf(Perl_debug_log, "Screamer: post: FILE * thinks ptr=%"UVuf", cnt=%ld, base=%"UVuf"\n", PTR2UV(PerlIO_get_ptr(fp)), (long)PerlIO_get_cnt(fp), PTR2UV(PerlIO_has_base (fp) ? PerlIO_get_base(fp) : 0))); -#endif + cnt = PerlIO_get_cnt(fp); ptr = (STDCHAR*)PerlIO_get_ptr(fp); /* reregisterize cnt and ptr */ DEBUG_P(PerlIO_printf(Perl_debug_log, |