From 9695ea005d4af93dcd60f74f10fd3c54499a182f Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Thu, 11 Nov 2021 16:31:58 -0800 Subject: chore: split up base library into individual files for smaller binaries --- sys/base/error.c | 57 -------------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 sys/base/error.c (limited to 'sys/base/error.c') diff --git a/sys/base/error.c b/sys/base/error.c deleted file mode 100644 index dc6421d..0000000 --- a/sys/base/error.c +++ /dev/null @@ -1,57 +0,0 @@ -#include -#include - -void -exits(char *s) -{ - if (s == nil || *s == 0) - exit(0); - - fputs(s, stderr); - exit(1); -} - -void -errorf(byte* fmt, ...) -{ - va_list args; - va_start(args, fmt); - - fprintf(stderr, "error: "); - vfprintf(stderr, fmt, args); - - va_end(args); -} - -void -verrorf(byte* fmt, va_list args) -{ - printf("error: "); - vprintf(fmt, args); - printf("\n"); -} - -void -panicf(byte* fmt, ...) -{ - va_list args; - va_start(args, fmt); - - printf("panic: "); - vprintf(fmt, args); - printf("\n"); - - va_end(args); - - exit(1); -} - -void -vpanicf(byte* fmt, va_list args) -{ - printf("panic: "); - vprintf(fmt, args); - printf("\n"); - - exit(1); -} -- cgit v1.2.1