aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorturret <turret@duck.com>2023-12-02 22:00:50 -0600
committerturret <turret@duck.com>2023-12-02 22:00:50 -0600
commitd4732a5a399a4d21300af41378b205a3e6aa907a (patch)
tree90be8fe0b47bc87aebb01ec66c9a4aa87b0e3232
parent46508afbe5756ce795054482a78c3867a03e819e (diff)
downloaddiscord-bot-skeleton-d4732a5a399a4d21300af41378b205a3e6aa907a.tar.gz
discord-bot-skeleton-d4732a5a399a4d21300af41378b205a3e6aa907a.tar.bz2
discord-bot-skeleton-d4732a5a399a4d21300af41378b205a3e6aa907a.zip
util: remove libsl `die`
potential copyright violations?? doesnt matter anyway since i'm going to implement my own panic soon which should address the downfalls of a generic `die`
-rw-r--r--include/util.h2
-rw-r--r--init/util.c23
2 files changed, 0 insertions, 25 deletions
diff --git a/include/util.h b/include/util.h
index 97435be..bad4a33 100644
--- a/include/util.h
+++ b/include/util.h
@@ -1,5 +1,3 @@
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-void die(const char *fmt, ...);
-
#define writeputs(str) write(STDOUT_FILENO, str, strlen(str));
diff --git a/init/util.c b/init/util.c
deleted file mode 100644
index 4411632..0000000
--- a/init/util.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* thank you suckless team (see libsl) */
-void die(const char *fmt, ...)
-{
- va_list ap;
-
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
-
- if(fmt[0] && fmt[strlen(fmt)-1] == ':') {
- fputc(' ', stderr);
- perror(NULL);
- } else {
- fputc('\n', stderr);
- }
-
- exit(1);
-}