X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/28ec221002d755d33c41fa4b5d9673eee0abef9d..c576ad2674c37a1c63f004c71049998f38854c64:/sbr/error.c diff --git a/sbr/error.c b/sbr/error.c index 96c89f58..5a5808c2 100644 --- a/sbr/error.c +++ b/sbr/error.c @@ -58,6 +58,21 @@ adios (const char *what, const char *fmt, ...) } +/* die is the same as adios(), but without the what as that's commonly + * NULL. */ +void NORETURN +die(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + advertise(NULL, NULL, fmt, ap); + va_end(ap); + done(1); + abort(); +} + + /* admonish calls advertise() with a tail indicating the program * continues. * Thus "[invo_name: ]fmt[[ what]: errno], continuing...\n" results. */