diff options
Diffstat (limited to 'util.c')
| -rw-r--r-- | util.c | 18 |
1 files changed, 18 insertions, 0 deletions
| @@ -0,0 +1,18 @@ | |||
| 1 | /* | ||
| 2 | * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com> | ||
| 3 | * See LICENSE file for license details. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #include <stdarg.h> | ||
| 7 | #include <stdio.h> | ||
| 8 | #include <stdlib.h> | ||
| 9 | |||
| 10 | void | ||
| 11 | error(char *errstr, ...) { | ||
| 12 | va_list ap; | ||
| 13 | va_start(ap, errstr); | ||
| 14 | vfprintf(stderr, errstr, ap); | ||
| 15 | va_end(ap); | ||
| 16 | exit(1); | ||
| 17 | } | ||
| 18 | |||
