aboutsummaryrefslogtreecommitdiff
path: root/src/err.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-11-03 14:46:28 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-11-03 14:46:28 +0100
commit0f65e75ec0f56d3067a15e3671d9250fd2c1637a (patch)
tree40ddc24f08b42c767e02b6482133e9f7efe4b524 /src/err.h
parentRemove 'none' output. (diff)
parentAdd descirption to strbuf. (diff)
downloadcalp-0f65e75ec0f56d3067a15e3671d9250fd2c1637a.tar.gz
calp-0f65e75ec0f56d3067a15e3671d9250fd2c1637a.tar.xz
Merge branch 'restruct'
Diffstat (limited to 'src/err.h')
-rw-r--r--src/err.h42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/err.h b/src/err.h
deleted file mode 100644
index d9d19ec7..00000000
--- a/src/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 */