mirror of
https://github.com/thepigeongenerator/cpusetcores.git
synced 2025-12-16 21:45:46 +01:00
19 lines
332 B
C
19 lines
332 B
C
#include "error.h"
|
|
|
|
#include <stdarg.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdnoreturn.h>
|
|
|
|
noreturn void fatal(const char *fmt, ...) {
|
|
char buf[128];
|
|
va_list args;
|
|
va_start(args, fmt);
|
|
vsnprintf(buf, 128, fmt, args);
|
|
va_end(args);
|
|
|
|
fprintf(stderr, "\033[91mE: %s\033[0m\n", buf);
|
|
exit(1);
|
|
}
|