This commit is contained in:
2024-04-14 22:18:05 +05:30
parent b89368be70
commit b55c5a4192
8 changed files with 436 additions and 1 deletions

16
clib/errhand.c Normal file
View File

@@ -0,0 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "errhand.h"
void fatal_error(char* fmt, ...) {
va_list argptr;
va_start(argptr, fmt);
printf("Fatal error: ");
vprintf(fmt, argptr);
va_end(argptr);
exit(EXIT_FAILURE);
}