#include "EXTERN.h"
#include "perl.h"
-#ifndef DEBUGGING
-void
-dump_all(void)
-{
-}
-#else /* Rest of file is for DEBUGGING */
-
-#ifdef I_STDARG
+#ifndef PERL_OBJECT
static void dump(char *pat, ...);
-#else
-static void dump();
-#endif
+#endif /* PERL_OBJECT */
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;
dump_packsubs(hv); /* nested package */
}
}
+#endif /* DEBUGGING */
}
void
dump_sub(GV *gv)
{
+#ifdef DEBUGGING
SV *sv = sv_newmortal();
gv_fullname3(sv, gv, Nullch);
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);
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);
}
dumplvl--;
dump("}\n");
+#endif /* DEBUGGING */
}
void
dump_gv(GV *gv)
{
+#ifdef DEBUGGING
SV *sv;
if (!gv) {
dump("\n");
dumplvl--;
dump("}\n");
+#endif /* DEBUGGING */
}
void
dump_pm(PMOP *pm)
{
+#ifdef DEBUGGING
char ch;
if (!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
+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