diff options
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common.c b/common.c new file mode 100644 index 0000000..42662ed --- /dev/null +++ b/common.c @@ -0,0 +1,15 @@ +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +void +die(const char *errstr, ...) +{ + va_list ap; + + va_start(ap, errstr); + vfprintf(stderr, errstr, ap); + va_end(ap); + exit(1); +} + |