aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/BlockPartitioner.cpp2
-rw-r--r--src/DifferentialModulator.cpp2
-rw-r--r--src/Flowgraph.cpp6
-rw-r--r--src/Flowgraph.h2
-rw-r--r--src/FrameMultiplexer.cpp2
-rw-r--r--src/PcDebug.h45
-rw-r--r--src/SignalMultiplexer.cpp2
7 files changed, 13 insertions, 48 deletions
diff --git a/src/BlockPartitioner.cpp b/src/BlockPartitioner.cpp
index fbb130e..d8b3ce9 100644
--- a/src/BlockPartitioner.cpp
+++ b/src/BlockPartitioner.cpp
@@ -80,7 +80,7 @@ int BlockPartitioner::process(std::vector<Buffer*> dataIn, Buffer* dataOut)
assert(dataIn.size() == 2);
dataOut->setLength(d_cifCount * (d_ficSize + d_cifSize));
-#ifdef DEBUG
+#ifdef TRACE
fprintf(stderr, "BlockPartitioner::process(dataIn:");
for (size_t i = 0; i < dataIn.size(); ++i) {
fprintf(stderr, " %p", dataIn[i]);
diff --git a/src/DifferentialModulator.cpp b/src/DifferentialModulator.cpp
index b3926c1..97a7998 100644
--- a/src/DifferentialModulator.cpp
+++ b/src/DifferentialModulator.cpp
@@ -50,7 +50,7 @@ DifferentialModulator::~DifferentialModulator()
// dataIn[1] -> data symbols
int DifferentialModulator::process(std::vector<Buffer*> dataIn, Buffer* dataOut)
{
-#ifdef DEBUG
+#ifdef TRACE
fprintf(stderr, "DifferentialModulator::process (dataIn:");
for (size_t i = 0; i < dataIn.size(); ++i) {
fprintf(stderr, " %p", dataIn[i]);
diff --git a/src/Flowgraph.cpp b/src/Flowgraph.cpp
index e594d70..4c83fe8 100644
--- a/src/Flowgraph.cpp
+++ b/src/Flowgraph.cpp
@@ -62,7 +62,7 @@ void Node::addOutputBuffer(Buffer::sptr& buffer, Metadata_vec_sptr& md)
{
myOutputBuffers.push_back(buffer);
myOutputMetadata.push_back(md);
-#if DEBUG
+#if TRACE
std::string fname = string(myPlugin->name()) +
"-" + to_string(myDebugFiles.size()) +
"-" + to_string((size_t)(void*)myPlugin.get()) +
@@ -80,7 +80,7 @@ void Node::removeOutputBuffer(Buffer::sptr& buffer, Metadata_vec_sptr& md)
myOutputBuffers.end(),
buffer);
if (it != myOutputBuffers.end()) {
-#if DEBUG
+#if TRACE
size_t pos = std::distance(myOutputBuffers.begin(),
it);
@@ -177,7 +177,7 @@ int Node::process()
}
-#if DEBUG
+#if TRACE
assert(myDebugFiles.size() == myOutputBuffers.size());
auto buf = myOutputBuffers.begin();
diff --git a/src/Flowgraph.h b/src/Flowgraph.h
index 43550d0..389359b 100644
--- a/src/Flowgraph.h
+++ b/src/Flowgraph.h
@@ -66,7 +66,7 @@ protected:
std::list<Metadata_vec_sptr> myInputMetadata;
std::list<Metadata_vec_sptr> myOutputMetadata;
-#if DEBUG
+#if TRACE
std::list<FILE*> myDebugFiles;
#endif
diff --git a/src/FrameMultiplexer.cpp b/src/FrameMultiplexer.cpp
index 5dc6dca..e893120 100644
--- a/src/FrameMultiplexer.cpp
+++ b/src/FrameMultiplexer.cpp
@@ -52,7 +52,7 @@ int FrameMultiplexer::process(std::vector<Buffer*> dataIn, Buffer* dataOut)
assert(dataIn[0]->getLength() == 864 * 8);
dataOut->setLength(dataIn[0]->getLength());
-#ifdef DEBUG
+#ifdef TRACE
fprintf(stderr, "FrameMultiplexer::process(dataIn:");
for (size_t i = 0; i < dataIn.size(); ++i) {
fprintf(stderr, " %p", dataIn[i]);
diff --git a/src/PcDebug.h b/src/PcDebug.h
index 796f7d2..959f410 100644
--- a/src/PcDebug.h
+++ b/src/PcDebug.h
@@ -29,48 +29,13 @@
#include <stdio.h>
-#define LOG stderr
+#define LOG stderr
-#if !defined(_WIN32) || defined(__MINGW32__)
-# ifndef PDEBUG
-# ifdef DEBUG
-# define PDEBUG(fmt, args...) fprintf (LOG, fmt , ## args)
-# else
-# define PDEBUG(fmt, args...)
-# endif
-# endif
-# ifdef DEBUG
-# define PDEBUG_VERBOSE(level, verbosity, fmt, args...) if (level <= verbosity) { fprintf(LOG, fmt, ## args); fflush(LOG); }
-# define PDEBUG0_VERBOSE(level, verbosity, txt) if (level <= verbosity) { fprintf(LOG, txt); fflush(LOG); }
-# define PDEBUG1_VERBOSE(level, verbosity, txt, arg0) if (level <= verbosity) { fprintf(LOG, txt, arg0); fflush(LOG); }
-# define PDEBUG2_VERBOSE(level, verbosity, txt, arg0, arg1) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1); fflush(LOG); }
-# define PDEBUG3_VERBOSE(level, verbosity, txt, arg0, arg1, arg2) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1, arg2); fflush(LOG); }
-# define PDEBUG4_VERBOSE(level, verbosity, txt, arg0, arg1, arg2, arg3) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1, arg2, arg3); fflush(LOG); }
-# else
-# define PDEBUG_VERBOSE(level, verbosity, fmt, args...)
-# define PDEBUG0_VERBOSE(level, verbosity, txt)
-# define PDEBUG1_VERBOSE(level, verbosity, txt, arg0)
-# define PDEBUG2_VERBOSE(level, verbosity, txt, arg0, arg1)
-# define PDEBUG3_VERBOSE(level, verbosity, txt, arg0, arg1, arg2)
-# define PDEBUG4_VERBOSE(level, verbosity, txt, arg0, arg1, arg2, arg3)
-# endif // DEBUG
-#else // _WIN32
-# ifdef _DEBUG
-# define PDEBUG
-# define PDEBUG_VERBOSE
-# define PDEBUG0_VERBOSE(level, verbosity, txt) if (level <= verbosity) { fprintf(LOG, txt); fflush(LOG); }
-# define PDEBUG1_VERBOSE(level, verbosity, txt, arg0) if (level <= verbosity) { fprintf(LOG, txt, arg0); fflush(LOG); }
-# define PDEBUG2_VERBOSE(level, verbosity, txt, arg0, arg1) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1); fflush(LOG); }
-# define PDEBUG3_VERBOSE(level, verbosity, txt, arg0, arg1, arg2) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1, arg2); fflush(LOG); }
-# define PDEBUG4_VERBOSE(level, verbosity, txt, arg0, arg1, arg2, arg3) if (level <= verbosity) { fprintf(LOG, txt, arg0, arg1, arg2, arg3); fflush(LOG); }
+#ifndef PDEBUG
+# ifdef TRACE
+# define PDEBUG(fmt, args...) fprintf (LOG, fmt , ## args)
# else
-# define PDEBUG
-# define PDEBUG_VERBOSE
-# define PDEBUG0_VERBOSE(level, verbosity, txt)
-# define PDEBUG1_VERBOSE(level, verbosity, txt, arg0)
-# define PDEBUG2_VERBOSE(level, verbosity, txt, arg0, arg1)
-# define PDEBUG3_VERBOSE(level, verbosity, txt, arg0, arg1, arg2)
-# define PDEBUG4_VERBOSE(level, verbosity, txt, arg0, arg1, arg2, arg3)
+# define PDEBUG(fmt, args...)
# endif
#endif
diff --git a/src/SignalMultiplexer.cpp b/src/SignalMultiplexer.cpp
index d2c9c66..1d95bdd 100644
--- a/src/SignalMultiplexer.cpp
+++ b/src/SignalMultiplexer.cpp
@@ -49,7 +49,7 @@ SignalMultiplexer::~SignalMultiplexer()
// dataIn[2] -> (optional) TII symbol
int SignalMultiplexer::process(std::vector<Buffer*> dataIn, Buffer* dataOut)
{
-#ifdef DEBUG
+#ifdef TRACE
fprintf(stderr, "SignalMultiplexer::process (dataIn:");
for (unsigned i = 0; i < dataIn.size(); ++i) {
fprintf(stderr, " %p", dataIn[i]);