summaryrefslogtreecommitdiff
path: root/deb.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-29 05:01:54 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-29 05:01:54 +0000
commit17c3b45099488fbc22dc1d4e0e4600c17bc12645 (patch)
treed3f866944ed1ba0c3b916fa245466d83f4e77fe8 /deb.c
parent1d2dff63f533f62282a700198c67c41dcb6ad6df (diff)
downloadperl-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 'deb.c')
-rw-r--r--deb.c57
1 files changed, 8 insertions, 49 deletions
diff --git a/deb.c b/deb.c
index fb9dfef11f..af86540bba 100644
--- a/deb.c
+++ b/deb.c
@@ -15,50 +15,10 @@
#include "EXTERN.h"
#include "perl.h"
-#ifdef DEBUGGING
-#if !defined(I_STDARG) && !defined(I_VARARGS)
-
-/*
- * Fallback on the old hackers way of doing varargs
- */
-
-/*VARARGS1*/
-void
-deb(pat,a1,a2,a3,a4,a5,a6,a7,a8)
- char *pat;
-{
- dTHR;
- register I32 i;
- GV* gv = curcop->cop_filegv;
-
-#ifdef USE_THREADS
- PerlIO_printf(Perl_debug_log,"0x%lx (%s:%ld)\t",
- (unsigned long) thr,
- SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "<free>",
- (long)curcop->cop_line);
-#else
- PerlIO_printf(Perl_debug_log, "(%s:%ld)\t",
- SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "<free>",
- (long)curcop->cop_line);
-#endif /* USE_THREADS */
- for (i=0; i<dlevel; i++)
- PerlIO_printf(Perl_debug_log, "%c%c ",debname[i],debdelim[i]);
- PerlIO_printf(Perl_debug_log, pat,a1,a2,a3,a4,a5,a6,a7,a8);
-}
-
-#else /* !defined(I_STDARG) && !defined(I_VARARGS) */
-
-# ifdef I_STDARG
void
deb(const char *pat, ...)
-# else
-/*VARARGS1*/
-void
-deb(pat, va_alist)
- const char *pat;
- va_dcl
-# endif
{
+#ifdef DEBUGGING
dTHR;
va_list args;
register I32 i;
@@ -77,27 +37,26 @@ deb(pat, va_alist)
for (i=0; i<dlevel; i++)
PerlIO_printf(Perl_debug_log, "%c%c ",debname[i],debdelim[i]);
-# ifdef I_STDARG
va_start(args, pat);
-# else
- va_start(args);
-# endif
(void) PerlIO_vprintf(Perl_debug_log,pat,args);
va_end( args );
+#endif /* DEBUGGING */
}
-#endif /* !defined(I_STDARG) && !defined(I_VARARGS) */
void
deb_growlevel(void)
{
+#ifdef DEBUGGING
dlmax += 128;
Renew(debname, dlmax, char);
Renew(debdelim, dlmax, char);
+#endif /* DEBUGGING */
}
I32
debstackptrs(void)
{
+#ifdef DEBUGGING
dTHR;
PerlIO_printf(Perl_debug_log, "%8lx %8lx %8ld %8ld %8ld\n",
(unsigned long)curstack, (unsigned long)stack_base,
@@ -106,12 +65,14 @@ debstackptrs(void)
PerlIO_printf(Perl_debug_log, "%8lx %8lx %8ld %8ld %8ld\n",
(unsigned long)mainstack, (unsigned long)AvARRAY(curstack),
(long)mainstack, (long)AvFILLp(curstack), (long)AvMAX(curstack));
+#endif /* DEBUGGING */
return 0;
}
I32
debstack(void)
{
+#ifdef DEBUGGING
dTHR;
I32 top = stack_sp - stack_base;
register I32 i = top - 30;
@@ -148,8 +109,6 @@ debstack(void)
}
while (1);
PerlIO_printf(Perl_debug_log, "\n");
+#endif /* DEBUGGING */
return 0;
}
-#else
-static int dummy; /* avoid totally empty deb.o file */
-#endif /* DEBUGGING */