limit debug output log
diff --git a/skeletons/tests/Makefile.am b/skeletons/tests/Makefile.am
index ac05364..546bb67 100644
--- a/skeletons/tests/Makefile.am
+++ b/skeletons/tests/Makefile.am
@@ -1,5 +1,3 @@
-AM_CPPFLAGS = -I$(top_srcdir)/skeletons
-
check_PROGRAMS = \
check-ber_tlv_tag \
check-length \
@@ -14,6 +12,7 @@
check-PER \
check-PER-INTEGER
+AM_CPPFLAGS = -I$(top_srcdir)/skeletons $(TESTSUITE_CFLAGS)
AM_LDFLAGS = $(top_builddir)/skeletons/libasn1cskeletons.la
LDADD = -lm
diff --git a/skeletons/tests/Makefile.in b/skeletons/tests/Makefile.in
index 0b4b12f..7afee1b 100644
--- a/skeletons/tests/Makefile.in
+++ b/skeletons/tests/Makefile.in
@@ -248,7 +248,7 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I$(top_srcdir)/skeletons
+AM_CPPFLAGS = -I$(top_srcdir)/skeletons $(TESTSUITE_CFLAGS)
AM_LDFLAGS = $(top_builddir)/skeletons/libasn1cskeletons.la
LDADD = -lm
TESTS = $(check_PROGRAMS)
diff --git a/skeletons/tests/check-OCTET_STRING.c b/skeletons/tests/check-OCTET_STRING.c
index e03ecf5..3aad01a 100644
--- a/skeletons/tests/check-OCTET_STRING.c
+++ b/skeletons/tests/check-OCTET_STRING.c
@@ -3,7 +3,6 @@
#include <time.h>
#include <sys/time.h>
-#define EMIT_ASN_DEBUG 1
#include <OCTET_STRING.h>
#include <BIT_STRING.h>
diff --git a/skeletons/tests/check-PER-INTEGER.c b/skeletons/tests/check-PER-INTEGER.c
index 0d971b3..94f8280 100644
--- a/skeletons/tests/check-PER-INTEGER.c
+++ b/skeletons/tests/check-PER-INTEGER.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include <assert.h>
-#define EMIT_ASN_DEBUG 1
#include <INTEGER.h>
#include <INTEGER.c>
#include <per_support.c>
diff --git a/skeletons/tests/check-PER.c b/skeletons/tests/check-PER.c
index 9d06a2e..8b55f23 100644
--- a/skeletons/tests/check-PER.c
+++ b/skeletons/tests/check-PER.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include <assert.h>
-#define EMIT_ASN_DEBUG 1
#include <per_support.c>
#include <per_support.h>
@@ -290,14 +289,14 @@
ret = per_put_few_bits(&po, -1, prior);
assert(ret == 0);
- fprintf(stderr, " (out{nboff=%d,nbits=%d,buf_offset=%d})\n", (int)po.nboff, (int)po.nbits, (int)(po.buffer - po.tmpspace));
+ ASN_DEBUG(" (out{nboff=%d,nbits=%d,buf_offset=%d})", (int)po.nboff, (int)po.nbits, (int)(po.buffer - po.tmpspace));
ret = per_put_few_bits(&po, -1, next);
assert(ret == 0);
- fprintf(stderr, " (out{nboff=%d,nbits=%d,buf_offset=%d})\n", (int)po.nboff, (int)po.nbits, (int)(po.buffer - po.tmpspace));
+ ASN_DEBUG(" (out{nboff=%d,nbits=%d,buf_offset=%d})", (int)po.nboff, (int)po.nbits, (int)(po.buffer - po.tmpspace));
- fprintf(stderr, "Putting %d + %d bits (%d/%d), got %d bytes and %d bits\n",
+ ASN_DEBUG("Putting %d + %d bits (%d/%d), got %d bytes and %d bits",
prior, next, (prior + next) / 8, (prior + next) % 8,
(int)(po.buffer - po.tmpspace), (int)po.nboff);
assert((po.buffer - po.tmpspace) * 8 + po.nboff == prior + next);
diff --git a/skeletons/tests/check-REAL.c b/skeletons/tests/check-REAL.c
index adad56e..ba35244 100644
--- a/skeletons/tests/check-REAL.c
+++ b/skeletons/tests/check-REAL.c
@@ -2,7 +2,6 @@
#include <assert.h>
#include <math.h>
-#define EMIT_ASN_DEBUG 1
#include <REAL.h>
static char reconstructed[2][512];