diff options
author | Aki <please@ignore.pl> | 2022-01-24 21:17:08 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-01-24 21:17:08 +0100 |
commit | e4c74e9d1c97feccb0c5337baceab4fc4aec592c (patch) | |
tree | fe369763f7b0ad6ccb50eeb22ef9453eb694fffd /panic.c | |
download | coreutils-e4c74e9d1c97feccb0c5337baceab4fc4aec592c.zip coreutils-e4c74e9d1c97feccb0c5337baceab4fc4aec592c.tar.gz coreutils-e4c74e9d1c97feccb0c5337baceab4fc4aec592c.tar.bz2 |
Merged two random sources into this repository
Diffstat (limited to 'panic.c')
-rw-r--r-- | panic.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdnoreturn.h> + + +noreturn void panic(char * fmt, ...) +{ + va_list args; + va_start(args, fmt); + vdprintf(2, fmt, args); + va_end(args); + exit(1); +} |