diff options
Diffstat (limited to 'compat_err.c')
-rw-r--r-- | compat_err.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compat_err.c b/compat_err.c index f996c31a..46f360da 100644 --- a/compat_err.c +++ b/compat_err.c @@ -77,6 +77,18 @@ err(int eval, const char *fmt, ...) } void +errx(int eval, const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vwarnxi(fmt, ap); + va_end(ap); + fputc('\n', stderr); + exit(eval); +} + +void warn(const char *fmt, ...) { va_list ap; |