diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-29 05:01:54 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-05-29 05:01:54 +0000 |
commit | 17c3b45099488fbc22dc1d4e0e4600c17bc12645 (patch) | |
tree | d3f866944ed1ba0c3b916fa245466d83f4e77fe8 /dump.c | |
parent | 1d2dff63f533f62282a700198c67c41dcb6ad6df (diff) | |
download | perl-17c3b45099488fbc22dc1d4e0e4600c17bc12645.tar.gz |
[win32] misc changes
- remove code that works around lack of I_STDARG (we're a happy ANSI family)
- leave dump_foo() stubs when not -DDEBUGGING for consistent symbol exports
p4raw-id: //depot/win32/perl@1053
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 59 |
1 files changed, 18 insertions, 41 deletions
@@ -15,32 +15,24 @@ #include "EXTERN.h" #include "perl.h" -#ifndef DEBUGGING -void -dump_all(void) -{ -} -#else /* Rest of file is for DEBUGGING */ - -#ifdef I_STDARG static void dump(char *pat, ...); -#else -static void dump(); -#endif void dump_all(void) { +#ifdef DEBUGGING dTHR; PerlIO_setlinebuf(Perl_debug_log); if (main_root) dump_op(main_root); dump_packsubs(defstash); +#endif /* DEBUGGING */ } void dump_packsubs(HV *stash) { +#ifdef DEBUGGING dTHR; I32 i; HE *entry; @@ -60,11 +52,13 @@ dump_packsubs(HV *stash) dump_packsubs(hv); /* nested package */ } } +#endif /* DEBUGGING */ } void dump_sub(GV *gv) { +#ifdef DEBUGGING SV *sv = sv_newmortal(); gv_fullname3(sv, gv, Nullch); @@ -77,11 +71,13 @@ dump_sub(GV *gv) dump_op(CvROOT(GvCV(gv))); else dump("<undef>\n"); +#endif /* DEBUGGING */ } void dump_form(GV *gv) { +#ifdef DEBUGGING SV *sv = sv_newmortal(); gv_fullname3(sv, gv, Nullch); @@ -90,17 +86,21 @@ dump_form(GV *gv) dump_op(CvROOT(GvFORM(gv))); else dump("<undef>\n"); +#endif /* DEBUGGING */ } void dump_eval(void) { +#ifdef DEBUGGING dump_op(eval_root); +#endif /* DEBUGGING */ } void dump_op(OP *o) { +#ifdef DEBUGGING dump("{\n"); if (o->op_seq) PerlIO_printf(Perl_debug_log, "%-4d", o->op_seq); @@ -309,11 +309,13 @@ dump_op(OP *o) } dumplvl--; dump("}\n"); +#endif /* DEBUGGING */ } void dump_gv(GV *gv) { +#ifdef DEBUGGING SV *sv; if (!gv) { @@ -332,11 +334,13 @@ dump_gv(GV *gv) dump("\n"); dumplvl--; dump("}\n"); +#endif /* DEBUGGING */ } void dump_pm(PMOP *pm) { +#ifdef DEBUGGING char ch; if (!pm) { @@ -391,48 +395,21 @@ dump_pm(PMOP *pm) dumplvl--; dump("}\n"); +#endif /* DEBUGGING */ } -#if !defined(I_STDARG) && !defined(I_VARARGS) -/* VARARGS1 */ -static void dump(arg1,arg2,arg3,arg4,arg5) -char *arg1; -long arg2, arg3, arg4, arg5; -{ - I32 i; - - for (i = dumplvl*4; i; i--) - (void)PerlIO_putc(Perl_debug_log,' '); - PerlIO_printf(Perl_debug_log, arg1, arg2, arg3, arg4, arg5); -} - -#else - -#ifdef I_STDARG static void dump(char *pat,...) -#else -/*VARARGS0*/ -static void -dump(pat,va_alist) - char *pat; - va_dcl -#endif { +#ifdef DEBUGGING I32 i; va_list args; -#ifdef I_STDARG va_start(args, pat); -#else - va_start(args); -#endif for (i = dumplvl*4; i; i--) (void)PerlIO_putc(Perl_debug_log,' '); PerlIO_vprintf(Perl_debug_log,pat,args); va_end(args); +#endif /* DEBUGGING */ } -#endif - -#endif |