aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-02-10 15:35:43 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-02-10 15:35:43 +0100
commitc04c261cbdf364847fd5b2d8a714635a8e709312 (patch)
tree15db94163792c538135d40293a0f572022cf4d74
parentImprove makefile for building .dot. (diff)
downloadcalp-c04c261cbdf364847fd5b2d8a714635a8e709312.tar.gz
calp-c04c261cbdf364847fd5b2d8a714635a8e709312.tar.xz
Add PRINT macro.
-rw-r--r--err.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/err.h b/err.h
index de875ad0..39e3cc74 100644
--- a/err.h
+++ b/err.h
@@ -29,4 +29,10 @@
printf("\n"); \
} while (0)
+#define PRINT(T, v) do { \
+ char buf[0x1000]; \
+ FMT(T)(v, buf); \
+ INFO_F("%s", buf); \
+} while (0)
+
#endif /* ERR_H */