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
commit149d594012b32158cd5e29f484cf0274dde6af44 (patch)
treef252e0c821a3c2cce56dd3180ea1c70fccd48d5a /src/util.c
parentb38fb544a43f161006924c055e12b2a1d9cf63f5 (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);
+}