aboutsummaryrefslogtreecommitdiff
path: root/err.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-06 12:08:58 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-06 12:08:58 +0100
commitaf3cc906185d7273cf82b1339b63843062898120 (patch)
tree01d9cff85d6c4dfee3185a2402745d721f3636e8 /err.h
parentRemove GC. (diff)
downloadcalp-af3cc906185d7273cf82b1339b63843062898120.tar.gz
calp-af3cc906185d7273cf82b1339b63843062898120.tar.xz
Code cleanup and add documentation.
Diffstat (limited to 'err.h')
-rw-r--r--err.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/err.h b/err.h
index 5689721b..eda79fee 100644
--- a/err.h
+++ b/err.h
@@ -2,8 +2,10 @@
#define ERR_H
#include <stdio.h>
+
#define RED "\x1B[0;31m"
#define RESET "\x1b[m"
+
#define ERR(msg) fprintf(stderr, RED "ERR" RESET " (%s:%i) %s\n", __FILE__, __LINE__, #msg)
#define ERR_F(fmt, ...) fprintf(stderr, RED "ERR" RESET " (%s:%i) " fmt "\n", \
__FILE__, __LINE__, ##__VA_ARGS__)