summaryrefslogtreecommitdiff
path: root/nios2sim-ng.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-11-10 17:54:11 +0100
committerTobias Klauser <tklauser@distanz.ch>2010-11-10 17:54:11 +0100
commit9d61d230cf34754a73c575b5e09737b4b6f30395 (patch)
tree6993f2057b16f8a85443b1d8162b884650be1b6b /nios2sim-ng.h
parent2feb33c52b95bafcbaefcdf5ce15b1d2adc94378 (diff)
Add verbose mode
Diffstat (limited to 'nios2sim-ng.h')
-rw-r--r--nios2sim-ng.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/nios2sim-ng.h b/nios2sim-ng.h
index 7a3d711..6b45405 100644
--- a/nios2sim-ng.h
+++ b/nios2sim-ng.h
@@ -7,15 +7,20 @@
#include <stdlib.h>
#include <stdint.h>
+#include <stdbool.h>
#include "compiler.h"
+extern bool verbose;
+
#define __round_mask(x, y) ((__typeof__(x))((y) - 1))
#define round_up(x, y) ((((x) - 1) | __round_mask(x, y)) + 1)
#define err(fmt, args...) fprintf(stderr, "Error: " fmt, ##args)
#define warn(fmt, args...) fprintf(stderr, "Warning: " fmt, ##args)
#define info(fmt, args...) fprintf(stdout, fmt, ##args)
+#define vinfo(fmt, args...) \
+ do { if (verbose) fprintf(stdout, fmt, ##args); } while (0)
#ifdef DEBUG
# define dbg(fmt, args...) fprintf(stdout, fmt, ##args)
#else