aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-02-22 10:17:40 -0600
committerame <[email protected]>2024-02-22 10:17:40 -0600
commit867a86a9ab31c0652a46759443fc98a49f91c8dd (patch)
treef252e0c821a3c2cce56dd3180ea1c70fccd48d5a /src/util.c
parent83f9dca38af329d214c7d6dd2819ec2c6621d679 (diff)
cleaning and switch to parray_t
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
new file mode 100644
index 0000000..3c2e279
--- /dev/null
+++ b/src/util.c
@@ -0,0 +1,13 @@
+#include "util.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include "lua.h"
+
+void p_fatal(const char* m){
+ fprintf(stderr, "%s[ fatal ] %s %s\n",color_red, m, color_reset);
+ exit(EXIT_FAILURE);
+}
+
+void p_error(const char* m){
+ fprintf(stderr, "%s[ error ]%s %s\n",color_red, color_reset, m);
+}