aboutsummaryrefslogtreecommitdiff
path: root/err.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-03-22 20:11:11 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-03-22 20:17:52 +0100
commitd46183860c1f3f10095e95023adcb79b1896ab0e (patch)
treedd331a0efe9777bfe84160139da1e39df3226b71 /err.h
parentAdd stuff to test.scm. (diff)
downloadcalp-d46183860c1f3f10095e95023adcb79b1896ab0e.tar.gz
calp-d46183860c1f3f10095e95023adcb79b1896ab0e.tar.xz
Move C and Scheme code into subdirs.
Diffstat (limited to 'err.h')
-rw-r--r--err.h42
1 files changed, 0 insertions, 42 deletions
diff --git a/err.h b/err.h
deleted file mode 100644
index d9d19ec7..00000000
--- a/err.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef ERR_H
-#define ERR_H
-
-#include <stdio.h>
-
-#include "macro.h"
-
-#define _RESET "\x1b[m"
-#define _BLACK "\x1B[0;30m"
-#define _RED "\x1B[0;31m"
-#define _GREEN "\x1B[0;32m"
-#define _YELLOW "\x1B[0;33m"
-#define _BLUE "\x1B[0;34m"
-#define _PURPLE "\x1B[0;35m"
-#define _CYAN "\x1B[0;36m"
-#define _WHITE "\x1B[0;37m"
-
-#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__)
-
-/* Parse error */
-#define ERR_P(ctx, fmt, ...) fprintf(stderr, _RED "PARSE" _RESET " (%s:%i) %i:%i " fmt "\n", \
- __FILE__, __LINE__, (ctx)->pline, (ctx)->pcolumn, ##__VA_ARGS__)
-
-#define INFO(msg) fprintf(stderr, _BLUE "INFO" _RESET " (%s:%i) %s\n", __FILE__, __LINE__, #msg)
-#define INFO_F(fmt, ...) fprintf(stderr, _BLUE "INFO" _RESET " (%s:%i) " fmt "\n", \
- __FILE__, __LINE__, ##__VA_ARGS__)
-
-#define LINE(len) do { \
- printf(_GREEN); \
- FOR(int, i, len) printf("_"); \
- 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 */