From d4732a5a399a4d21300af41378b205a3e6aa907a Mon Sep 17 00:00:00 2001 From: turret Date: Sat, 2 Dec 2023 22:00:50 -0600 Subject: 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` --- include/util.h | 2 -- init/util.c | 23 ----------------------- 2 files changed, 25 deletions(-) delete mode 100644 init/util.c 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 -#include -#include -#include - -/* 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); -} -- cgit v1.2.3