#define MAX_TRACE_LEN 100
-FILE *model_out;
-int fd_user_out; /**< @brief File descriptor from which to read user program output */
+/** @brief Model-checker output stream; default to stdout until redirected */
+FILE *model_out = stdout;
#define CONFIG_STACKTRACE
/** Print a backtrace of the current program state. */
}
}
+#ifndef CONFIG_DEBUG
+
+static int fd_user_out; /**< @brief File descriptor from which to read user program output */
+
/**
* @brief Setup output redirecting
*
}
}
}
+#endif /* ! CONFIG_DEBUG */
#ifndef __OUTPUT_H__
#define __OUTPUT_H__
+#include "config.h"
+
+#ifdef CONFIG_DEBUG
+static inline void redirect_output() { }
+static inline void clear_program_output() { }
+static inline void print_program_output() { }
+#else
void redirect_output();
void clear_program_output();
void print_program_output();
+#endif /* ! CONFIG_DEBUG */
#endif /* __OUTPUT_H__ */