aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/tree.h6
-rw-r--r--src/include/util.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/include/tree.h b/src/include/tree.h
index 5e0279f..d22efc1 100644
--- a/src/include/tree.h
+++ b/src/include/tree.h
@@ -101,6 +101,12 @@ int tree_cmp(tree_t* tree_0, tree_t* tree_1);
// Swaps a tree for another.
void tree_swp_call(tree_t* t0, tree_t* t1);
+// Determines if a tree_type_t matches a string.
+int tree_type_str(tree_type_t tree_type, char* str);
+
+// Returns a string for a tree type.
+char* tree_type2str(tree_type_t tree_type);
+
/* Print a tree. */
void tree_print(tree_t* tree, int nest);
diff --git a/src/include/util.h b/src/include/util.h
index 60db492..0d3090a 100644
--- a/src/include/util.h
+++ b/src/include/util.h
@@ -116,6 +116,7 @@
void die(const char*, ...);
#define DIEF(fmt, ...) HIDE( \
fprintf(stderr, "\x1b[37m[\x1b[91;1m==\x1b[0m\x1b[37m]\x1b[91;1m CAUSE OF DEATH:\x1b[0m\x1b[31m "); \
+ LOG_FINF; \
fprintf(stderr, fmt, ##__VA_ARGS__); \
fprintf(stderr, "\x1b[0m\n"); \
fprintf(stderr, "\x1b[37m[\x1b[91;1m==\x1b[0m\x1b[37m]\x1b[91;1m Exiting...\x1b[0m\n"); \
@@ -124,6 +125,7 @@ void die(const char*, ...);
#define DIE(body) HIDE( \
fprintf(stderr, "\x1b[37m[\x1b[91;1m==\x1b[0m\x1b[37m]\x1b[91;1m CAUSE OF DEATH:\x1b[0m\x1b[31m "); \
+ LOG_FINF; \
fprintf(stderr, body); \
fprintf(stderr, "\x1b[0m\n"); \
fprintf(stderr, "\x1b[37m[\x1b[91;1m==\x1b[0m\x1b[37m]\x1b[91;1m Exiting...\x1b[0m\n"); \